Fix responsiveness
This commit is contained in:
parent
5614eaa564
commit
d4d9c020ea
15 changed files with 142 additions and 94 deletions
19
layouts/partials/navigators/floating-lang-selector.html
Normal file
19
layouts/partials/navigators/floating-lang-selector.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
{{ $pageURL:= .RelPermalink }}
|
||||
{{ if .Site.IsMultiLingual }}
|
||||
{{ $pageURL = strings.TrimPrefix (path.Join "/" .Language.Lang) $pageURL }}
|
||||
{{ end }}
|
||||
|
||||
<div class="dropdown languageSelector">
|
||||
<a class="btn dropdown-toggle" href="#" id="languageSelector" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<img class="flag" src="https://www.countryflags.io/{{ partial "helpers/country-code.html" .Language }}/flat/16.png">
|
||||
{{ .Site.Language.LanguageName }}
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="languageSelector">
|
||||
{{ range .Translations }}
|
||||
<a class="dropdown-item nav-link languages-item" href="{{ path.Join "/" (cond (eq .Language.Lang "en") "" .Language.Lang) $pageURL }}">
|
||||
<img class="flag" src="https://www.countryflags.io/{{ partial "helpers/country-code.html" .Language }}/flat/24.png">
|
||||
{{ .Language.LanguageName }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue