53 lines
2.2 KiB
HTML
53 lines
2.2 KiB
HTML
{{ define "main" }}
|
|
<div id="pjax-container">
|
|
<div class="post-content" style="list-style-type: none;" uk-scrollspy="target: .link-title; cls: uk-animation-slide-left-small; delay: 50; repeat: true">
|
|
{{ $currentYear := 0 }}
|
|
{{ $currentMonth := 0 }}
|
|
{{ range .Site.RegularPages }}
|
|
{{ if eq .Type "post" }}
|
|
{{ $year := .Date.Year }}
|
|
{{ $month := .Date.Month }}
|
|
|
|
{{ if ne $year $currentYear }}
|
|
{{ if ne $currentYear 0 }}
|
|
</div> <!-- Close previous year -->
|
|
{{ end }}
|
|
<div class="link-title a-title">
|
|
<span>{{ $year }}</span>
|
|
</div>
|
|
{{ $currentYear = $year }}
|
|
{{ $currentMonth = 0 }}
|
|
{{ end }}
|
|
|
|
{{ if ne $month $currentMonth }}
|
|
{{ if ne $currentMonth 0 }}
|
|
</div> <!-- Close previous month -->
|
|
{{ end }}
|
|
<h3 class="diy-h3" data-toggle="collapse" uk-scrollspy="cls: uk-animation-fade; delay: 100"
|
|
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="target: > li; cls: uk-animation-slide-right-small; delay: 100">
|
|
{{ $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" href="{{ .Permalink }}">{{ .Title }}</a>
|
|
</li>
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
{{ if ne $currentMonth 0 }}
|
|
</div> <!-- Close last month -->
|
|
{{ end }}
|
|
|
|
{{ if ne $currentYear 0 }}
|
|
</div> <!-- Close last year -->
|
|
{{ end }}
|
|
</div>
|
|
</div>
|
|
{{ end }}
|