Moving language menu into its own file for easier updating.

This commit is contained in:
Jocelyn Badgley (Twipped) 2022-03-03 16:33:04 -08:00
parent 25cd86590f
commit ba44eeb09e
2 changed files with 8 additions and 7 deletions

View File

@ -0,0 +1,7 @@
<div class="dropdown-menu" aria-labelledby="nav-gdb">
<a href="/en/" class="{{#is page.lang 'en'}}active {{/is}}dropdown-item">English</a>
<a href="/zh/" class="{{#is page.lang 'zh'}}active {{/is}}dropdown-item">中文 (Chinese)</a>
<a href="/de/" class="{{#is page.lang 'de'}}active {{/is}}dropdown-item">Deutsch (German)</a>
<a href="/hu/" class="{{#is page.lang 'hu'}}active {{/is}}dropdown-item">Magyar (Hungarian)</a>
<a href="/pl/" class="{{#is page.lang 'pl'}}active {{/is}}dropdown-item">polski (Polish)</a>
</div>

View File

@ -66,13 +66,7 @@
<li>{{import (join [ '/public/' page.lang '/_menu' ] "")}}</li> <li>{{import (join [ '/public/' page.lang '/_menu' ] "")}}</li>
<li> <li>
<a href="/en/" class="top-nav-item dropdown-toggle" id="nav-lang" data-toggle="dropdown" data-flip="false" aria-haspopup="true" aria-expanded="false">{{lang 'MENU_LANGUAGE'}}</a> <a href="/en/" class="top-nav-item dropdown-toggle" id="nav-lang" data-toggle="dropdown" data-flip="false" aria-haspopup="true" aria-expanded="false">{{lang 'MENU_LANGUAGE'}}</a>
<div class="dropdown-menu" aria-labelledby="nav-gdb"> {{import "~/language-menu"}}
<a href="/en/" class="{{#is page.lang 'en'}}active {{/is}}dropdown-item">English</a>
<a href="/zh/" class="{{#is page.lang 'zh'}}active {{/is}}dropdown-item">中文 (Chinese)</a>
<a href="/de/" class="{{#is page.lang 'de'}}active {{/is}}dropdown-item">Deutsch (German)</a>
<a href="/hu/" class="{{#is page.lang 'hu'}}active {{/is}}dropdown-item">Magyar (Hungarian)</a>
<a href="/pl/" class="{{#is page.lang 'pl'}}active {{/is}}dropdown-item">polski (Polish)</a>
</div>
</li> </li>
<li><a href="/tweets/" class="top-nav-item" title="{{{lang 'TRANS_TWITTER_TOPICS'}}}"><img src="/images/transtwitter.png" width="24" height="24" alt=""></a></li> <li><a href="/tweets/" class="top-nav-item" title="{{{lang 'TRANS_TWITTER_TOPICS'}}}"><img src="/images/transtwitter.png" width="24" height="24" alt=""></a></li>
<li class="disposable"><a href="https://github.com/GenderDysphoria/GenderDysphoria.fyi" class="top-nav-item">{{icon 'brands/github'}}</a></li> <li class="disposable"><a href="https://github.com/GenderDysphoria/GenderDysphoria.fyi" class="top-nav-item">{{icon 'brands/github'}}</a></li>