1
0

Compare commits

...

4 Commits

35 changed files with 157 additions and 47 deletions

View File

@ -2,6 +2,10 @@
font-size: 0.8rem;
}
a.external::after {
content: " ↗";
}
footer {
font-size: 0.7rem;
text-align: center;

View File

@ -1,6 +1,6 @@
---
title: Plamo
logosub: Plamoa
logosub: Plamo
language: "en"
---

View File

@ -13,9 +13,6 @@ number: "5063349"
release: "2022"
manufacturer: "Bandai Spirits"
purchase_date: "2024-08-14"
purchase_store: ""
purchase_venue: ""
purchase_location: ""
---
The GAT-X370 Raider Gundam.

View File

@ -14,7 +14,6 @@ release: "2011"
manufacturer: "Bandai"
purchase_date: "??"
purchase_store: "??"
purchase_venue: ""
purchase_location: "Japan"
---

View File

@ -15,7 +15,6 @@ manufacturer: "Bandai Spirits"
purchase_date: "2025-03-10"
purchase_store: "Geeks Heaven"
purchase_venue: "Internet"
purchase_location: ""
---
The AMX-104 R-Jarja.

View File

@ -14,7 +14,6 @@ release: "2021"
manufacturer: "Bandai Spirits"
purchase_date: "2024-09-11"
purchase_store: "Gameforce"
purchase_venue: ""
purchase_location: "Eindhoven, Netherlands"
---

View File

@ -15,7 +15,6 @@ manufacturer: "Bandai Spirits"
purchase_date: "2025-10-18"
purchase_store: "Geeks Heaven"
purchase_venue: "Internet"
purchase_location: ""
---
The sassy Nobell Gundam.

View File

@ -15,7 +15,6 @@ manufacturer: "Bandai Spirits"
purchase_date: "2025-03-10"
purchase_store: "Geeks Heaven"
purchase_venue: "Internet"
purchase_location: ""
---
The ORX-005 Gaplant.

View File

@ -2,9 +2,9 @@
logosub: "Plamo"
language: "en"
title: "RX-110 Gabthley"
page: "model-kits/gundam/hg/rx-110-gabthley"
page: "model-kits/gundam/hg/gabthley"
model_name: "RX-110 Gabthley"
date: "1990-01-01"
date: "2025-12-26"
status: "Complete"
price: "€17,99"
series: "Mobile Suit Zeta Gundam"
@ -15,7 +15,29 @@ manufacturer: "Bandai Spirits"
purchase_date: "2025-03-10"
purchase_store: "Geeks Heaven"
purchase_venue: "Internet"
purchase_location: ""
---
The RX-110 Gabthley.
The RX-110 Gabthley.
<figure class="text-center">
<picture class="d-flex justify-content-center">
<source
media="(max-width: 510px)"
srcset="/images/plamo/model-kits/gundam/hg/gabthley/20251020-box-contents-w240.webp"
/>
<source
media="(max-width: 850px)"
srcset="/images/plamo/model-kits/gundam/hg/gabthley/20251020-box-contents-w480.webp"
/>
<img
src="/images/plamo/model-kits/gundam/hg/gabthley/20251020-box-contents-w800.webp"
alt="box and contents"
class="img-fluid"
/>
</picture>
<figcaption class="figure-caption mt-2">
<a href="/images/plamo/model-kits/gundam/hg/gabthley/20251020-box-contents-w800.webp">
2025-10-20 - Gabthley box and contents.
</a>
</figcaption>
</figure>

View File

@ -14,7 +14,6 @@ release: "2020"
manufacturer: "Bandai Spirits"
purchase_date: "2025-05-12"
purchase_store: "The Gundam Base"
purchase_venue: ""
purchase_location: "Tokyo, Japan"
---

View File

@ -2,7 +2,7 @@
logosub: "Plamo"
language: "en"
title: "MS-06S Zaku II"
page: "model-kits/gundam/mg/zaku-ii"
page: "model-kits/gundam/mg/zaku-2"
model_name: "MS-06S Zaku II"
date: "1990-01-01"
status: "Messing it up with putty"
@ -15,7 +15,7 @@ manufacturer: "Bandai Spirits"
purchase_date: "2025-02-07"
purchase_store: "Modelbouw krikke"
purchase_venue: "Internet"
purchase_location: ""
---
The MS-06S Zaku II.
The MS-06S Zaku II.

View File

@ -15,7 +15,7 @@ manufacturer: "Bandai Spirits"
purchase_date: "2025-11-02"
purchase_store: "Mecha Universe"
purchase_venue: "Internet"
purchase_location: ""
purchase_location: "Barcelona, Spain"
---
The MG RGM-96X JESTA.

View File

@ -15,7 +15,6 @@ manufacturer: "Bandai Spirits"
purchase_date: "2025-03-10"
purchase_store: "Geeks Heaven"
purchase_venue: "Internet"
purchase_location: ""
---
The RGZ-95 ReZEL.

View File

@ -14,7 +14,6 @@ release: "2020"
manufacturer: "Bandai Spirits"
purchase_date: "2025-05-12"
purchase_store: "The Gundam Base"
purchase_venue: ""
purchase_location: "Tokyo, Japan"
---

View File

@ -14,7 +14,6 @@ release: "2002"
manufacturer: "Bandai"
purchase_date: "2018-10-28"
purchase_store: "Joshin Store"
purchase_venue: ""
purchase_location: "Sakae, Nagoya, Japan"
---

View File

@ -14,7 +14,6 @@ release: "2021"
manufacturer: "Wave Corporation"
purchase_date: "2025-05-24"
purchase_store: "Mandarake"
purchase_venue: ""
purchase_location: "Sakae, Nagoya, Japan"
---

View File

@ -15,7 +15,6 @@ manufacturer: "Bandai Spirits"
purchase_date: "2025-03-10"
purchase_store: "Geeks Heaven"
purchase_venue: "Internet"
purchase_location: ""
---
The Acerby Type-D.

View File

@ -15,7 +15,6 @@ manufacturer: "Kotobukiya"
purchase_date: "2025-11-13"
purchase_store: "Archonia"
purchase_venue: "Internet"
purchase_location: ""
---
The player 2 ship from the game Ikaruga.

View File

@ -14,7 +14,6 @@ release: "1979"
manufacturer: "Bandai"
purchase_date: "2025-05-24"
purchase_store: "Mandarake"
purchase_venue: ""
purchase_location: "Sakae, Nagoya, Japan"
---

View File

@ -14,7 +14,6 @@ release: "2012"
manufacturer: "Bandai"
purchase_date: ""
purchase_store: "Hard off"
purchase_venue: ""
purchase_location: "Gifu, Japan"
---

View File

@ -7,7 +7,6 @@ model_name: "Daihatsu Move CX '95/SR Turbo"
date: "1990-01-01"
status: "Still in box"
price: "€18,99"
series: ""
scale: "1/24"
number: "039077"
release: "2014"

View File

@ -7,7 +7,6 @@ model_name: "Nissan March AK11 3 Door G# '99"
date: "1990-01-01"
status: "Still in box"
price: "€15,39"
series: ""
scale: "1/24"
number: "03546"
release: "2003"

View File

@ -7,7 +7,6 @@ model_name: "Nissan March izf '93"
date: "1990-01-01"
status: "Still in box"
price: "€57,00"
series: ""
scale: "1/24"
number: "03546"
release: "2003"

View File

@ -7,7 +7,6 @@ model_name: "Spähwagen Fennek"
date: "1990-01-01"
status: "Still in box"
price: "€17,28"
series: ""
scale: "1/72"
number: "03356"
release: "2024"

View File

@ -7,7 +7,6 @@ model_name: "Sd.Kfz 222 Leichter Panzerspähwagen 4x4"
date: "1990-01-01"
status: "Building"
price: "€26,00"
series: "World War 2"
scale: "1/35"
number: "35270"
release: "2003"

View File

@ -7,14 +7,12 @@ model_name: "Honda CX500 Turbo"
date: "1990-01-01"
status: "Still in box"
price: "¥2080"
series: ""
scale: "1/12"
number: "14016"
release: "2010"
manufacturer: "Tamiya"
purchase_date: "2025-05-17"
purchase_store: "Surugaya flagship store"
purchase_venue: ""
purchase_location: "Shizuoka, Japan"
---

View File

@ -7,7 +7,6 @@ model_name: "Honda Dax 125"
date: "1990-01-01"
status: "Still in box"
price: "¥3146"
series: ""
scale: "1/12"
number: "14142"
release: "2024"

View File

@ -7,7 +7,6 @@ model_name: "Lanz Bulldog D8500 mod.1938"
date: "1990-01-01"
status: "Still in box"
price: "€26,50"
series: ""
scale: "1/35"
number: "38024"
release: "2020"

View File

@ -7,7 +7,6 @@ model_name: "US army Tractor VAI with Field compaction roller"
date: "1990-01-01"
status: "Still in box"
price: "€10,00*"
series: ""
scale: "1/72"
number: "5391532331355"
release: "2024"

View File

@ -4,6 +4,7 @@ import Control.Monad (filterM)
import Data.Maybe (fromMaybe)
import Data.Monoid (mappend)
import Data.Time
import Data.Time.Format (parseTimeM, defaultTimeLocale, formatTime)
import Hakyll
@ -52,7 +53,7 @@ main = hakyll $ do
>>= loadAndApplyTemplate "templates/default.html" (postCtx language)
>>= relativizeUrls
match "pages/en/plamo/**" $ do
match "pages/*/plamo/**" $ do
route $ setExtension "html"
compile $ do
identifier <- getUnderlying
@ -60,14 +61,18 @@ main = hakyll $ do
let language = lookupString "language" metadata
let dateValue = lookupString "date" metadata
purchaseDateValue = lookupString "purchase_date" metadata
formattedPurchaseDate = maybe "" formatDate purchaseDateValue
modelKitTemplate =
if dateValue == Just "1990-01-01"
then "templates/model-kit-not-ready.html"
else "templates/model-kit.html"
extendedCtx = constField "formatted_purchase_date" formattedPurchaseDate <> (postCtx language)
pandocCompiler
>>= loadAndApplyTemplate modelKitTemplate (postCtx language)
>>= loadAndApplyTemplate "templates/default.html" (postCtx language)
>>= loadAndApplyTemplate modelKitTemplate extendedCtx
>>= loadAndApplyTemplate "templates/default.html" extendedCtx
>>= relativizeUrls
create ["archive.html"] $ do
@ -98,17 +103,20 @@ main = hakyll $ do
]) $ do
route idRoute
compile $ do
ident <- getUnderlying
kits <- recentFirst =<< loadAll "pages/en/plamo/**"
-- ident <- getUnderlying
-- language <- getMetadataField' ident "language"
identifier <- getUnderlying
metadata <- getMetadata identifier
let language = lookupString "language" metadata
let lang = fromMaybe "en" language
let urla = "pages/" ++ lang ++ "/plamo/**"
-- TODO: other language do not seem to load any kits.
kits <- recentFirst =<< loadAll (fromGlob (urla))
let plamoCtx =
listField "kits" (postCtx language) (return kits) <>
listField "kits" kitCtx (return kits) <>
langDict lang <>
defaultContext
@ -164,6 +172,12 @@ staticPageContext =
langDict "en" <>
defaultContext
formatDate :: String -> String
formatDate s =
case parseTimeM True defaultTimeLocale "%Y-%m-%d" s :: Maybe Day of
Just day -> formatTime defaultTimeLocale "%e %B %Y" day
Nothing -> s
postCtx :: Maybe String -> Context String
postCtx language =
let lang = fromMaybe "en" language
@ -173,6 +187,15 @@ postCtx language =
langDict lang <>
defaultContext
kitCtx :: Context String
kitCtx =
(field "formatted_purchase_date" $ \item -> do
metadata <- getMetadata (itemIdentifier item)
let purchaseDateValue = lookupString "purchase_date" metadata
return $ maybe "" formatDate purchaseDateValue
)
<> postCtx Nothing
isUpcoming :: UTCTime -> Item a -> Compiler Bool
isUpcoming cutoff item = do
metadata <- getMetadata (itemIdentifier item)

