Refonte de la navigation en français et amélioration de la redirection linguistique
This commit is contained in:
@@ -7,7 +7,11 @@
|
||||
{{ $pageLink := replace (replace $context.RelPermalink (add $pageLang "/") "") $base.Path "/" }}
|
||||
|
||||
{{ if $context.IsTranslated }}
|
||||
<select class="{{ $class }} lang-select" onchange="location = this.value">
|
||||
<select class="{{ $class }} lang-select" onchange="(function(sel){
|
||||
var lang = sel.value.split('/')[1];
|
||||
localStorage.setItem('preferredLang', lang);
|
||||
location = sel.value;
|
||||
})(this)">
|
||||
{{ range $siteLanguages }}
|
||||
{{ if eq (string $pageLang) (string .Language) }}
|
||||
<option
|
||||
|
||||
Reference in New Issue
Block a user