1
0

Add a navbar with dynamic logo sub text and update index.

This commit is contained in:
Kevin Matsubara 2025-12-16 20:32:56 +01:00
parent 1f1cc2674a
commit 1a24e8f601
9 changed files with 51 additions and 19 deletions

View File

@ -1,5 +1,6 @@
--- ---
title: About title: About
logosub: About me
--- ---
Nullam imperdiet sodales orci vitae molestie. Nunc quam orci, pharetra a Nullam imperdiet sodales orci vitae molestie. Nunc quam orci, pharetra a
rhoncus vitae, eleifend id felis. Suspendisse potenti. Etiam vitae urna orci. rhoncus vitae, eleifend id felis. Suspendisse potenti. Etiam vitae urna orci.

View File

@ -1,5 +1,6 @@
--- ---
title: Contact title: Contact
logosub: Not very social
--- ---
I usually listen to frequency 7.442 MHz, you can try to contact me there. I usually listen to frequency 7.442 MHz, you can try to contact me there.

9
portfolio/css/custom.css Normal file
View File

@ -0,0 +1,9 @@
.logo-sub {
font-size: 0.8rem;
}
footer {
font-size: 0.7rem;
text-align: center;
padding: 15px 10px;
}

View File

@ -1,5 +1,6 @@
--- ---
title: Home title: Home
logosub: Personal weblog
--- ---
<img src="/images/haskell-logo.png" style="float: right; margin: 10px;" /> <img src="/images/haskell-logo.png" style="float: right; margin: 10px;" />

View File

@ -1,4 +1,5 @@
--- ---
logosub: Plamo
title: Kawasaki Zaku II title: Kawasaki Zaku II
page: kawasaki-zaku-ii page: kawasaki-zaku-ii
model_name: MS-06 Zaku II model_name: MS-06 Zaku II

View File

@ -1,4 +1,5 @@
--- ---
logosub: Plamo
title: SMC Gundam title: SMC Gundam
page: smc-2025-gundam page: smc-2025-gundam
model_name: RX-178 Mk.II model_name: RX-178 Mk.II

View File

@ -60,6 +60,7 @@ main = hakyll $ do
let plamoCtx = let plamoCtx =
listField "posts" postCtx (return posts) `mappend` listField "posts" postCtx (return posts) `mappend`
constField "title" "Plamo" `mappend` constField "title" "Plamo" `mappend`
constField "logosub" "Plamo enthousiast" `mappend`
defaultContext defaultContext
makeItem "" makeItem ""

View File

@ -6,34 +6,24 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Kevin Matsubara |> $title$</title> <title>Kevin Matsubara |> $title$</title>
<link rel="icon" type="image/x-icon" href="/images/icon/icon.ico"> <link rel="icon" type="image/x-icon" href="/images/icon/icon.ico">
<link rel="stylesheet" href="/css/default.css" />
<link rel="stylesheet" href="/lib/bootstrap-5.3.8-dist/css/bootstrap.min.css" /> <link rel="stylesheet" href="/lib/bootstrap-5.3.8-dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="/css/custom.css" />
</head> </head>
<body> <body>
$partial("templates/navbar.html")$
<header> <header>
<div class="logo"> <h1>$title$</h1>
<a href="/">My Hakyll Blog</a>
</div>
<div class="alert alert-primary" role="alert">
A simple primary alert—check it out!
</div>
<nav>
<a href="/">Home</a>
<a href="/plamo.html">Plamo</a>
<a href="/contact.html">Contact</a>
</nav>
</header> </header>
<main role="main"> <main role="main">
<h1>$title$</h1>
$body$ $body$
</main> </main>
<footer> <footer class="bg-body-tertiary">
Site proudly generated by Site proudly generated by
<a href="http://jaspervdj.be/hakyll" target="_blank" rel="noopener noreferrer">Hakyll</a>, using <a href="https://www.docker.com/" target="_blank" rel="noopener noreferrer">Docker</a> containers with <a href="https://www.nginx.com/" target="_blank" rel="noopener noreferrer">Nginx</a> on a <a href="https://www.strato.nl/server/vps-linux/" target="_blank" rel="noopener noreferrer">Strato<la> VPS. <a href="http://jaspervdj.be/hakyll" target="_blank" rel="noopener noreferrer">Hakyll</a> and <a href="https://getbootstrap.com/" target="_blank" rel="noopener noreferrer">Bootstrap</a>, using <a href="https://www.docker.com/" target="_blank" rel="noopener noreferrer">Docker</a> containers with <a href="https://www.nginx.com/" target="_blank" rel="noopener noreferrer">Nginx</a> on a <a href="https://www.strato.nl/server/vps-linux/" target="_blank" rel="noopener noreferrer">Strato<la> VPS.
</footer> </footer>
</body> </body>

View File

@ -0,0 +1,27 @@
<nav class="navbar navbar-expand-lg bg-body-tertiary">
<div class="container-fluid">
<a class="navbar-brand" href="/index.html">Kevin Matsubara<br/>
<span class='logo-sub'>|&gt;&nbsp;&nbsp; $if(logosub)$ $logosub$ $else$ Personal website $endif$</span></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<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">Japan</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/plamo.html">Plamo</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" aria-disabled="true">Radio</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" aria-disabled="true">Software</a>
</li>
</ul>
</div>
</div>
</nav>