完工所有页面
This commit is contained in:
1 parent
a216eeb04b
commit
1ccca963f2
5 files changed
+192
-21
No files matched your search
@@ -0,0 +1,42 @@
|
||||
{{ define "main" }}
|
||||
<div id="pjax-container">
|
||||
{{/* <h1 class="post-title">{{ .Title }}</h1> */}}
|
||||
<div class="post-content" style="list-style-type: none;">
|
||||
{{ $currentYear := 0 }}
|
||||
{{ $currentMonth := 0 }}
|
||||
{{ range .Site.RegularPages }}
|
||||
{{ if eq .Type "post" }}
|
||||
{{ $year := .Date.Year }}
|
||||
{{ $month := .Date.Month }}
|
||||
{{ if ne $year $currentYear }}
|
||||
{{ with $currentYear }} {{ if ne $currentYear 0 }} </div> {{ end }} {{ end }}
|
||||
<div class="link-title a-title" uk-scrollspy="cls: uk-animation-slide-left-medium; repeat: false">
|
||||
<span>{{ $year }}</span>
|
||||
</div>
|
||||
{{ $currentYear = $year }}
|
||||
{{ $currentMonth = 0 }}
|
||||
{{ end }}
|
||||
{{ if ne $month $currentMonth }}
|
||||
{{ with $currentMonth }} {{ if ne $currentMonth 0 }}
|
||||
</div> {{ end }} {{ end }}
|
||||
<h3 class="diy-h3" uk-scrollspy="cls: uk-animation-slide-right-medium; repeat: false" data-toggle="collapse"
|
||||
data-target="#collapse{{ $year }}{{ printf " %02d" $month }}" aria-expanded="false"
|
||||
aria-controls="collapse{{ $year }}{{ printf " %02d" $month }}">
|
||||
{{ $month | printf "%02d" }}月
|
||||
</h3>
|
||||
<div class="collapse" id="collapse{{ $year }}{{ printf " %02d" $month }}"
|
||||
uk-scrollspy="cls: uk-animation-slide-right-medium; repeat: false">
|
||||
{{ $currentMonth = $month }}
|
||||
{{ end }}
|
||||
<li data-date="{{ $year }}{{ printf " %02d" $month }}{{ .Date.Day }}">
|
||||
<span class="articles_date_time">{{ .Date.Format "01/02" }}</span>
|
||||
<a class="a-archives" uk-scrollspy="cls: uk-animation-slide-left-medium; repeat: false"
|
||||
href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if ne $currentMonth 0 }}
|
||||
</div> {{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
Reference in new issue
Block a user