首页文章标题&摘要的美化(Handsome)
下载Content.php,替换/usr/themes/handsome/libs/Content.php,然后在自定义CSS中加入下列代码:
@charset "utf-8";
/*
CSS from 神代綺凜 - https://lolico.moe
Modified by Yi - https://www.yeyi.site
*/
#widget-tabs-4-comments .list-group-item,#tag_toc,#post-panel,#sidebar,#post-content {
background-color: transparent!important;
}
.blog-post>.panel,.blog-post>.panel-small {
border: 0;
border-radius: 5px;
}
.blog-post>.panel .index-post-img .item-thumb,.panel-small .index-post-img-small .item-thumb-small,.index-post-title a {
transition: all .2s;
}
.blog-post>.panel:hover .index-post-img .item-thumb,.blog-post>.panel-small:hover .index-post-img-small .item-thumb-small {
transform: scale(1.05);
}
.visible-xs-inline {
display: inline-block!important;
}
@media screen and (min-width: 1200px) {
.panel .item-thumb {
height:300px;
}
#post-panel .blog-post {
position: relative;
}
#post-panel .panel {
overflow: hidden;
}
#post-panel .panel .post-meta {
position: relative;
margin-top: -300px;
height: 300px;
padding-top: 133px!important;
padding-bottom: 0!important;
background-color: rgba(0,0,0,.3);
color: #fff!important;
transition: all .3s;
}
#post-panel .panel .post-meta,#post-panel .panel-small .post-meta {
border-radius: 5px;
}
#post-panel .panel .post-meta *,#post-panel .panel-small .post-meta * {
color: #fff!important;
}
#post-panel .panel .post-meta>h2,#post-panel .panel-small .post-meta>h2 {
text-align: center;
text-shadow: 0 0 3px #fff;
}
#post-panel .panel .post-meta>p,#post-panel .panel .post-meta>div,#post-panel .panel-small .post-meta>p,#post-panel .panel-small .post-meta>div {
transition: all .3s;
transform: translateY(-10px);
opacity: 0;
}
#post-panel .panel .post-meta>.text-muted,#post-panel .panel-small .post-meta>.text-muted {
position: absolute;
bottom: 20px;
}
#post-panel .panel .post-meta>.line {
position: absolute;
bottom: 40px;
}
#post-panel .panel-small .post-meta>.line {
position: absolute;
bottom: 40px;
}
#post-panel .panel .post-meta>.summary {
margin: 32px auto;
width: 510px;
}
#post-panel .panel-small .post-meta>.summary {
margin: 32px auto;
width: 240px;
}
#post-panel .panel-small {
display: inline-block;
height: 300px;
width: calc(50% - 10px);
margin-right: 20px;
}
#post-panel .panel-small+.panel-small {
margin-right: 0;
}
#post-panel .panel-small .index-img-small,#post-panel .panel-small .index-img-small .item-thumb-small {
height: 100%;
width: 100%;
}
#post-panel .panel-small .post-meta {
position: absolute;
height: 300px;
width: calc(50% - 10px);
padding: 133px 20px 0 20px!important;
background-color: rgba(0,0,0,.3);
color: #fff!important;
transition: all .3s;
}
#post-panel .panel:hover .post-meta,#post-panel .panel-small:hover .post-meta {
background-color: rgba(0,0,0,.6);
}
#post-panel .panel:hover .post-meta>p,#post-panel .panel:hover .post-meta>div,#post-panel .panel-small:hover .post-meta>p,#post-panel .panel-small:hover .post-meta>div {
opacity: 1;
transform: translateY(0);
}
#post-panel .panel:hover .post-meta,#post-panel .panel-small:hover .post-meta {
padding-top: 80px!important;
}
#post-panel .ahover {
display: block;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.blog-post>.panel:hover .index-post-img,.blog-post>.panel-small:hover .index-post-img-small {
filter: blur(3px);
}
}
header.bg-light.wrapper-md {
margin-top: 30px;
background-color: transparent!important;
border: 0;
text-align: center;
text-shadow: 0 0 3px #000;
}
header.wrapper-md * {
color: #fff;
}
header.wrapper-md h1 {
font-size: 32px;
}
header.wrapper-md h1 {
font-weight: bold!important;
}
.sticky {
position: absolute;
top: 10px;
left: 15px;
}
导航页面(左侧栏)插入文章及评论总数
在aside.php中插入以下代码:
<!-- 样式 -->
<div class="wrapper m-t">
<span><?php Typecho_Widget::widget('Widget_Stat')->to($stat); ?></span>
<div class="text-center-folded">
<span class="pull-right pull-none-folded"><?php $stat->publishedPostsNum() ?></span><!--文章数量-->
<span class="hidden-folded">Text number</span>
</div>
<div class="progress progress-xxs m-t-sm dk">
<div class="progress-bar progress-bar-info" style="width: 30%;">
</div>
</div>
<div class="text-center-folded">
<span class="pull-right pull-none-folded"><?php $stat->publishedCommentsNum() ?></span> <!-- 评论数量-->
<span class="hidden-folded">Comment number</span>
</div>
<div class="progress progress-xxs m-t-sm dk">
<div class="progress-bar progress-bar-primary" style="width:25%;">
</div>
</div>
版权属于:XCSOFT
本文链接:https://blog.xsot.cn/archives/theme_handsome.html
本博客所有原创文章采用CC BY-NC-SA 4.0协议进行许可,转载请注明原文链接。
片头音乐没了?
我把自动播放关了,可以手动播放