1
0

Add language switcher to navbar.

This commit is contained in:
Kevin Matsubara 2025-12-23 12:42:02 +01:00
parent 8edfb17fe8
commit 9f42425556
3 changed files with 14 additions and 5 deletions

View File

@ -142,7 +142,7 @@ isUpcoming cutoff item = do
langDict :: String -> Context a langDict :: String -> Context a
langDict "nl" = langDict "nl" =
constField "welcome" "Welkom" <> constField "welcome" "Welkom op mijn website, hier plaats ik artikelen over mijn hobbies." <>
constField "switcher" "Taal" <> constField "switcher" "Taal" <>
constField "title-japan" "Japan" <> constField "title-japan" "Japan" <>
constField "title-plamo" "Plamo" <> constField "title-plamo" "Plamo" <>
@ -151,7 +151,7 @@ langDict "nl" =
mempty mempty
langDict "jp" = langDict "jp" =
constField "welcome" "ようこそ" <> constField "welcome" "私のウェブサイトへようこそ。ここでは趣味についての記事を投稿しています。" <>
constField "switcher" "言語" <> constField "switcher" "言語" <>
constField "title-japan" "日本" <> constField "title-japan" "日本" <>
constField "title-plamo" "プラモ" <> constField "title-plamo" "プラモ" <>
@ -160,7 +160,7 @@ langDict "jp" =
mempty mempty
langDict "en" = langDict "en" =
constField "welcome" "Welcome" <> constField "welcome" "Welcome to my website, here I post articles about my hobbies." <>
constField "switcher" "Language" <> constField "switcher" "Language" <>
constField "title-japan" "Japan" <> constField "title-japan" "Japan" <>
constField "title-plamo" "Plamo" <> constField "title-plamo" "Plamo" <>

View File

@ -1,7 +1,5 @@
<p>$welcome$</p> <p>$welcome$</p>
<p>This part of my website is still under construction, please excuse my mess.</p>
<hr/> <hr/>
<p class="text-center">$switcher$: <a href="/nl/index.html">Nederlands</a> | <a href="/jp/index.html">日本語</a> | <a href="/en/index.html">English</a></p> <p class="text-center">$switcher$: <a href="/nl/index.html">Nederlands</a> | <a href="/jp/index.html">日本語</a> | <a href="/en/index.html">English</a></p>

View File

@ -20,6 +20,17 @@
<li class="nav-item"> <li class="nav-item">
<a class="nav-link disabled" aria-disabled="true">$title-software$</a> <a class="nav-link disabled" aria-disabled="true">$title-software$</a>
</li> </li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
$switcher$
</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="/nl/index.html">Nederlands</a></li>
<li><a class="dropdown-item" href="/jp/index.html">日本語</a></li>
<li><a class="dropdown-item" href="/en/index.html">English</a></li>
</ul>
</li>
</ul> </ul>
</div> </div>
</div> </div>