Skip to content

Commit ac64b01

Browse files
committed
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
1 parent dfe2f63 commit ac64b01

3 files changed

Lines changed: 10 additions & 8 deletions

File tree

layouts/partials/edit_post.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
{{- $fileUrlPath := path.Join .File.Path }}
33

44
{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated }} | {{- end -}}
5-
<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">
6-
{{- .Params.editPost.Text | default (site.Params.editPost.Text | default (i18n "edit_post" | default "Edit")) -}}
7-
</a>
5+
<span>
6+
<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">
7+
{{- .Params.editPost.Text | default (site.Params.editPost.Text | default (i18n "edit_post" | default "Edit")) -}}
8+
</a>
9+
</span>
810
{{- end }}

layouts/partials/post_meta.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
{{- end }}
66

77
{{- if (.Param "ShowReadingTime") -}}
8-
{{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime))) }}
8+
{{- $scratch.Add "meta" (slice (printf "<span>%s</span>" (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime)))) }}
99
{{- end }}
1010

1111
{{- if (.Param "ShowWordCount") -}}
12-
{{- $scratch.Add "meta" (slice (i18n "words" .WordCount | default (printf "%d words" .WordCount))) }}
12+
{{- $scratch.Add "meta" (slice (printf "<span>%s</span>" (i18n "words" .WordCount | default (printf "%d words" .WordCount)))) }}
1313
{{- end }}
1414

1515
{{- if not (.Param "hideAuthor") -}}
1616
{{- with (partial "author.html" .) }}
17-
{{- $scratch.Add "meta" (slice .) }}
17+
{{- $scratch.Add "meta" (slice (printf "<span>%s</span>" .)) }}
1818
{{- end }}
1919
{{- end }}
2020

layouts/partials/translation_list.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{{- if .IsTranslated -}}
22
{{- if (ne .Layout "search") }}
33
{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) }}&nbsp;|&nbsp;{{- end -}}
4-
{{- end }}
5-
{{- i18n "translations" | default "Translations" }}:
4+
{{- end -}}
5+
<span>{{- i18n "translations" | default "Translations" }}:</span>
66
<ul class="i18n_list">
77
{{- range .Translations }}
88
<li>

0 commit comments

Comments
 (0)