mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2025-09-28 09:22:34 +02:00
fix(translation_list): wrap translation label in a span for better styling
fix(post_meta): add span tags for reading time, word count, and author metadata fix(edit_post): wrap edit link in a span for consistent styling
This commit is contained in:
@@ -2,7 +2,9 @@
|
|||||||
{{- $fileUrlPath := path.Join .File.Path }}
|
{{- $fileUrlPath := path.Join .File.Path }}
|
||||||
|
|
||||||
{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated }} | {{- end -}}
|
{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated }} | {{- end -}}
|
||||||
<a href="{{ .Params.editPost.URL | default site.Params.editPost.URL }}{{ if .Params.editPost.appendFilePath | default ( site.Params.editPost.appendFilePath | default false ) }}/{{ $fileUrlPath }}{{ end }}" rel="noopener noreferrer edit" target="_blank">
|
<span>
|
||||||
{{- .Params.editPost.Text | default (site.Params.editPost.Text | default (i18n "edit_post" | default "Edit")) -}}
|
<a href="{{ .Params.editPost.URL | default site.Params.editPost.URL }}{{ if .Params.editPost.appendFilePath | default ( site.Params.editPost.appendFilePath | default false ) }}/{{ $fileUrlPath }}{{ end }}" rel="noopener noreferrer edit" target="_blank">
|
||||||
</a>
|
{{- .Params.editPost.Text | default (site.Params.editPost.Text | default (i18n "edit_post" | default "Edit")) -}}
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@@ -5,16 +5,16 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if (.Param "ShowReadingTime") -}}
|
{{- if (.Param "ShowReadingTime") -}}
|
||||||
{{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime))) }}
|
{{- $scratch.Add "meta" (slice (printf "<span>%s</span>" (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime)))) }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if (.Param "ShowWordCount") -}}
|
{{- if (.Param "ShowWordCount") -}}
|
||||||
{{- $scratch.Add "meta" (slice (i18n "words" .WordCount | default (printf "%d words" .WordCount))) }}
|
{{- $scratch.Add "meta" (slice (printf "<span>%s</span>" (i18n "words" .WordCount | default (printf "%d words" .WordCount)))) }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if not (.Param "hideAuthor") -}}
|
{{- if not (.Param "hideAuthor") -}}
|
||||||
{{- with (partial "author.html" .) }}
|
{{- with (partial "author.html" .) }}
|
||||||
{{- $scratch.Add "meta" (slice .) }}
|
{{- $scratch.Add "meta" (slice (printf "<span>%s</span>" .)) }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
{{- if .IsTranslated -}}
|
{{- if .IsTranslated -}}
|
||||||
{{- if (ne .Layout "search") }}
|
{{- if (ne .Layout "search") }}
|
||||||
{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) }} | {{- end -}}
|
{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) }} | {{- end -}}
|
||||||
{{- end }}
|
{{- end -}}
|
||||||
{{- i18n "translations" | default "Translations" }}:
|
<span>{{- i18n "translations" | default "Translations" }}:</span>
|
||||||
<ul class="i18n_list">
|
<ul class="i18n_list">
|
||||||
{{- range .Translations }}
|
{{- range .Translations }}
|
||||||
<li>
|
<li>
|
||||||
|
Reference in New Issue
Block a user