添加文章mate类别显示
This commit is contained in:
parent
4f6555f008
commit
0cf0348320
2 changed files with 13 additions and 6 deletions
|
@ -18,14 +18,23 @@
|
|||
<article class="post {{ .Scratch.Get `postClass` }}">
|
||||
<header class="post-header">
|
||||
{{ safeHTML (.Scratch.Get `firstEmoji`) }}
|
||||
<h2 class="post-title">{{ .Title }}</h2>
|
||||
<p class="post-meta">{{ .Date.Format "Jan 2, 2006" }}</p>
|
||||
|
||||
<a href="{{ .Permalink }}"><h2 class="post-title">{{ .Title }}</h2></a>
|
||||
<p class="post-meta">{{ .Date.Format "Jan 2, 2006" }} .
|
||||
{{ with .Params.categories }}
|
||||
{{ $categoriesLen := len . }}
|
||||
{{ if gt $categoriesLen 0 }}
|
||||
<span>{{ i18n "post.categorized_in" }}</span>
|
||||
{{ range $k, $v := . }}
|
||||
<a class="category-link" href="{{ . | printf "%s%s" "/categories/" | urlize | lower | relLangURL }}">{{ . }}</a>{{ if lt $k (sub $categoriesLen 1) }}, {{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</p>
|
||||
</header>
|
||||
<p class="post-summary">{{ .Summary | plainify | htmlUnescape }}...</p>
|
||||
<footer class="post-footer">
|
||||
</footer>
|
||||
<a class="post-link" href="{{ .Permalink }}"></a>
|
||||
<!-- <a class="post-link" href="{{ .Permalink }}"></a> -->
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
</main>
|
||||
<footer class="footer">
|
||||
<span>© {{ if eq now.Year 2017 }}2017{{ else }}2017-{{ now.Year }}{{ end }} {{ .Site.Title }} 🎉</span>
|
||||
<span>·</span>
|
||||
<span>Powered by <a href="https://gohugo.io/" target="_blank">Hugo❤️️</a></span>
|
||||
</footer>
|
||||
<script src="https://cdn.bootcss.com/instantclick/3.0.1/instantclick.min.js" data-no-instant></script>
|
||||
<script data-no-instant>InstantClick.init();</script>
|
||||
|
|
Loading…
Reference in a new issue