mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-11-25 12:01:37 +01:00
layouts: post_meta as partial
This commit is contained in:
parent
3d60370494
commit
684cb2160f
@ -22,11 +22,7 @@
|
|||||||
{{- .Title | markdownify }}
|
{{- .Title | markdownify }}
|
||||||
</h3>
|
</h3>
|
||||||
<div class="archive-meta">
|
<div class="archive-meta">
|
||||||
<time>{{ .Date.Format (default "January 2, 2006" .Site.Params.DateFormat) }}</time>
|
{{- partial "post_meta.html" . -}}
|
||||||
{{- if $.Site.Params.ShowReadingTime }} ·
|
|
||||||
{{- $default_txt := print .ReadingTime " " "min" }}
|
|
||||||
{{- i18n "read_time" .ReadingTime | default $default_txt }}{{ end }}
|
|
||||||
{{- if or .Params.author .Site.Params.author }} · {{- .Params.author | default .Site.Params.author }}{{ end }}
|
|
||||||
</div>
|
</div>
|
||||||
<a class="entry-link" aria-label="post link to {{ .Title | plainify }}" href="{{ .Permalink }}"></a>
|
<a class="entry-link" aria-label="post link to {{ .Title | plainify }}" href="{{ .Permalink }}"></a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -44,11 +44,7 @@
|
|||||||
</section>
|
</section>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<footer class="entry-footer">
|
<footer class="entry-footer">
|
||||||
<time>{{ .Date.Format (default "January 2, 2006" .Site.Params.DateFormat) }}</time>
|
{{- partial "post_meta.html" . -}}
|
||||||
{{- if $.Site.Params.ShowReadingTime }} ·
|
|
||||||
{{- $default_txt := print .ReadingTime " " "min" }}
|
|
||||||
{{- i18n "read_time" .ReadingTime | default $default_txt }}{{ end }}
|
|
||||||
{{- if or .Params.author .Site.Params.author }} · {{- .Params.author | default .Site.Params.author }}{{ end }}
|
|
||||||
</footer>
|
</footer>
|
||||||
<a class="entry-link" aria-label="post link to {{ .Title | plainify }}" href="{{ .Permalink }}"></a>
|
<a class="entry-link" aria-label="post link to {{ .Title | plainify }}" href="{{ .Permalink }}"></a>
|
||||||
</article>
|
</article>
|
||||||
|
@ -8,11 +8,7 @@
|
|||||||
</h1>
|
</h1>
|
||||||
{{- if .Params.hideMeta }}{{ else }}
|
{{- if .Params.hideMeta }}{{ else }}
|
||||||
<div class="post-meta">
|
<div class="post-meta">
|
||||||
<time>{{ .Date.Format (default "January 2, 2006" .Site.Params.DateFormat) }}</time>
|
{{- partial "post_meta.html" . -}}
|
||||||
{{- if $.Site.Params.ShowReadingTime -}} ·
|
|
||||||
{{- $default_txt := print .ReadingTime " " "min" }}
|
|
||||||
{{- i18n "read_time" .ReadingTime | default $default_txt }}{{ end }}
|
|
||||||
{{- if or .Params.author .Site.Params.author }} · {{- .Params.author | default .Site.Params.author }}{{ end }}
|
|
||||||
{{- if .IsTranslated -}} |
|
{{- if .IsTranslated -}} |
|
||||||
<ul class="i18n_list">
|
<ul class="i18n_list">
|
||||||
{{- i18n "translations" | default "Translations"}}:
|
{{- i18n "translations" | default "Translations"}}:
|
||||||
|
5
layouts/partials/post_meta.html
Normal file
5
layouts/partials/post_meta.html
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<time>{{ .Date.Format (default "January 2, 2006" .Site.Params.DateFormat) }}</time>
|
||||||
|
{{- if $.Site.Params.ShowReadingTime -}} ·
|
||||||
|
{{- $default_txt := print .ReadingTime " " "min" }}
|
||||||
|
{{- i18n "read_time" .ReadingTime | default $default_txt }}{{ end }}
|
||||||
|
{{- if or .Params.author .Site.Params.author }} · {{- .Params.author | default .Site.Params.author }}{{ end }}
|
Loading…
Reference in New Issue
Block a user