Using yaml in data to organize home summary

This commit is contained in:
Hugo Martin 2020-08-04 22:50:11 +02:00 committed by Emruz Hossain
parent b927522a0f
commit e9af2f70d2
6 changed files with 16 additions and 10 deletions

View file

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