mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-06-12 17:57:28 -05:00
Clean up directory structure of partials and .Render templates
This commit is contained in:
19
layouts/partials/post-meta-item/authors.html
Normal file
19
layouts/partials/post-meta-item/authors.html
Normal file
@ -0,0 +1,19 @@
|
||||
{{ 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 }}
|
6
layouts/partials/post-meta-item/readingtime.html
Normal file
6
layouts/partials/post-meta-item/readingtime.html
Normal file
@ -0,0 +1,6 @@
|
||||
{{ if ne .Site.Params.readingtime false }}
|
||||
<span class="post-meta-item">
|
||||
{{ partial "icon.html" "clock" }}
|
||||
{{ i18n "readingtime" .ReadingTime }}
|
||||
</span>
|
||||
{{ end }}
|
12
layouts/partials/post-meta-item/series.html
Normal file
12
layouts/partials/post-meta-item/series.html
Normal file
@ -0,0 +1,12 @@
|
||||
{{ with (.GetTerms "series") }}
|
||||
|
||||
{{ $series := slice }}
|
||||
{{ range . }}
|
||||
{{ $series = $series | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
|
||||
{{ end }}
|
||||
|
||||
<div class="series">
|
||||
{{ partial "icon.html" "files" }}
|
||||
{{ delimit $series ", " }}
|
||||
</div>
|
||||
{{ end }}
|
12
layouts/partials/post-meta-item/tags.html
Normal file
12
layouts/partials/post-meta-item/tags.html
Normal file
@ -0,0 +1,12 @@
|
||||
{{ with (.GetTerms "tags") }}
|
||||
|
||||
{{ $tags := slice }}
|
||||
{{ range . }}
|
||||
{{ $tags = $tags | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
|
||||
{{ end }}
|
||||
|
||||
<div class="tags">
|
||||
{{ partial "icon.html" "tag" }}
|
||||
{{ delimit $tags ", " }}
|
||||
</div>
|
||||
{{ end }}
|
8
layouts/partials/post-meta-item/translations.html
Normal file
8
layouts/partials/post-meta-item/translations.html
Normal file
@ -0,0 +1,8 @@
|
||||
{{ if .IsTranslated }}
|
||||
<span class="post-meta-item">
|
||||
{{ partial "icon.html" "world" }}
|
||||
{{ range .Translations }}
|
||||
<a href="{{ .Permalink }}">{{ .Language }}</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
13
layouts/partials/post-meta-item/viewsource.html
Normal file
13
layouts/partials/post-meta-item/viewsource.html
Normal file
@ -0,0 +1,13 @@
|
||||
{{ if and .Site.Params.gitFileURL .File.Path }}
|
||||
<span class="post-meta-item">
|
||||
{{ with .Site.Params.gitFileIcon }}
|
||||
{{ partial "icon.html" . }}
|
||||
{{ else }}
|
||||
{{ partial "icon.html" "file" }}
|
||||
{{ end }}
|
||||
|
||||
<a href="{{ printf "%s/content/%s" .Site.Params.gitFileURL .File.Path }}" target="_blank" rel="noopener">
|
||||
View source
|
||||
</a>
|
||||
</span>
|
||||
{{ end }}
|
Reference in New Issue
Block a user