summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormms <michal@sapka.me>2023-11-29 11:39:18 +0100
committermms <michal@sapka.me>2023-11-29 11:39:18 +0100
commitc595e8349e47306668bf7abf84499f59ed23a2c0 (patch)
treeebd62d5a150aacfac7590812371187f90d361cd3
parent946c12e6b1ee831120fbaf77c2d2ac0ca6433b79 (diff)
feat: move topnav into header
-rw-r--r--content/_index.md3
-rw-r--r--content/star-trek/home.md2
-rw-r--r--layouts/_default/baseof.html7
-rw-r--r--layouts/_default/single.html2
-rw-r--r--layouts/partials/back_nav.html9
-rw-r--r--static/style.css42
6 files changed, 45 insertions, 20 deletions
diff --git a/content/_index.md b/content/_index.md
index 5911cf3..e88d651 100644
--- a/content/_index.md
+++ b/content/_index.md
@@ -1,8 +1,9 @@
---
-title: ""
+title: "Michal's Sapka Webpage"
date: 2022-12-28T23:42:51+01:00
draft: false
tags: []
category: msw
+noback: true
---
diff --git a/content/star-trek/home.md b/content/star-trek/home.md
index 7f6d8d8..59ec25c 100644
--- a/content/star-trek/home.md
+++ b/content/star-trek/home.md
@@ -1,5 +1,5 @@
---
-title: "MichaƂ's Star Trek Fan Site"
+title: "Space Cadet Log Home"
category: star-trek
abstract:
type: special
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index c05e72b..a1395ad 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -63,10 +63,8 @@
<div class="name">
<nav>
- <h1>{{partial "site-name" . }}</h1>
- {{ if not (in .Page.Params.category "msw") }}
- <a href="/">Part of MSW</a>
- {{ end }}
+ <h1>{{ .Page.Title }}</h1>
+ {{ partial "back_nav" . }}
</nav>
</div>
</header>
@@ -74,7 +72,6 @@
<main class="right-column">
- {{ partial "back_nav" . }}
{{ block "main" . }}
{{ end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 53f7f35..5886803 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,6 +1,6 @@
{{ define "main" }}
<article>
- <h2>{{ .Page.Title }}</h2>
+ <br>
{{- if not (eq .Page.Type "special") }}
{{ if in .Page.Params.category "star-trek" }}
Earthdate
diff --git a/layouts/partials/back_nav.html b/layouts/partials/back_nav.html
index d900a08..59698dd 100644
--- a/layouts/partials/back_nav.html
+++ b/layouts/partials/back_nav.html
@@ -1,6 +1,7 @@
+{{ if not .Page.Params.noback }}
<nav class="back-link">
{{ if .Page.Params.hardback }}
- <a href="/">&larr; back to MSW</a>
+ <a href="/">&larr; back to Homepage</a>
{{ else if in .Page.Params.category "star-trek" }}
<a href="/star-trek/">&larr; back to Space Cadet Log</a>
{{ else if in .Page.Params.Category "site-info" }}
@@ -8,4 +9,10 @@
{{ else if in .Page.Params.Category "bsd" }}
<a href="/bsd/">&larr; Back to Demonic BSD Site</a>
{{ end }}
+
+{{ if not .Page.Params.hardback }}
+ <br>
+ <a href="/">&#x219e; back to Homepage</a>
+{{ end }}
</nav>
+{{ end }}
diff --git a/static/style.css b/static/style.css
index f50b4bc..545bbf9 100644
--- a/static/style.css
+++ b/static/style.css
@@ -21,18 +21,23 @@
--font-size: 1.2em;
--mobile-font-size: 1hem;
- --h1-size: 1.2em;
--header-font-size: 0.9em;
--site-font: monospace;
--header-font: arial;
- --star-trek-logo-bg-color: #3e7dc0;
+ --star-trek-highlight-color: #3e7dc0;
+ --star-trek-logo-bg-color: var(--star-trek-highlight-color);
+ --star-trek-1-color: var(--star-trek-highlight-color);
- --site-info-logo-bg-color: #9ba89a;
+ --site-info-hightlight-color: #9ba89a;
+ --site-info-logo-bg-color: var(--site-info-hightlight-color);
+ --site-info-h1-color: var(--site-info-hightlight-color);
- --bsd-logo-bg-color: #ab2b28;
+ --bsd-highlight-color: #ab2b28;
+ --bsd-logo-bg-color: var(--bsd-highlight-color);
+ --bsd-h1-color: var(--bsd-highlight-color);
}
@media (prefers-color-scheme: dark) {
@@ -128,24 +133,41 @@ header > .name {
header > .name > nav {
position: absolute;
- bottom: 0px;
+ bottom: -10px;
padding: 10px;
-
}
h1 {
font-size: inherit;
margin: 0;
+ text-decoration: none;
}
+/* - star trek */
body.star-trek > header > .logo {
background-color: var(--star-trek-logo-bg-color);
}
+body.star-trek > header > .logo > img.stbadge {
+ position: absolute;
+ bottom: -12px;
+ right: -6px;
+ transform: scale(0.8);
+}
+
+body.star-trek h1{
+ color: var(--star-trek-1-color);
+}
+
+/* site-info */
body.site-info > header > .logo {
background-color: var(--site-info-logo-bg-color);
}
+body.site-info h1{
+ color: var(--site-info-h1-color);
+}
+/* bsd */
body.bsd > header > .logo {
background-color: var(--bsd-logo-bg-color);
}
@@ -157,12 +179,10 @@ body.bsd > header > .logo > img.beastie {
transform: scale(1.1);
}
-body.star-trek > header > .logo > img.stbadge {
- position: absolute;
- bottom: -12px;
- right: -6px;
- transform: scale(0.8);
+body.bsd h1 {
+ color: var(--bsd-h1-color);
}
+
/* ---------- Main */
main {
margin-top: 30px;