优化样式

This commit is contained in:
LingZhaoHui 2021-11-11 00:18:16 +08:00
parent 8643be5617
commit 6b40e167fc
3 changed files with 35 additions and 14 deletions

View File

@ -41,7 +41,16 @@
<div class="blog-slider__content">
<div>
<span class="blog-slider__code"
style="display:inline-block">${article.articleCreateDate?string("yyyy年MM月dd日")}</span>
style="display:inline-block">${article.articleCreateDate?string("yyyy.MM.dd")}</span>
&nbsp;浏览
<#assign viewCountStr=article.articleViewCount?string('#.###')/>
<#if viewCountStr?length gt 3>
<#assign viewCount=viewCountStr?number/>
<#assign viewCountK=viewCount/1000 />
${viewCountK?string('#.##')}K
<#else>
${article.articleViewCount}
</#if>&nbsp;
<#if article.categoryURI??>
<h1 style="display:inline-block"><a class="has-link-black-ter"
href="/category/${article.categoryURI}">${article.articleCategory}</a></h1>
@ -51,8 +60,8 @@
href="${article.articlePermalink}">${article.articleTitle!}</a>
</h2>
<div class="blog-slider__text" content="">
<#if article.articleAbstractText!?length gt 24>
${article.articleAbstractText!?substring(0, 24)} ......<#else>
<#if article.articleAbstractText!?length gt 40>
${article.articleAbstractText!?substring(0, 40)} ......<#else>
${article.articleAbstractText!}</#if>
</div>
<a href="${article.articlePermalink}"
@ -76,7 +85,16 @@
<div class="level article-meta is-size-7 is-uppercase is-mobile is-overflow-x-auto">
<div class="level-left">
<time
class="level-item has-text-grey">${article.articleCreateDate?string("yyyy年MM月dd日")}</time>
class="level-item has-text-grey">${article.articleCreateDate?string("yyyy.MM.dd")}</time>
&nbsp;浏览
<#assign viewCountStr=article.articleViewCount?string('#.###')/>
<#if viewCountStr?length gt 3>
<#assign viewCount=viewCountStr?number/>
<#assign viewCountK=viewCount/1000 />
${viewCountK?string('#.##')}K
<#else>
${article.articleViewCount}
</#if>&nbsp;
<#if article.articleCategory != "">
<h1 style="display:inline-block"> <a class="has-link-black-ter"
href="/category/${article.categoryURI}">${article.articleCategory}</a></h1>

View File

@ -69,29 +69,29 @@
</h1>
<div class="level article-meta is-size-7 is-uppercase is-mobile is-overflow-x-auto">
<div class="level-left">
<div class="level-item has-text-grey">
${article.articleUpdateDate?string("yyyy.MM.dd")} 最后跟新
</div>
<!--<div class="level-item has-text-grey">
${article.articleCreateDate?string("yyyy.MM.dd")} 创建
${article.articleUpdateDate?string("yyyy.MM.dd")}
</div>-->
<div>
<div class="level-item has-text-grey">
${article.articleCreateDate?string("yyyy.MM.dd")}
</div>
<div>浏览
<#assign viewCountStr=article.articleViewCount?string('#.###')/>
<#if viewCountStr?length gt 3>
<#assign viewCount=viewCountStr?number/>
<#assign viewCountK=viewCount/1000 />
${viewCountK?string('#.##')}K 浏览&nbsp;
${viewCountK?string('#.##')}K
<#else>
${article.articleViewCount} 浏览&nbsp;
</#if>
${article.articleViewCount}
</#if>&nbsp;
</div>
<div>
<#if article.articleCommentCount != 0>
&nbsp;<a href="#comments">${article.articleCommentCount} 评论&nbsp;</a>
评论&nbsp;<a href="#comments">${article.articleCommentCount} </a>
</#if>
</div>
<div class="level-item has-text-grey">
&nbsp;${article.articleCategory}
&nbsp;分类:&nbsp;${article.articleCategory}
</div>
</div>
</div>

View File

@ -77,6 +77,9 @@
.halo-comment {
min-width: 300px;
}
.blog-slider__content{
font-size: 12px;
}
</style>
<nav class="navbar navbar-main is-paddingless ">