💄🔧 Update the post meta info.

This commit is contained in:
凡梦星尘 2023-01-01 22:06:59 +08:00
parent 85b7dc11ca
commit dca196c315
11 changed files with 65 additions and 78 deletions

View File

@ -71,36 +71,26 @@ PostArchiveCheersExcellent:
PostArchiveKeepOn:
other: Keep on posting.╰(*°▽°*)╯
PostStickyTitle:
other: Strickys
PostPublishDate:
other: "Publish on"
PostPublishTime:
other: "Create Time"
PostLastModDate:
other: "Update on"
PostLastModTime:
other: "Modify Time"
PostCategory:
other: "Classify at"
PostWords:
other: "Words"
PostWordCount:
other: "{{- .WordCount -}}"
PostReading:
other: "Read"
PostReadTime:
other: "{{- .ReadingTime -}}min"
PostViews:
other: "Views"
PostComments:
other: "Comments"
PostTag:
other: "Tags"
PostReadMore:
other: "Read More"
PostEditTitle:
other: Edit this post
PostMeta:
sticky: Stickys
publish:
date: "Publish on"
time: "Create Time"
lastmod:
date: "Update on"
time: "Modify Time"
category: "Classify at"
words:
title: Words
count: "{{- .WordCount -}}"
reading:
title: Read
time: "{{- .ReadingTime -}}mins"
views: Views
comments: Comments
tags: Tags
more: "Read More"
edit: "Edit this post"
Reward:
title: Donate

View File

@ -72,36 +72,26 @@ PostArchiveCheersExcellent:
PostArchiveKeepOn:
other: 继续努力哟。╰(*°▽°*)╯
PostStickyTitle:
other: 置顶
PostPublishDate:
other: 发表于
PostPublishTime:
other: 创建时间
PostLastModDate:
other: 更新于
PostLastModTime:
other: 修改时间
PostCategory:
other: "分类于"
PostWords:
other: 字数
PostWordCount:
other: "{{- .WordCount -}}"
PostReading:
other: 阅读
PostReadTime:
other: "{{- .ReadingTime -}}分钟"
PostViews:
other: 浏览
PostComments:
other: 评论
PostTags:
other: 标签
PostReadMore:
other: 阅读全文
PostEditTitle:
other: 编辑
PostMeta:
sticky: 置顶
publish:
date: 发表于
time: 创建时间
lastmod:
date: 更新于
time: 修改时间
category: 分类于
words:
title: 字数
count: "{{- .WordCount -}}"
reading:
title: 阅读
time: "{{- .ReadingTime -}}分钟"
views: 浏览
comments: 评论
tags: 标签
more: 阅读全文
edit: 编辑
Reward:
title: 赞赏

View File

@ -3,7 +3,7 @@
{{ if and .Site.Params.readMoreBtn (not .Params.Expand) }}
<div class="post-button">
<a class="btn" href="{{ .RelPermalink | relLangURL }}#more" rel="contents">
{{ T "PostReadMore" }} &raquo;
{{ T "PostMeta.more" }} &raquo;
</a>
</div>
{{ end }}

View File

@ -1,7 +1,7 @@
{{ with .ctx }}
{{ if $.IsHome }} <h2 {{ else }} <h1 {{ end }} class="post-title" itemprop="name headline">
{{ if and .Weight (gt .Weight 0) }}
<span class="post-sticky-flag" title="{{ T "PostStickyTitle" }}">
<span class="post-sticky-flag" title="{{ T "PostMeta.sticky" }}">
<i class="fa fa-thumbtack"></i>
</span>
{{ end }}
@ -18,7 +18,7 @@
{{ .Title }}
{{ if .Site.Params.postEdit.enable }}
{{ $editURL := printf "%s%s" .Site.Params.postEdit.url (path.Clean .File.Path) }}
<a href="{{ $editURL }}" rel="noopener external nofollow noreferrer" target="_blank" class="exturl post-edit-link" title="{{ T "PostEditTitle" }}"><i class="fa fa-pen-nib"></i></a>
<a href="{{ $editURL }}" rel="noopener external nofollow noreferrer" target="_blank" class="exturl post-edit-link" title="{{ T "PostMeta.edit" }}"><i class="fa fa-pen-nib"></i></a>
{{ end }}
{{ end }}
{{ if $.IsHome }} </h2> {{ else }} </h1> {{ end }}

View File

@ -4,7 +4,9 @@
<span class="post-meta-item-icon">
<i class="far fa-folder-open"></i>
</span>
<span class="post-meta-item-text">{{ print (T "PostCategory") (T "SymbolColon") }}</span>
<span class="post-meta-item-text" title="{{ T "PostMeta.category" }}">
{{ print (T "PostMeta.category") (T "SymbolColon") }}
</span>
{{ range (first 1 .) }}
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}" itemprop="url" rel="index">