View File

@ -10,6 +10,18 @@
<link rel="stylesheet" href="/css/custom.css" />
</head>
<body>
<!-- Bootstrap icons. -->
<svg xmlns="http://www.w3.org/2000/svg" class="d-none">
<symbol id="check-circle-fill" viewBox="0 0 16 16">
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/>
</symbol>
<symbol id="info-fill" viewBox="0 0 16 16">
<path d="M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zm.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"/>
</symbol>
<symbol id="exclamation-triangle-fill" viewBox="0 0 16 16">
<path d="M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"/>
</symbol>
</svg>
$partial("templates/navbar.html")$

View File

@ -0,0 +1,15 @@
<article>
<section class="header">
</section>
<section>
<div class="alert alert-warning d-flex align-items-center" role="alert">
<svg class="bi flex-shrink-0 me-2" role="img" aria-label="Warning:"><use xlink:href="#exclamation-triangle-fill"/></svg>
<div>
$text-plamo-not-ready$<br/>
<a href="/$language$/plamo.html" class="alert-link">$text-plamo-back$</a>
</div>
</div>
$body$
</section>
</article>

View File

@ -0,0 +1,53 @@
<article>
<section class="header">
Posted on $date$
</section>
<section>
<hr/>
Model information
<table class="table table-striped-columns">
$if(model_name)$
<tr><td>Model</td><td>$model_name$</td></tr>
$endif$
$if(scale)$
<tr><td>Scale</td><td>$scale$</td></tr>
$endif$
$if(series)$
<tr><td>Series</td><td>$series$</td></tr>
$endif$
$if(manufacturer)$
<tr><td>Manufacturer</td><td>$manufacturer$</td></tr>
$endif$
$if(release)$
<tr><td>Release year</td><td>$release$</td></tr>
$endif$
$if(number)$
<tr>
<td>Kit number</td><td><a class="external" aria-label="scalemates dot com (opens external site in new tab)" href="https://www.scalemates.com/search.php?fkSECTION%5B%5D=All&q=$number$*" target="_blank" rel="noopener noreferrer">$number$</a></td>
</tr>
$endif$
</table>
Purchase information
<table class="table table-striped-columns">
$if(purchase_date)$
<tr><td>Date</td><td>$formatted_purchase_date$</td></tr>
$endif$
$if(price)$
<tr><td>Price</td><td>$price$</td></tr>
$endif$
$if(purchase_store)$
<tr><td>Store</td><td>$purchase_store$</td></tr>
$endif$
$if(purchase_venue)$
<tr><td>Venue</td><td>$purchase_venue$</td></tr>
$endif$
$if(purchase_location)$
<tr><td>Location</td><td>$purchase_location$</td></tr>
$endif$
</table>
$body$
</section>
</article>

View File

@ -6,13 +6,21 @@
<div class="col-md-8">
<div class="card-body">
<a href="$url$"><h5 class="card-title">$title$</h5></a>
<p class="card-text"><em class="text-body-secondary">$date$</em></p>
<p class="card-text">
$model_name$ <span class="badge rounded-pill text-bg-secondary ms-4">$scale$</span><br/>
Series: $series$<br/>
$manufacturer$, $release$ - <a href="https://www.scalemates.com/search.php?fkSECTION%5B%5D=All&q=$number$*">$number$</a><br/>
Bought at $purchase_store$ for $price$ <em>($purchase_date$)</em><br/>
$if(series)$
Series: $series$<br/>
$endif$
$manufacturer$, $release$ - <a class="external" aria-label="scalemates dot com (opens external site in new tab)" href="https://www.scalemates.com/search.php?fkSECTION%5B%5D=All&q=$number$*" target="_blank" rel="noopener noreferrer">$number$</a><br/>
$if(purchase_store)$
$if(price)$
$if(purchase_date)$
Bought at $purchase_store$ for $price$<br/><em>($formatted_purchase_date$)</em><br/>
$endif$
$endif$
$endif$
</p>
<p class="card-text"><em class="text-body-secondary">$date$</em></p>
</div>
</div>
<div class="col-md-3">