Allow overwriting country flag for a language

Signed-off-by: hossainemruz <hossainemruz@gmail.com>
This commit is contained in:
hossainemruz 2021-05-17 23:41:14 +06:00
parent 6a01c1ea4b
commit 2cde5ba6bd
2 changed files with 10 additions and 2 deletions

View file

@ -11,5 +11,13 @@
{{ $countryCode = "in" }}
{{ end }}
{{/* 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 }}
{{/* return the country code */}}
{{ return $countryCode }}

View file

@ -170,7 +170,7 @@ img.right {
.flag-icon {
width: 16px !important;
margin-top: 5px;
margin-top: 3px;
margin-right: 3px;
}