mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-12-22 12:13:19 -06:00
120 lines
3.1 KiB
HTML
120 lines
3.1 KiB
HTML
{{ define "main" }}
|
|
|
|
<h1>
|
|
{{ if eq .Data.Singular "tag" }}
|
|
{{ partial "icon.html" "tag" }}
|
|
{{ else if eq .Data.Singular "author" }}
|
|
{{ partial "icon.html" "user-circle" }}
|
|
{{ else if eq .Data.Singular "series" }}
|
|
{{ partial "icon.html" "files" }}
|
|
{{ else }}
|
|
{{ partial "icon.html" "filter" }}
|
|
{{ end }}
|
|
|
|
{{ .Title }}
|
|
|
|
{{ if eq .Kind "term" }}
|
|
<span class="rss-link">
|
|
{{ with .OutputFormats.Get "rss" }}
|
|
<a href="{{ .Permalink }}" target="_blank" rel="noopener">{{ partial "icon.html" "rss-feed" }}</a>
|
|
{{ end }}
|
|
</span>
|
|
{{ end }}
|
|
</h1>
|
|
|
|
{{ if eq .Kind "taxonomy" }}
|
|
|
|
{{ if eq .Data.Singular "series" }}
|
|
<div class="series-taxonomy">
|
|
<ul>
|
|
{{ range .Pages }}
|
|
<li>
|
|
<div class="post">
|
|
<h2 class="post-title">
|
|
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
|
|
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
|
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
|
|
</h2>
|
|
<div class="post-metadata">
|
|
{{ partial "translations-meta-item.html" . }}
|
|
|
|
{{ if ne .Site.Params.readingtime false }}
|
|
<span class="post-meta-item">
|
|
{{ partial "icon.html" "clock" }}
|
|
{{ $readingtime := 0 }}
|
|
{{ range .Data.Pages }}
|
|
{{ $readingtime = (add $readingtime .ReadingTime) }}
|
|
{{ end }}
|
|
{{ i18n "readingtime" $readingtime }}
|
|
</span>
|
|
{{ end }}
|
|
|
|
{{ partial "viewsource-meta-item.html" . }}
|
|
</div>
|
|
|
|
{{ with .Description }}
|
|
<div class="post-description">
|
|
<p>{{ . | markdownify }}</p>
|
|
</div>
|
|
{{ end }}
|
|
|
|
<div class="series-pages">
|
|
<ul>
|
|
{{ range .Data.Pages.Reverse }}
|
|
<li>{{ .Render "summary" }}</li>
|
|
{{ end }}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
</div>
|
|
{{ else }}
|
|
<div class="taxonomy">
|
|
<ul>
|
|
{{ range .Pages }}
|
|
<li>
|
|
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
</div>
|
|
{{ end }}
|
|
|
|
{{ else }}
|
|
|
|
|
|
{{ with .Description }}
|
|
<div class="term-description">
|
|
<p>{{ . | markdownify }}</p>
|
|
</div>
|
|
{{ end }}
|
|
|
|
{{ $items := .Paginator.Pages }}
|
|
{{ if eq .Data.Singular "series" }}
|
|
{{ $items = .Paginator.Pages.Reverse }}
|
|
{{ end }}
|
|
<div class="page-list">
|
|
<ul>
|
|
{{ range $items }}
|
|
<li>{{ .Render "summary" }}</li>
|
|
{{ else }}
|
|
<div>
|
|
{{ i18n "no_posts" }}
|
|
</div>
|
|
{{ end }}
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
{{ if gt .Paginator.TotalPages 1 }}
|
|
<div class="pagination">
|
|
{{ template "_internal/pagination.html" . }}
|
|
</div>
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|