Skip to content

Commit

Permalink
v1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
kraity authored Jul 21, 2020
1 parent f6a8ba7 commit eab7c66
Show file tree
Hide file tree
Showing 5 changed files with 224 additions and 74 deletions.
53 changes: 53 additions & 0 deletions themes/default/404.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Error</title>
<link href="https://fonts.loli.net/css?family=Nunito" rel="stylesheet">
<style>
html, body {
background-color: #fff;
color: #636b6f;
font-family: 'Nunito', sans-serif;
font-weight: 100;
height: 100vh;
margin: 0;
}
.full-height {
height: 100vh;
}
.flex-center {
align-items: center;
display: flex;
justify-content: center;
}
.position-ref {
position: relative;
}
.code {
border-right: 2px solid;
font-size: 26px;
padding: 0 15px 0 15px;
text-align: center;
}
.message {
font-size: 18px;
text-align: center;
}
</style>
</head>
<body>
<div class="flex-center position-ref full-height">
<div class="code">404</div>
<div class="message" style="padding: 10px;">
Not Found
</div>
</div>
</body>
</html>
148 changes: 74 additions & 74 deletions themes/default/dynamic.css
Original file line number Diff line number Diff line change
@@ -1,74 +1,74 @@
.dynamics_ul {
margin-top: 3em;
}

li.dynamics_list {
list-style: none;
margin-bottom: 3em;
}

.dynamics_list .dynamic-author {
display: flex;
align-items: center;
}

.dynamics_list .dynamic-author span img {
border-radius: 50%;
}

.dynamics_list .dynamic-author cite {
font-size: 13px;
padding-left: 10px;
font-style: normal;
}

.dynamics_list .dynamic-meta {
margin-left: 40px;
padding-bottom: 5px;
}

.dynamics_list .dynamic-meta a {
color: #8f949e;
}

.dynamics_list .dynamic-content {
word-wrap: break-word;
padding-top: 1em;
padding-bottom: 10px;
font-size: 14px;
}

.dynamics_list .dynamic-content p {
line-height: 1.7;
}

.dynamics-page-navigator {
display: flex;
justify-content: center;
padding-top: 10px;
line-height: 1 !important;
font-size: 12px;
}

.dynamics-page-navigator li {
padding: 10px 12px;
line-height: 1 !important;
list-style: none;
background: #fff
}

.dynamics-page-navigator li:first-of-type {
border-radius: 5px 0 0 5px
}

.dynamics-page-navigator li:last-of-type {
border-radius: 0 5px 5px 0
}

.dynamics-page-navigator .current {
background: #4a55ee
}

.dynamics-page-navigator .current a {
color: #fff
}
.dynamics_ul {
margin-top: 3em;
}

li.dynamics_list {
list-style: none;
margin-bottom: 3em;
}

.dynamics_list .dynamic-author {
display: flex;
align-items: center;
}

.dynamics_list .dynamic-author span img {
border-radius: 50%;
}

.dynamics_list .dynamic-author cite {
font-size: 13px;
padding-left: 10px;
font-style: normal;
}

.dynamics_list .dynamic-meta {
margin-left: 40px;
padding-bottom: 5px;
}

.dynamics_list .dynamic-meta a {
color: #8f949e;
}

.dynamics_list .dynamic-content {
word-wrap: break-word;
padding-top: 1em;
padding-bottom: 10px;
font-size: 14px;
}

.dynamics_list .dynamic-content p {
line-height: 1.7;
}

.dynamics-page-navigator {
display: flex;
justify-content: center;
padding-top: 10px;
line-height: 1 !important;
font-size: 12px;
}

.dynamics-page-navigator li {
padding: 10px 12px;
line-height: 1 !important;
list-style: none;
background: #fff
}

.dynamics-page-navigator li:first-of-type {
border-radius: 5px 0 0 5px
}

.dynamics-page-navigator li:last-of-type {
border-radius: 0 5px 5px 0
}

.dynamics-page-navigator .current {
background: #4a55ee
}

