1
0

Add language parts for navbar and plamo pages.

This commit is contained in:
Kevin Matsubara 2025-12-25 16:56:45 +01:00
parent 9f42425556
commit 2c95caf2b0
6 changed files with 48 additions and 18 deletions

View File

@ -1,4 +1,10 @@
---
title: Plamo
logosub: Plamoa
language: "en"
---
<p>The word "Plamo" is a portmonteau of the words "plastic" and "modelling". It involves building and painting models and figures from historic, science-fiction and fantasy themes.</p>
<p>Here you can find my collection and notes on this hobby.</p>
$partial("templates/model-kits.html")$
$partial("templates/model-kits.html")$

9
portfolio/jp/plamo.html Normal file
View File

@ -0,0 +1,9 @@
---
title: プラモ
logosub: プラモ
language: "jp"
---
<p>JAPANESE</p>
$partial("templates/model-kits.html")$

10
portfolio/nl/plamo.html Normal file
View File

@ -0,0 +1,10 @@
---
title: Plamo
logosub: Plamo
language: "nl"
---
<p>"Plamo" is een porte-manteauwoord van de woorden "plastic" en "modelleren". Het is een hobby waarbij plastic modellen gebouwd en geschilderd worden. Het kunnen historische modellen zijn, maar ook science-fiction of fantasie modellen.</p>
<p>Hier kun je mijn collectie en notities vinden van deze hobby.</p>
$partial("templates/model-kits.html")$

View File

@ -65,28 +65,32 @@ main = hakyll $ do
>>= loadAndApplyTemplate "templates/default.html" archiveCtx
>>= relativizeUrls
create ["plamo.html"] $ do
match (fromList
[ "nl/plamo.html"
, "jp/plamo.html"
, "en/plamo.html"
]) $ do
route idRoute
compile $ do
ident <- getUnderlying
language <- getMetadataField' ident "language"
kits <- recentFirst =<< loadAll "pages/en/plamo/**"
let plamoCtx =
listField "kits" postCtx (return kits) `mappend`
constField "title" "Plamo" `mappend`
constField "logosub" "Plamo enthousiast" `mappend`
constField "language" "en" `mappend`
langDict "en" <>
listField "kits" postCtx (return kits) <>
langDict language <>
defaultContext
makeItem ""
>>= loadAndApplyTemplate "templates/plamo.html" plamoCtx
getResourceBody
>>= applyAsTemplate plamoCtx
>>= loadAndApplyTemplate "templates/default.html" plamoCtx
>>= relativizeUrls
match (fromList
[ "index.html"
, "en/index.html"
, "nl/index.html"
, "jp/index.html"
, "en/index.html"
]) $ do
route idRoute
compile $ do
@ -95,6 +99,7 @@ main = hakyll $ do
ident <- getUnderlying
language <- getMetadataField' ident "language"
-- Seven days from today.
let cutoff = addUTCTime (7 * 24 * 60 * 60) now
events <-

View File

@ -10,7 +10,7 @@
<!-- Japan -->
<div class="col d-flex justify-content-center">
<div class="card mt-2" style="width: 256px;">
<a href="/japan.html">
<a href="/$language$/japan.html">
<img src="/images/home-japan.webp" alt="thumbnail" class="card-img-top img-fluid rounded-top" >
</a>
<div class="card-body">
@ -22,7 +22,7 @@
<!-- Plamo -->
<div class="col d-flex justify-content-center">
<div class="card mt-2" style="width: 256px;">
<a href="/plamo.html">
<a href="/$language$/plamo.html">
<img src="/images/home-plamo.webp" alt="thumbnail" class="card-img-top img-fluid rounded-top" >
</a>
<div class="card-body">
@ -34,7 +34,7 @@
<!-- Radio -->
<div class="col d-flex justify-content-center">
<div class="card mt-2" style="width: 256px;">
<a href="/radio.html">
<a href="/$language$/radio.html">
<img src="/images/home-radio.webp" alt="thumbnail" class="card-img-top img-fluid rounded-top" >
</a>
<div class="card-body">
@ -46,7 +46,7 @@
<!-- Software -->
<div class="col d-flex justify-content-center">
<div class="card mt-2" style="width: 256px;">
<a href="/software.html">
<a href="/$language$/software.html">
<img src="/images/home-software.webp" alt="thumbnail" class="card-img-top img-fluid rounded-top" >
</a>
<div class="card-body">

View File

@ -9,16 +9,16 @@
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link disabled" aria-disabled="true">$title-japan$</a>
<a class="nav-link disabled" aria-disabled="true" href="/$language$/japan.html">$title-japan$</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/plamo.html">$title-plamo$</a>
<a class="nav-link" href="/$language$/plamo.html">$title-plamo$</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" aria-disabled="true">$title-radio$</a>
<a class="nav-link disabled" aria-disabled="true" href="/$language$/radio.html">$title-radio$</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" aria-disabled="true">$title-software$</a>
<a class="nav-link disabled" aria-disabled="true" href="/$language$/software.html">$title-software$</a>
</li>
<li class="nav-item dropdown">