调整样式

This commit is contained in:
浪子 2024-07-01 09:27:18 +08:00
parent 7c1b7260c6
commit 81baad8133
3 changed files with 57 additions and 20 deletions

View File

@ -1,3 +1,7 @@
## 说明
从hexo的Chic移植而来
从`hexo`的`Chic`移植而来
友情链接页面参考`hexo`主题`blank`配合插件`Links`使用
评论列表参考`wordpress`主题`farallon`

61
dist/css/style.css vendored
View File

@ -865,38 +865,73 @@ html {
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: " / ";
}

View File

@ -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="编辑文章">
@ -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')): ?>