Merge branch 'main' into main
This commit is contained in:
commit
ecb5604cdc
2 changed files with 16 additions and 12 deletions
|
@ -1,17 +1,21 @@
|
||||||
{{/* if there is no custom flag provided, we define the flag with the country code */}}
|
{{/* if there is no custom flag provided, we define the flag with the country code */}}
|
||||||
{{ $languageCode:= .Lang }}
|
{{ $languageCode:= .Lang }}
|
||||||
{{ $countryCode:= $languageCode }}
|
{{ $countryCode:= $languageCode }}
|
||||||
{{/* if the user has selected a custom flag, display it */}}
|
|
||||||
{{ if isset .Site.Params "flag" }}
|
{{/* language code and country code are not same for some countries. we need to fix them. */}}
|
||||||
{{ $countryCode = .Param "flag" }}
|
{{ if eq $languageCode "en" }}
|
||||||
{{ else }}
|
{{ $countryCode = "gb" }}
|
||||||
{{/* but some language codes dont have an equivalent country code. we need to fix them. */}}
|
{{ else if eq $languageCode "bn" }}
|
||||||
{{ if eq $languageCode "en" }}
|
{{ $countryCode = "bd" }}
|
||||||
{{ $countryCode = "gb" }}
|
{{ else if eq $languageCode "hi" }}
|
||||||
{{ else if eq $languageCode "bn" }}
|
{{ $countryCode = "in" }}
|
||||||
{{ $countryCode = "bd" }}
|
{{ end }}
|
||||||
{{ else if eq $languageCode "hi" }}
|
|
||||||
{{ $countryCode = "in" }}
|
|
||||||
|
{{/* if the user specify a country code for a language via "params.flagOverwrites" field, then use it. */}}
|
||||||
|
{{ range site.Params.flagOverwrites }}
|
||||||
|
{{ if eq $languageCode .languageCode }}
|
||||||
|
{{ $countryCode = .countryCode }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
|
@ -170,7 +170,7 @@ img.right {
|
||||||
|
|
||||||
.flag-icon {
|
.flag-icon {
|
||||||
width: 16px !important;
|
width: 16px !important;
|
||||||
margin-top: 5px;
|
margin-top: 3px;
|
||||||
margin-right: 3px;
|
margin-right: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue