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>
|
<footer>
|
||||||
<hr/>
|
<hr/>
|
||||||
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a><br/>
|
<a href="/{{ .Language.LanguageCode }}">{{ .Site.Title }}</a><br/>
|
||||||
<a href="/contact">[ Contact ]</a> <a href="/donate">[ Donate ]</a> <a href="/donate">[ RSS ]</a> <br/>
|
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -24,6 +24,10 @@
|
|||||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ 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" >
|
<div class="lang-switch" >
|
||||||
<input class="lang-btn" type="checkbox" id="lang-btn" />
|
<input class="lang-btn" type="checkbox" id="lang-btn" />
|
||||||
<label class="lang-switch" for="lang-btn">
|
<label class="lang-switch" for="lang-btn">
|
||||||
@ -37,6 +41,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
Loading…
Reference in New Issue
Block a user