Integrating language menu CSS

This commit is contained in:
Hugo Martin 2020-08-05 20:13:16 +02:00 committed by Emruz Hossain
parent 10707b361e
commit 6bfba135e8
2 changed files with 14 additions and 3 deletions

View file

@ -66,13 +66,13 @@
<li class="nav-item"> <li class="nav-item">
{{ if .IsTranslated }} {{ if .IsTranslated }}
<ul> <ul>
<div class="dropdown nav-item"> <div class="dropdown nav-item languages-menu">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <button class="btn-dark dropdown-toggle nav-item" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="background-color: rgba(255, 255, 255, 0); color: ;">
{{ .Site.Language.LanguageName }} {{ .Site.Language.LanguageName }}
</button> </button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
{{ range $.Site.Home.AllTranslations }} {{ range $.Site.Home.AllTranslations }}
<a class="dropdown-item nav-link" href="{{ .Permalink }}"> <a class="dropdown-item nav-link languages-item" href="{{ .Permalink }}">
<img class="flag" src="https://www.countryflags.io/{{ cond (eq .Site.Language.Lang "en") "gb" .Language }}/flat/32.png"> <img class="flag" src="https://www.countryflags.io/{{ cond (eq .Site.Language.Lang "en") "gb" .Language }}/flat/32.png">
{{ .Language.LanguageName }} {{ .Language.LanguageName }}
</a> </a>

View file

@ -271,3 +271,14 @@
/* iPhone 5 or before */ /* iPhone 5 or before */
@media only screen and (max-width: 320px) { @media only screen and (max-width: 320px) {
} }
.languages-menu {
filter:alpha(opacity=50); /* Internet Explorer 6 */
-moz-opacity:0.5; /* Mozilla 1.6 et infér. */
opacity: 0.5; /* CSS3 et Mozilla récents */
padding-top: 6px;
border: 0;
}
.languages-item {
}