View File

@ -2,8 +2,8 @@
<span class="post-meta-item-icon">
<i class="far fa-comments"></i>
</span>
<span class="post-meta-item-text">
{{ print (T "PostComments") (T "SymbolColon") }}
<span class="post-meta-item-text" title="{{ T "PostMeta.comments" }}">
{{ print (T "PostMeta.comments") (T "SymbolColon") }}
</span>
<span {{ with .Site.Params.waline.comment }}class="waline-comment-count"{{end}} data-path="{{ .RelPermalink | relLangURL }}">
<i class="fa fa-sync fa-spin"></i>

View File

@ -5,8 +5,10 @@
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">{{ print (T "PostPublishDate") (T "SymbolColon") }}</span>
<time title="{{ print (T "PostPublishDate") (T "SymbolColon") }}{{ .Date }}" itemprop="dateCreated datePublished" datetime="{{ .Date }}">
<span class="post-meta-item-text" title="{{ T "PostMeta.publish.date" }}">
{{ print (T "PostMeta.publish.date") (T "SymbolColon") }}
</span>
<time title="{{ print (T "PostMeta.publish.time") (T "SymbolColon") }}{{ .Date }}" itemprop="dateCreated datePublished" datetime="{{ .Date }}">
{{ .Date.Format .Site.Params.dateFormat }}
</time>
</span>

View File

@ -1,9 +1,9 @@
{{ if .Site.Params.postMeta.readTime }}
<span class="post-meta-item" title="{{ T "PostReading" }}">
<span class="post-meta-item" title="{{ T "PostMeta.reading.title" }}">
<span class="post-meta-item-icon">
<i class="far fa-clock"></i>
</span>
<span class="post-meta-item-text">{{ print (T "PostReading") (T "SymbolColon") }}&asymp;</span>
<span>{{ T "PostReadTime" . }}</span>
<span class="post-meta-item-text">{{ print (T "PostMeta.reading.title") (T "SymbolColon") }}&asymp;</span>
<span>{{ T "PostMeta.reading.time" . }}</span>
</span>
{{ end }}

View File

@ -5,8 +5,10 @@
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">{{ print (T "PostLastModDate") (T "SymbolColon") }}</span>
<time title="{{ print (T "PostLastModTime") (T "SymbolColon") }}{{ $modTime }}" itemprop="dateModified" datetime="{{ $modTime }}">{{ .Lastmod.Format .Site.Params.dateFormat }}</time>
<span class="post-meta-item-text" title="{{ T "PostMeta.lastmod.date" }}">
{{ print (T "PostMeta.lastmod.date") (T "SymbolColon") }}
</span>
<time title="{{ print (T "PostMeta.lastmod.time") (T "SymbolColon") }}{{ $modTime }}" itemprop="dateModified" datetime="{{ $modTime }}">{{ .Lastmod.Format .Site.Params.dateFormat }}</time>
</span>
{{ end }}
{{ end }}

View File

@ -5,12 +5,12 @@
{{ if .Site.Params.analytics.busuanzi.postViews }}
{{ $pageViewId = "busuanzi_value_page_pv" }}
{{ end }}
<span class="post-meta-item" title="{{ T "PostViews" }}">
<span class="post-meta-item" title="{{ T "PostMeta.views" }}">
<span class="post-meta-item-icon">
<i class="far fa-eye"></i>
</span>
<span class="post-meta-item-text">
{{ print (T "PostViews") (T "SymbolColon") }}
{{ print (T "PostMeta.views") (T "SymbolColon") }}
</span>
<span {{ with $pageViewId }}id="{{ . }}"{{end}} {{ with .Site.Params.waline.pageView }}class="waline-pageview-count"{{end}} data-path="{{ .RelPermalink | relLangURL }}">
<i class="fa fa-sync fa-spin"></i>

View File

@ -1,8 +1,9 @@
{{ if .Site.Params.postMeta.wordCount }}
<span class="post-meta-item" title="{{ T "PostWords" }}">
<span class="post-meta-item" title="{{ T "PostMeta.words.title" }}">
<span class="post-meta-item-icon">
<i class="far fa-file-word"></i>
</span>
<span class="post-meta-item-text">{{ print (T "PostWords") (T "SymbolColon") }}</span><span>{{ T "PostWordCount" . }}</span>
<span class="post-meta-item-text">{{ print (T "PostMeta.words.title") (T "SymbolColon") }}</span>
<span>{{ T "PostMeta.words.count" . }}</span>
</span>
{{ end }}