mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-01-18 19:00:24 +00:00
theme: remove warnings with hugo --printI18nWarnings #670
This commit is contained in:
parent
977e4c5ab2
commit
5d5f288bbf
5 changed files with 44 additions and 8 deletions
|
@ -12,8 +12,14 @@
|
|||
{{- if and (not $color) (eq (len $color) 0) }}
|
||||
{{- $style = .style | default "transparent" }}
|
||||
{{- end }}
|
||||
{{- $title := .title | default ($style | T) | default ("Attachments-label" | T) }}
|
||||
{{- $title = trim $title " " }}
|
||||
{{- $title := .title }}
|
||||
{{- if not $title }}
|
||||
{{- if eq $style "info" }}{{ $title = $style | T }}{{ end }}
|
||||
{{- if eq $style "warning" }}{{ $title = $style | T }}{{ end }}
|
||||
{{- if eq $style "note" }}{{ $title = $style | T }}{{ end }}
|
||||
{{- if eq $style "tip" }}{{ $title = $style | T }}{{ end }}
|
||||
{{- end }}
|
||||
{{- $title = trim ($title | default ("Attachments-label" | T)) " " }}
|
||||
{{- $icon := .icon | default "" }}
|
||||
{{- if and (not $icon) (eq (len $icon) 0) }}
|
||||
{{- $icon = "paperclip" }}
|
||||
|
|
|
@ -6,7 +6,13 @@
|
|||
{{- $color := .color | default "" }}
|
||||
{{- $content := .content }}
|
||||
{{- $style := .style | default "default" }}
|
||||
{{- $title := .title | default ($style | T) }}
|
||||
{{- $title := .title }}
|
||||
{{- if not $title }}
|
||||
{{- if eq $style "info" }}{{ $title = $style | T }}{{ end }}
|
||||
{{- if eq $style "warning" }}{{ $title = $style | T }}{{ end }}
|
||||
{{- if eq $style "note" }}{{ $title = $style | T }}{{ end }}
|
||||
{{- if eq $style "tip" }}{{ $title = $style | T }}{{ end }}
|
||||
{{- end }}
|
||||
{{- $title = trim $title " " }}
|
||||
{{- $icon := .icon | default "" }}
|
||||
{{- if and (not $icon) (eq (len $icon) 0) }}
|
||||
|
|
|
@ -25,7 +25,13 @@
|
|||
{{- $target = $page.Site.Params.externalLinkTarget }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- $title := .title | default ($content) | default ($style | T) }}
|
||||
{{- $title := .title | default ($content) }}
|
||||
{{- if not $title }}
|
||||
{{- if eq $style "info" }}{{ $title = $style | T }}{{ end }}
|
||||
{{- if eq $style "warning" }}{{ $title = $style | T }}{{ end }}
|
||||
{{- if eq $style "note" }}{{ $title = $style | T }}{{ end }}
|
||||
{{- if eq $style "tip" }}{{ $title = $style | T }}{{ end }}
|
||||
{{- end }}
|
||||
{{- $title = trim $title " " }}
|
||||
{{- $icon := .icon | default "" }}
|
||||
{{- if and (not $icon) (eq (len $icon) 0) }}
|
||||
|
|
|
@ -6,7 +6,13 @@
|
|||
{{- $color := .color | default "" }}
|
||||
{{- $content := .content }}
|
||||
{{- $style := .style | default "default" }}
|
||||
{{- $title := .title | default ($style | T) }}
|
||||
{{- $title := .title }}
|
||||
{{- if not $title }}
|
||||
{{- if eq $style "info" }}{{ $title = $style | T }}{{ end }}
|
||||
{{- if eq $style "warning" }}{{ $title = $style | T }}{{ end }}
|
||||
{{- if eq $style "note" }}{{ $title = $style | T }}{{ end }}
|
||||
{{- if eq $style "tip" }}{{ $title = $style | T }}{{ end }}
|
||||
{{- end }}
|
||||
{{- $title = trim $title " " }}
|
||||
{{- $icon := .icon | default "" }}
|
||||
{{- if and (not $icon) (eq (len $icon) 0) }}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'tabs' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5180" $page.File.Path }}
|
||||
{{- end }}
|
||||
{{- $groupid := .groupid | default (partial "make-random-md5.hugo" $page) | plainify | anchorize }}
|
||||
{{- $color := .color }}
|
||||
{{- $color := .color }}
|
||||
{{- $style := .style }}
|
||||
{{- $title := .title }}
|
||||
{{- $icon := .icon }}
|
||||
|
@ -17,7 +17,13 @@
|
|||
{{- with $tab }}
|
||||
{{- $color := .color | default $color | default "" }}
|
||||
{{- $style := .style | default $style | default (cond (ne $color "") "filled" "initial") }}
|
||||
{{- $title := .title | default ($style | T) }}
|
||||
{{- $title := .title }}
|
||||
{{- if not $title }}
|
||||
{{- if eq $style "info" }}{{ $title = $style | T }}{{ end }}
|
||||
{{- if eq $style "warning" }}{{ $title = $style | T }}{{ end }}
|
||||
{{- if eq $style "note" }}{{ $title = $style | T }}{{ end }}
|
||||
{{- if eq $style "tip" }}{{ $title = $style | T }}{{ end }}
|
||||
{{- end }}
|
||||
{{- $title = trim $title " " }}
|
||||
{{- $icon := .icon | default "" }}
|
||||
{{- if and (not $icon) (eq (len $icon) 0) }}
|
||||
|
@ -42,7 +48,13 @@
|
|||
{{- end }}
|
||||
{{- $color = .color | default "" }}
|
||||
{{- $style = .style | default (cond (ne $color "") "filled" "initial") }}
|
||||
{{- $title = .title | default ($style | T) }}
|
||||
{{- $title = .title }}
|
||||
{{- if not $title }}
|
||||
{{- if eq $style "info" }}{{ $title = $style | T }}{{ end }}
|
||||
{{- if eq $style "warning" }}{{ $title = $style | T }}{{ end }}
|
||||
{{- if eq $style "note" }}{{ $title = $style | T }}{{ end }}
|
||||
{{- if eq $style "tip" }}{{ $title = $style | T }}{{ end }}
|
||||
{{- end }}
|
||||
{{- $title = trim $title " " }}
|
||||
{{- $icon = .icon | default "" }}
|
||||
{{- if and (not $icon) (eq (len $icon) 0) }}
|
||||
|
|
Loading…
Reference in a new issue