fixed 分类样式优化
This commit is contained in:
1 parent
f6e7021fac
commit
929305d867
3 files changed
+168
-4
No files matched your search
@@ -0,0 +1,44 @@
|
||||
{{ define "main" }}
|
||||
<div id="pjax-container">
|
||||
<article class="category-container">
|
||||
<div class="category-header">
|
||||
<h1 class="cat-title">{{ .Title }}</h1>
|
||||
<div class="cat-meta">
|
||||
<span class="cat-count">共 {{ .Data.Pages | len }} 篇文章</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="category-content" uk-scrollspy="target: > .year-group; cls: uk-animation-slide-bottom-small; delay: 100">
|
||||
{{ $paginator := .Paginate .Pages }}
|
||||
{{ range $paginator.Pages.GroupByDate "2006" }}
|
||||
<div class="year-group">
|
||||
<h2 class="year-title">{{ .Key }}</h2>
|
||||
<ul class="year-list">
|
||||
{{ range .Pages }}
|
||||
<li class="year-item">
|
||||
<span class="item-date">{{ .Date.Format "01-02" }}</span>
|
||||
<a class="item-link" href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</article>
|
||||
|
||||
{{ if gt $paginator.TotalPages 1 }}
|
||||
<ul class="pagination">
|
||||
<li class="page-item page-previous">
|
||||
{{ if $paginator.HasPrev }}
|
||||
<a class="prev" title="上一页" href="{{ $paginator.Prev.URL }}">上一页</a>
|
||||
{{ end }}
|
||||
</li>
|
||||
<li class="page-item page-next">
|
||||
{{ if $paginator.HasNext }}
|
||||
<a class="next" title="下一页" href="{{ $paginator.Next.URL }}">下一页</a>
|
||||
{{ end }}
|
||||
</li>
|
||||
</ul>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
Reference in new issue
Block a user