飞牛士主题修改记录

记录飞牛对博客的一些修改记录,方便自己以后回溯,以供他人参考。

一直持续更新

2023.12.20

换主题换个心情,慢慢修改。

panda主题精选评论

php

//走心评论
function weisay_touching_comments_list( $comment ) {
	$cpage = get_page_of_comment( $comment->comment_ID, $args = array() );
?>
	<li <?php comment_class(); ?> id="comment-<?php comment_ID() ?>">
		<div id="comment-<?php comment_ID(); ?>" class="comment-body">
		<div class="comment-meta">
		<div class="comment-avatar flex-avatar w-48"><?php echo get_avatar( $comment, 48 ); ?></div>
		<b class="fn comment-name"><?php comment_author_link() ?></b><span class="edit-link"><?php edit_comment_link( __( 'Edit' ), ' ' ); ?></span>
	
		</div>		
			
		<div class="comment-content">
		<?php comment_text(); ?>
		</div>
	
			
			
	<div class="comment-metadata"><?php comment_date('Y-m-d') ?> 评论于  •  <a href="<?php echo get_comment_link($comment->comment_ID, $cpage); ?>" target="_blank"><?php echo get_the_title($comment->comment_post_ID); ?></a></div>
	</div>
<?php
}
function weisay_touching_comments_end_list() {
		echo '</li>';
}

css。

.touching-comments-button{display:block;float:right;clear:both;margin-top:10px;}
.touching-comments-button span svg{width:18px;height:18px;}
.touching-comments-button br{display:none;}
.touching-comments-button a{outline:none;}
.touching-comments-list li{list-style:none;border-bottom:1px solid #ddd;margin-bottom:10px;}
.touching-comments-list .touching-comments-button,.touching-comments-list .touching-comments-chosen{display:none;}
.touching-comments-list img.avatar{vertical-align:middle;}
.touching-comments-list .comment-name{margin-left:2px;}
.touching-comments-list .comment-content p{text-indent:0;     background-color: #e8b86826 !important;
    display: inline-block;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-md);
    border-top-left-radius: 0;
    margin: 1rem 0 1rem;
    text-indent: 0;}
.touching-comments-list .edit-link{float:right;}
.touching-comments-list .comment-metadata{opacity: 0.8;margin: 0 0 1rem;}
.touching-comments-title{display:block;line-height:30px;height:30px;margin:10px; font-size: 1.25rem;}
.touching-comments-picture img{width:100%;vertical-align: middle;}
.touching-comments-chosen{background:#f9f1be;padding:3px 8px;margin:5px 0;border-radius:8px 0;font-size:14px;display:inline-block;}
.touching-comments-chosen span{color:#76600a;}

2023.12.18

添加了精评页面

页面链接:https://www.feinews.com/touching

使用的是@威言威语 的走心评论插件。

插件地址:https://www.weisay.com/blog/wordpress-plugin-touching-comments.html

修改页面css样式:

.touching-comments-button{display:block;float:right;clear:both;margin-top:10px;}
.touching-comments-button span svg{width:18px;height:18px;}
.touching-comments-button br{display:none;}
.touching-comments-button a{outline:none;}
.touching-comments-list li{margin-left: -30px;list-style:none;border-bottom:1px solid #ddd;margin-bottom:10px;}
.touching-comments-list .touching-comments-button,.touching-comments-list .touching-comments-chosen{display:none;}
.touching-comments-list img.avatar{vertical-align:middle;}
.touching-comments-list .comment-name{margin-left:2px;}
.touching-comments-list .comment-content p{text-indent:0;margin-top: 30px;padding: 20px;
    position: relative;
    background: hsla(var(--theme-color-hsl),.04);}
.touching-comments-list .comment-content p:before {
    position: absolute;
    left: 15px;
    top: -19px;
    border: 9px solid transparent;
    border-bottom: 10px solid hsla(var(--theme-color-hsl),.04);
    content: "";
}
.touching-comments-list .edit-link{float:right;}
.touching-comments-list .comment-metadata{opacity: 0.8;margin-bottom: 20px;}
.touching-comments-title{display:block;line-height:30px;height:30px;    margin: 20px 0px 20px 0px;font-weight: bold;}
.touching-comments-picture img{width:100%;vertical-align: middle;}
.touching-comments-chosen{background:#f9f1be;padding:3px 8px;margin:5px 0;border-radius:8px 0;font-size:14px;display:inline-block;}
.touching-comments-chosen span{color:#76600a;}

2023.12.09

修改页面主题背景色:#f3f7f6;

修改文章页面内边距从20px改成30px;

.el-boxed .entry-main {
    background: var(--theme-el-bg-color);
    padding: 30px;
    margin-bottom: 20px;
}

2023.12.06

清理和优化WordPress网站数据库wp_options表和自动加载的数据,由原来的1800项,减少成255项。

2023.12.05

顶部导航栏修改将原来导航栏的菜单文字大小14px改成16px。

body>header.header .nav {font-size: 16px;}

2023.12.04

友情链接页面修改

  • 修改边框为圆角8px
  • 增加了边框外间距10px
  • 添加了鼠标划过时,box上移5px

详情页面:https://www.feinews.com/links

© 文章系本站作者 飞牛 原创发布于「飞牛士 FeiNews」,文章授权后方可转载,请勿侵权!

(1)

猜你喜欢

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

评论列表(7条)