forked from jakub/jakubb-hugo
Make sure lang switch is only on muli-lang sites + optional ensure all pages are translated
This commit is contained in:
parent
8b7d450a12
commit
9207d66049
@ -1,7 +1,6 @@
|
||||
<footer>
|
||||
<hr/>
|
||||
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a><br/>
|
||||
<a href="/contact">[ Contact ]</a> <a href="/donate">[ Donate ]</a> <a href="/donate">[ RSS ]</a> <br/>
|
||||
<a href="/{{ .Language.LanguageCode }}">{{ .Site.Title }}</a><br/>
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
|
@ -24,6 +24,10 @@
|
||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if gt (len .Site.Languages) 1 }}
|
||||
{{ if and (gt (len .Site.Languages) (len .AllTranslations)) .Site.Params.allTranslated }}
|
||||
{{ errorf "Error: %s is missing atleast 1 translation" .RelPermalink }}
|
||||
{{ end }}
|
||||
<div class="lang-switch" >
|
||||
<input class="lang-btn" type="checkbox" id="lang-btn" />
|
||||
<label class="lang-switch" for="lang-btn">
|
||||
@ -37,6 +41,7 @@
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
Loading…
Reference in New Issue
Block a user