Skip to content

Commit

Permalink
调整样式
Browse files Browse the repository at this point in the history
  • Loading branch information
jkjoy committed Jul 1, 2024
1 parent 7c1b726 commit 81baad8
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 20 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 说明

从hexo的Chic移植而来
`hexo``Chic`移植而来

友情链接页面参考`hexo`主题`blank`配合插件`Links`使用

评论列表参考`wordpress`主题`farallon`
63 changes: 49 additions & 14 deletions dist/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -862,41 +862,76 @@ html {
}
.post-nav:before,
.post-nav:after {
content: " ";
content: "";
display: table;
}
.post-nav a.prev,
.post-nav a.next {

.post-nav:after {
clear: both;
}

.post-nav {
width: 100%; /* 确保宽度足够 */
overflow: hidden; /* 清除浮动 */
}

.post-nav .prev,
.post-nav .next {
font-weight: 600;
font-size: 16px;
transition-property: transform;
transition-timing-function: ease-out;
transition-duration: 0.3s;
transition: transform 0.3s ease-out;
display: inline-block; /* 确保 span 转换为行内块级元素 */
}
.post-nav a.prev {

.post-nav .prev {
float: left;
text-align: left; /* 确保文字左对齐 */
}
.post-nav a.prev::before {

.post-nav .prev::before {
content: "<";
margin-right: 0.5em;
}
.post-nav a.prev:hover {

.post-nav .prev:hover {
transform: translateX(-4px);
}
.post-nav a.next {

.post-nav .next {
float: right;
text-align: right; /* 确保文字右对齐 */
font-weight: normal; /* 确保链接文字正常粗细 */
}
.post-nav a.next::after {

.post-nav .next::after {
content: ">";
margin-left: 0.5em;
}
.post-nav a.next:hover {

.post-nav .next:hover {
transform: translateX(4px);
}
.post-nav a.prev::before,
.post-nav a.next::after {

.post-nav .prev::before,
.post-nav .next::after {
font-weight: bold;
}

.post-nav .prev a,
.post-nav .next a {
text-decoration: none; /* 去掉链接下划线 */
color: inherit; /* 继承父级颜色 */
display: inline-block; /* 使 a 元素成为行内块级元素 */
font-weight: normal; /* 确保链接文字正常粗细 */
}

.post-nav .prev a {
text-align: left; /* 确保 a 元素文字左对齐 */
}

.post-nav .next a {
text-align: right; /* 确保 a 元素文字右对齐 */
}
.tag:not(:last-child) a::after {
content: " / ";
}
Expand Down
8 changes: 3 additions & 5 deletions post.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@
发布日期:
</span> <?php $this->date('Y-m-d'); ?><span class="dot"></span>
<span class="post-category">
分类:
所属分类:
</span><?php $this->category(','); ?> <span class="dot"></span>
<span> 浏览:</span><?php get_post_view($this) ?>次<span class="dot"></span>
<span>评论:</span><a href="<?php $this->permalink() ?>#comments">
<?php $this->commentsNum('0', '1', '%d '); ?></a>
<?php if($this->user->hasLogin() && $this->user->pass('editor', true)): ?>
<span><span class="dot"></span>
<a href="<?php $this->options->adminUrl('write-post.php?cid=' . $this->cid); ?>" target="_blank" title="编辑文章">
Expand Down Expand Up @@ -59,8 +57,8 @@
</div>
</section>
<section class="post-nav">
<a class="prev" rel="prev"><?php $this->thePrev('%s', '没有了'); ?></a>
<a class="next" rel="next"><?php $this->theNext('%s', '没有了'); ?></a>
<span class="prev" rel="prev"><?php $this->thePrev('%s', '没有了'); ?></span>
<span class="next" rel="next"><?php $this->theNext('%s', '没有了'); ?></span>
</section>
<!-- 判断如果允许评论则显示评论的div -->
<?php if ($this->allow('comment')): ?>
Expand Down

0 comments on commit 81baad8

Please sign in to comment.