Skip to content

Commit

Permalink
fix MultiLingual
Browse files Browse the repository at this point in the history
Signed-off-by: Khusika Dhamar Gusti <[email protected]>
  • Loading branch information
khusika committed Sep 17, 2024
1 parent fb0ecf3 commit edaacb8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
{{- if .Site.Menus.main -}}
<span class="menu-item delimiter"></span>
{{- end -}}
{{- if .Site.IsMultiLingual -}}
{{- if hugo.IsMultilingual -}}
<span class="menu-item language" title="{{ T "selectLanguage" }}">
{{- .Language.LanguageName -}}
<i class="fa-solid fa-chevron-right fa-fw"></i>
Expand Down Expand Up @@ -158,7 +158,7 @@
<i class="fa-solid fa-adjust fa-fw"></i>
</a>
</div>
{{- if .Site.IsMultiLingual -}}
{{- if hugo.IsMultilingual -}}
<span class="menu-item language" title="{{ T "selectLanguage" }}">
{{- .Language.LanguageName -}}
<i class="fa-solid fa-chevron-right fa-fw"></i>
Expand Down
2 changes: 1 addition & 1 deletion layouts/shortcodes/version.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{- $type := .Get 1 | default "new" | lower -}}
{{- $label := T $type -}}
{{- $color := cond (eq $type "changed") "ff9101" "00b1ff" | cond (eq $type "deleted") "ff5252" -}}
{{- $pathTemplate := cond .Site.IsMultiLingual (printf "svg/version/%%v-%%v.%v.svg" .Page.Language.Lang) "svg/version/%v-%v.svg" -}}
{{- $pathTemplate := cond hugo.IsMultilingual (printf "svg/version/%%v-%%v.%v.svg" .Page.Language.Lang) "svg/version/%v-%v.svg" -}}
{{- $path := printf $pathTemplate $version $type -}}
{{- $resource := resources.Get "svg/version.template.svg" -}}
{{- $resource = $resource | resources.ExecuteAsTemplate $path (dict "version" $version "label" $label "color" $color) | minify -}}
Expand Down

0 comments on commit edaacb8

Please sign in to comment.