mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-12-22 20:23:18 -06:00
BBaoVanC
b03fc6c7b1
- Use a <ul>: better accessibility - Background for individual pages in the list, giving a better feeling of separation - Support "series" taxonomy (displayed oldest to newest)
98 lines
2.8 KiB
HTML
98 lines
2.8 KiB
HTML
{{ if or .Date .IsTranslated .Site.Params.wordcount .Site.Params.readingtime .Site.Params.repoURL }}
|
|
<div class="post-metadata">
|
|
{{ if .Date }}
|
|
<span class="post-meta-item">
|
|
{{ partial "icon.html" "calendar" }}
|
|
<time datetime="{{ .Date.Format "January 2, 2006" }}" pubdate>
|
|
{{ i18n "long_date" (dict "Date" .Date "Data" .Site.Data) }}
|
|
</time>
|
|
</span>
|
|
|
|
{{ $gitinfo := false }}
|
|
{{ with .GitInfo }}
|
|
{{ $gitinfo = true }}
|
|
{{ end }}
|
|
|
|
{{/* TODO: make this be a tooltip */}}
|
|
{{ if ne (time.Format "2006-01-02" .Lastmod) (time.Format "2006-01-02" .Date) }}
|
|
<span class="post-meta-item">
|
|
{{ partial "icon.html" "pencil" }}
|
|
<time datetime="{{ .Lastmod.Format "2006-01-02" }}" pubdate>
|
|
{{ i18n "long_date" (dict "Date" .Lastmod "Data" .Site.Data) }}
|
|
</time>
|
|
{{ end }}
|
|
</span>
|
|
{{ end }}
|
|
|
|
{{ with .Params.authors }}
|
|
<span class="post-meta-item">
|
|
{{ partial "icon.html" "user-circle" }}
|
|
|
|
{{ if index $.Site.Taxonomies "authors" }}
|
|
|
|
{{ $authors := slice }}
|
|
{{ range . }}
|
|
{{ $url := (printf "/authors/%s" (. | anchorize)) | absLangURL }}
|
|
{{ $authors = $authors | append (printf `<a href="%s">%s</a>` $url . | safeHTML) }}
|
|
{{ end }}
|
|
{{ delimit $authors ", " }}
|
|
|
|
{{ else }}
|
|
{{ delimit . ", " }}
|
|
|
|
{{ end }}
|
|
</span>
|
|
{{ end }}
|
|
|
|
{{ if .IsTranslated }}
|
|
<span class="post-meta-item">
|
|
{{ partial "icon.html" "world" }}
|
|
{{ range .Translations }}
|
|
<a href="{{ .Permalink }}">{{ .Language }}</a>
|
|
{{ end }}
|
|
</span>
|
|
{{ end }}
|
|
|
|
{{ if ne .Site.Params.readingtime false }}
|
|
<span class="post-meta-item">
|
|
{{ partial "icon.html" "clock" }}
|
|
{{ i18n "readingtime" .ReadingTime }}
|
|
</span>
|
|
{{ end }}
|
|
|
|
{{ with .Site.Params.gitFileURL }}
|
|
<span class="post-meta-item">
|
|
{{ with $.Site.Params.gitFileIcon }}
|
|
{{ partial "icon.html" . }}
|
|
{{ else }}
|
|
{{ partial "icon.html" "file" }}
|
|
{{ end }}
|
|
|
|
<a href="{{ printf "%s/content/%s" . $.File.Path }}" target="_blank" rel="noopener">
|
|
View source
|
|
</a>
|
|
</span>
|
|
{{ end }}
|
|
|
|
{{ with .Params.series }}
|
|
<div class="series">
|
|
{{ range ($.GetTerms "series") }}
|
|
<span class="post-meta-item">
|
|
{{ partial "icon.html" "files" }}
|
|
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
|
|
</span>
|
|
{{ end }}
|
|
</div>
|
|
{{ end }}
|
|
|
|
<div class="tags">
|
|
{{ range (.GetTerms "tags") }}
|
|
<span class="post-meta-item">
|
|
{{ partial "icon.html" "tag" }}
|
|
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
|
|
</span>
|
|
{{ end }}
|
|
</div>
|
|
</div>
|
|
{{ end }}
|