mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +00:00
parent
e619dabc51
commit
f4d9ce016b
1 changed files with 6 additions and 3 deletions
|
@ -21,9 +21,12 @@
|
|||
{{- end }}
|
||||
{{- $sort := .sort | default "asc" }}
|
||||
{{- $pattern := .pattern | default "" }}
|
||||
{{- $defaultLanguage := (index $context.Site.Home.AllTranslations 0).Lang }}
|
||||
{{- $defaultLanguagePage := index (where $context.Page.AllTranslations "Language.Lang" $defaultLanguage) 0 }}
|
||||
{{- $defaultUrlPrefix := strings.TrimRight "/" $defaultLanguagePage.RelPermalink }}
|
||||
{{- $defaultUrlPrefix := strings.TrimRight "/" $context.Page.RelPermalink }}
|
||||
{{- if .IsTranslated -}}
|
||||
{{- $defaultLanguage := (index $context.Site.Home.AllTranslations 0).Lang }}
|
||||
{{- $defaultLanguagePage := index (where $context.Page.AllTranslations "Language.Lang" $defaultLanguage) 0 }}
|
||||
{{- $defaultUrlPrefix = strings.TrimRight "/" $defaultLanguagePage.RelPermalink }}
|
||||
{{- end }}
|
||||
{{- $urlPrefix := strings.TrimRight "/" $context.Page.RelPermalink }}
|
||||
{{- with $context }}
|
||||
<div class="box attachments cstyle {{ $style }}"{{ if $color }} style="--VARIABLE-BOX-color: {{ $color }};"{{ end }}>
|
||||
|
|
Loading…
Reference in a new issue