mirror of
https://github.com/McShelby/hugo-theme-relearn
synced 2025-04-30 18:37:05 +08:00
theme: remove warnings with hugo --printI18nWarnings #670
This commit is contained in:
parent
977e4c5ab2
commit
5d5f288bbf
@ -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) }}
|
||||
|
@ -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…
x
Reference in New Issue
Block a user