Language switcher CSS
This commit is contained in:
parent
6905877e36
commit
bbee27caa9
2 changed files with 51 additions and 2 deletions
|
@ -598,6 +598,50 @@ h1 {
|
||||||
.locales {
|
.locales {
|
||||||
float: left;
|
float: left;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
padding-left: 1em;
|
||||||
|
padding-top: 1em;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.locales a,
|
||||||
|
.locales a:visited {
|
||||||
|
text-decoration: none;
|
||||||
|
color: #737881;
|
||||||
|
}
|
||||||
|
|
||||||
|
.supportedLocales {
|
||||||
|
display: none;
|
||||||
|
list-style-type: none;
|
||||||
|
padding-left: 0;
|
||||||
|
background-color: #f5f5f6;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.supportedLocales li {
|
||||||
|
border-bottom: thin solid #ebebeb;
|
||||||
|
}
|
||||||
|
|
||||||
|
.supportedLocales li a {
|
||||||
|
padding: 1em;
|
||||||
|
padding-right: 2em;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.supportedLocales li:hover {
|
||||||
|
background-color: #ECECEC;
|
||||||
|
}
|
||||||
|
|
||||||
|
.localesBtn {
|
||||||
|
padding: 1em;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.localesBtn:focus {
|
||||||
|
background-color: rgb(245, 245, 246);
|
||||||
|
}
|
||||||
|
|
||||||
|
.localesBtn:focus + .supportedLocales {
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 640px) {
|
@media (max-width: 640px) {
|
||||||
|
|
|
@ -5,11 +5,16 @@
|
||||||
<a class="facebook" href="https://www.facebook.com/sharer/sharer.php?u={base_url|urlencode}" target="_blank">{t}Share on Facebook{/t}<div class="facebookmask"></div></a>
|
<a class="facebook" href="https://www.facebook.com/sharer/sharer.php?u={base_url|urlencode}" target="_blank">{t}Share on Facebook{/t}<div class="facebookmask"></div></a>
|
||||||
</div>
|
</div>
|
||||||
{if isset($supportedLocales)}
|
{if isset($supportedLocales)}
|
||||||
<ul class="locales">
|
<div class="locales">
|
||||||
|
<a href="#" class="localesBtn">{$locale->getCountry()->getEmoji()}</a>
|
||||||
|
<ul class="supportedLocales">
|
||||||
{foreach $supportedLocales as $supportedLocale}
|
{foreach $supportedLocales as $supportedLocale}
|
||||||
|
{if $supportedLocale != $locale}
|
||||||
<li><a hreflang="{$supportedLocale->getBcp47()}" lang="{$supportedLocale->getBcp47()}" href="{path_for name='locale' data=['locale'=>$supportedLocale->getIso15897()]}">{$supportedLocale->getCountry()->getEmoji()} {$supportedLocale->getFullName()}</a></li>
|
<li><a hreflang="{$supportedLocale->getBcp47()}" lang="{$supportedLocale->getBcp47()}" href="{path_for name='locale' data=['locale'=>$supportedLocale->getIso15897()]}">{$supportedLocale->getCountry()->getEmoji()} {$supportedLocale->getFullName()}</a></li>
|
||||||
|
{/if}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</ul>
|
</ul>
|
||||||
{/if}
|
{/if}
|
||||||
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue