Compare commits
No commits in common. "b43909cbcc29702ceba7f2f94c9acfe7d334ca92" and "8edfb17fe8e409c49acaf498b88539961cabe204" have entirely different histories.
b43909cbcc
...
8edfb17fe8
1
portfolio/images/.gitignore
vendored
1
portfolio/images/.gitignore
vendored
@ -1 +0,0 @@
|
||||
plamo/*
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.4 KiB |
@ -1,9 +0,0 @@
|
||||
---
|
||||
title: プラモ
|
||||
logosub: プラモ
|
||||
language: "jp"
|
||||
---
|
||||
|
||||
<p>JAPANESE</p>
|
||||
|
||||
$partial("templates/model-kits.html")$
|
||||
@ -1,10 +0,0 @@
|
||||
---
|
||||
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")$
|
||||
@ -1,21 +0,0 @@
|
||||
---
|
||||
logosub: "Plamo"
|
||||
language: "en"
|
||||
title: "Avia Ba-33"
|
||||
page: "model-kits/airplanes/military/avia-ba-33"
|
||||
model_name: "Avia Ba-33"
|
||||
date: "1990-01-01"
|
||||
status: "Still in box"
|
||||
price: "€11,95"
|
||||
series: ""
|
||||
scale: "1/72"
|
||||
number: "AZCZ05"
|
||||
release: "2009"
|
||||
manufacturer: "AZmodel"
|
||||
purchase_date: "2025-12-21"
|
||||
purchase_store: "Aviation Megastore"
|
||||
purchase_venue: "Internet"
|
||||
purchase_location: ""
|
||||
---
|
||||
|
||||
The Avia Ba-33.
|
||||
@ -30,60 +30,34 @@ main = hakyll $ do
|
||||
|
||||
match "posts/*" $ do
|
||||
route $ setExtension "html"
|
||||
compile $ do
|
||||
identifier <- getUnderlying
|
||||
metadata <- getMetadata identifier
|
||||
let language = lookupString "language" metadata
|
||||
|
||||
pandocCompiler
|
||||
>>= loadAndApplyTemplate "templates/post.html" (postCtx language)
|
||||
>>= loadAndApplyTemplate "templates/default.html" (postCtx language)
|
||||
compile $ pandocCompiler
|
||||
>>= loadAndApplyTemplate "templates/post.html" postCtx
|
||||
>>= loadAndApplyTemplate "templates/default.html" postCtx
|
||||
>>= relativizeUrls
|
||||
|
||||
match "events/*" $ do
|
||||
route $ setExtension "html"
|
||||
compile $ do
|
||||
identifier <- getUnderlying
|
||||
metadata <- getMetadata identifier
|
||||
let language = lookupString "language" metadata
|
||||
|
||||
pandocCompiler
|
||||
>>= loadAndApplyTemplate "templates/event.html" (postCtx language)
|
||||
>>= loadAndApplyTemplate "templates/default.html" (postCtx language)
|
||||
compile $ pandocCompiler
|
||||
>>= loadAndApplyTemplate "templates/event.html" postCtx
|
||||
>>= loadAndApplyTemplate "templates/default.html" postCtx
|
||||
>>= relativizeUrls
|
||||
|
||||
match "pages/en/plamo/**" $ do
|
||||
route $ setExtension "html"
|
||||
compile $ do
|
||||
identifier <- getUnderlying
|
||||
metadata <- getMetadata identifier
|
||||
let language = lookupString "language" metadata
|
||||
|
||||
let dateValue = lookupString "date" metadata
|
||||
modelKitTemplate =
|
||||
if dateValue == Just "1990-01-01"
|
||||
then "templates/model-kit-not-ready.html"
|
||||
else "templates/model-kit.html"
|
||||
|
||||
pandocCompiler
|
||||
>>= loadAndApplyTemplate modelKitTemplate (postCtx language)
|
||||
>>= loadAndApplyTemplate "templates/default.html" (postCtx language)
|
||||
compile $ pandocCompiler
|
||||
>>= loadAndApplyTemplate "templates/post.html" postCtx
|
||||
>>= loadAndApplyTemplate "templates/default.html" postCtx
|
||||
>>= relativizeUrls
|
||||
|
||||
create ["archive.html"] $ do
|
||||
route idRoute
|
||||
compile $ do
|
||||
identifier <- getUnderlying
|
||||
metadata <- getMetadata identifier
|
||||
let language = lookupString "language" metadata
|
||||
let lang = fromMaybe "en" language
|
||||
|
||||
posts <- recentFirst =<< loadAll "posts/*"
|
||||
let archiveCtx =
|
||||
listField "posts" (postCtx language) (return posts) <>
|
||||
constField "title" "Archives" <>
|
||||
constField "language" lang <>
|
||||
langDict lang <>
|
||||
listField "posts" postCtx (return posts) `mappend`
|
||||
constField "title" "Archives" `mappend`
|
||||
constField "language" "en" `mappend`
|
||||
langDict "en" <>
|
||||
defaultContext
|
||||
|
||||
makeItem ""
|
||||
@ -91,51 +65,36 @@ main = hakyll $ do
|
||||
>>= loadAndApplyTemplate "templates/default.html" archiveCtx
|
||||
>>= relativizeUrls
|
||||
|
||||
match (fromList
|
||||
[ "nl/plamo.html"
|
||||
, "jp/plamo.html"
|
||||
, "en/plamo.html"
|
||||
]) $ do
|
||||
create ["plamo.html"] $ do
|
||||
route idRoute
|
||||
compile $ do
|
||||
ident <- getUnderlying
|
||||
kits <- recentFirst =<< loadAll "pages/en/plamo/**"
|
||||
|
||||
-- language <- getMetadataField' ident "language"
|
||||
identifier <- getUnderlying
|
||||
metadata <- getMetadata identifier
|
||||
let language = lookupString "language" metadata
|
||||
let lang = fromMaybe "en" language
|
||||
|
||||
let plamoCtx =
|
||||
listField "kits" (postCtx language) (return kits) <>
|
||||
langDict lang <>
|
||||
listField "kits" postCtx (return kits) `mappend`
|
||||
constField "title" "Plamo" `mappend`
|
||||
constField "logosub" "Plamo enthousiast" `mappend`
|
||||
constField "language" "en" `mappend`
|
||||
langDict "en" <>
|
||||
defaultContext
|
||||
|
||||
getResourceBody
|
||||
>>= applyAsTemplate plamoCtx
|
||||
makeItem ""
|
||||
>>= loadAndApplyTemplate "templates/plamo.html" 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
|
||||
posts <- recentFirst =<< loadAll "posts/*"
|
||||
now <- unsafeCompiler getCurrentTime
|
||||
ident <- getUnderlying
|
||||
--language <- getMetadataField' ident "language"
|
||||
language <- getMetadataField' ident "language"
|
||||
|
||||
identifier <- getUnderlying
|
||||
metadata <- getMetadata identifier
|
||||
let language = lookupString "language" metadata
|
||||
let lang = fromMaybe "en" language
|
||||
|
||||
-- Seven days from today.
|
||||
let cutoff = addUTCTime (7 * 24 * 60 * 60) now
|
||||
|
||||
events <-
|
||||
@ -145,9 +104,9 @@ main = hakyll $ do
|
||||
|
||||
let indexCtx =
|
||||
-- (<> is the modern version of `mappend`.)
|
||||
listField "posts" (postCtx language) (return posts) <>
|
||||
listField "events" (postCtx language) (return events) <>
|
||||
langDict lang <>
|
||||
listField "posts" postCtx (return posts) <>
|
||||
listField "events" postCtx (return events) <>
|
||||
langDict language <>
|
||||
defaultContext
|
||||
|
||||
getResourceBody
|
||||
@ -164,13 +123,11 @@ staticPageContext =
|
||||
langDict "en" <>
|
||||
defaultContext
|
||||
|
||||
postCtx :: Maybe String -> Context String
|
||||
postCtx language =
|
||||
let lang = fromMaybe "en" language
|
||||
in
|
||||
dateField "date" "%e %B %Y" <>
|
||||
constField "language" lang <>
|
||||
langDict lang <>
|
||||
postCtx :: Context String
|
||||
postCtx =
|
||||
dateField "date" "%e %B %Y" `mappend`
|
||||
constField "language" "en" `mappend`
|
||||
langDict "en" <>
|
||||
defaultContext
|
||||
|
||||
isUpcoming :: UTCTime -> Item a -> Compiler Bool
|
||||
@ -185,36 +142,30 @@ isUpcoming cutoff item = do
|
||||
|
||||
langDict :: String -> Context a
|
||||
langDict "nl" =
|
||||
constField "welcome" "Welkom op mijn website, hier plaats ik artikelen over mijn hobbies." <>
|
||||
constField "welcome" "Welkom" <>
|
||||
constField "switcher" "Taal" <>
|
||||
constField "title-japan" "Japan" <>
|
||||
constField "title-plamo" "Plamo" <>
|
||||
constField "title-radio" "Radio" <>
|
||||
constField "title-software" "Software" <>
|
||||
constField "text-plamo-not-ready" "Deze model-kit heeft nog geen gepubliceerd werk." <>
|
||||
constField "text-plamo-back" "Terug naar plamo kits" <>
|
||||
mempty
|
||||
|
||||
langDict "jp" =
|
||||
constField "welcome" "私のウェブサイトへようこそ。ここでは趣味についての記事を投稿しています。" <>
|
||||
constField "welcome" "ようこそ" <>
|
||||
constField "switcher" "言語" <>
|
||||
constField "title-japan" "日本" <>
|
||||
constField "title-plamo" "プラモ" <>
|
||||
constField "title-radio" "ラジオ" <>
|
||||
constField "title-software" "ソフトウェア" <>
|
||||
constField "text-plamo-not-ready" "この模型キットには、まだ制作例が公開されていません。" <>
|
||||
constField "text-plamo-back" "プラモデルキットに戻る" <>
|
||||
mempty
|
||||
|
||||
langDict "en" =
|
||||
constField "welcome" "Welcome to my website, here I post articles about my hobbies." <>
|
||||
constField "welcome" "Welcome" <>
|
||||
constField "switcher" "Language" <>
|
||||
constField "title-japan" "Japan" <>
|
||||
constField "title-plamo" "Plamo" <>
|
||||
constField "title-radio" "Radio" <>
|
||||
constField "title-software" "Software" <>
|
||||
constField "text-plamo-not-ready" "This model kit has no work published for it yet." <>
|
||||
constField "text-plamo-back" "Back to plamo kits" <>
|
||||
mempty
|
||||
|
||||
langDict _ = mempty
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
<p>$welcome$</p>
|
||||
|
||||
<p>This part of my website is still under construction, please excuse my mess.</p>
|
||||
|
||||
<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>
|
||||
@ -10,7 +12,7 @@
|
||||
<!-- Japan -->
|
||||
<div class="col d-flex justify-content-center">
|
||||
<div class="card mt-2" style="width: 256px;">
|
||||
<a href="/$language$/japan.html">
|
||||
<a href="/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 +24,7 @@
|
||||
<!-- Plamo -->
|
||||
<div class="col d-flex justify-content-center">
|
||||
<div class="card mt-2" style="width: 256px;">
|
||||
<a href="/$language$/plamo.html">
|
||||
<a href="/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 +36,7 @@
|
||||
<!-- Radio -->
|
||||
<div class="col d-flex justify-content-center">
|
||||
<div class="card mt-2" style="width: 256px;">
|
||||
<a href="/$language$/radio.html">
|
||||
<a href="/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 +48,7 @@
|
||||
<!-- Software -->
|
||||
<div class="col d-flex justify-content-center">
|
||||
<div class="card mt-2" style="width: 256px;">
|
||||
<a href="/$language$/software.html">
|
||||
<a href="/software.html">
|
||||
<img src="/images/home-software.webp" alt="thumbnail" class="card-img-top img-fluid rounded-top" >
|
||||
</a>
|
||||
<div class="card-body">
|
||||
|
||||
@ -9,27 +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" href="/$language$/japan.html">$title-japan$</a>
|
||||
<a class="nav-link disabled" aria-disabled="true">$title-japan$</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/$language$/plamo.html">$title-plamo$</a>
|
||||
<a class="nav-link" href="/plamo.html">$title-plamo$</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link disabled" aria-disabled="true" href="/$language$/radio.html">$title-radio$</a>
|
||||
<a class="nav-link disabled" aria-disabled="true">$title-radio$</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link disabled" aria-disabled="true" href="/$language$/software.html">$title-software$</a>
|
||||
</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>
|
||||
<a class="nav-link disabled" aria-disabled="true">$title-software$</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -1,9 +1,3 @@
|
||||
---
|
||||
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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user