.dynamics-page-navigator .current a {
color: #fff
}
44 changes: 44 additions & 0 deletions themes/default/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php
/**
* 这是我的动态一套默认皮肤
*
* 本页面是动态的首页
* 类似于博客的首页
*
* @package default
* @author 权那他
* @version 1.0
* @link https://github.com/kraity/Dynamics
*/

if (!defined('__TYPECHO_ROOT_DIR__')) exit;

// $this->need("header.php"); 是调用博客主题的文件
// $this->import("header.php"); 是调用动态主题的文件

// $this->options->siteUrl(); 这些方法依然可以调用
// $this->options->themeUrl();

?>

<?php $this->need("header.php") ?>

<?php while ($this->dynamics->next()) : ?>
<li id="<?php $this->dynamics->did() ?>>" class="dynamics_list">
<div class="dynamic-author" itemprop="creator" itemscope="" itemtype="http://schema.org/Person">
<span itemprop="image"><img class="avatar" src="<?php $this->dynamics->avatar() ?>"
alt="<?php $this->dynamics->authorName() ?>" width="32" height="32"></span>
<cite class="fn" itemprop="name"><?php $this->dynamics->authorName() ?></cite>
</div>
<div class="dynamic-meta">
<a href="<?php $this->dynamics->url() ?>">
<time itemprop="dynamicTime"><?php $this->dynamics->created() ?></time>
</a>
</div>
<div class="dynamic-content" itemprop="commentText"><?php $this->dynamics->content() ?></div>
</li>
<?php endwhile; ?>

<?php $this->dynamics->navigator() ?>

<?php $this->need("footer.php") ?>
28 changes: 28 additions & 0 deletions themes/default/page.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
/**
* 本页面是动态的分页面
* 这个博主调用 Dynamics_Plugin::output() 时,会输出以下内容
*/
if (!defined('__TYPECHO_ROOT_DIR__')) exit;

?>

<link rel="stylesheet" href="<?php Dynamics_Plugin::themeDirUrl("dynamic.css?version=1.3") ?>"/>

<?php while ($this->dynamics->next()) : ?>
<li id="<?php $this->dynamics->did() ?>>" class="dynamics_list">
<div class="dynamic-author" itemprop="creator" itemscope="" itemtype="http://schema.org/Person">
<span itemprop="image"><img class="avatar" src="<?php $this->dynamics->avatar() ?>"
alt="<?php $this->dynamics->authorName() ?>" width="32" height="32"></span>
<cite class="fn" itemprop="name"><?php $this->dynamics->authorName() ?></cite>
</div>
<div class="dynamic-meta">
<a href="<?php $this->dynamics->url() ?>">
<time itemprop="dynamicTime"><?php $this->dynamics->created() ?></time>
</a>
</div>
<div class="dynamic-content" itemprop="commentText"><?php $this->dynamics->content() ?></div>
</li>
<?php endwhile; ?>

<?php $this->dynamics->navigator() ?>
25 changes: 25 additions & 0 deletions themes/default/post.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php
/**
* 本页面是动态的单个页面
* 类似于博客的文章页面,这个显示单个指定的动态,根据单个动态的链接访问才显示
*/
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
?>

<?php $this->need("header.php") ?>

<li id="<?php $this->dynamic->did() ?>>" class="dynamics_list">
<div class="dynamic-author" itemprop="creator" itemscope="" itemtype="http://schema.org/Person">
<span itemprop="image"><img class="avatar" src="<?php $this->dynamic->avatar() ?>"
alt="<?php $this->dynamic->authorName() ?>" width="32" height="32"></span>
<cite class="fn" itemprop="name"><?php $this->dynamic->authorName() ?></cite>
</div>
<div class="dynamic-meta">
<a href="<?php $this->dynamic->url() ?>">
<time itemprop="dynamicTime" datetime="{date}"><?php $this->dynamic->created() ?></time>
</a>
</div>
<div class="dynamic-content" itemprop="commentText"><?php $this->dynamic->content() ?></div>
</li>

<?php $this->need("footer.php") ?>

0 comments on commit eab7c66

Please sign in to comment.