diff options
author | mms <michal@sapka.me> | 2023-11-28 13:11:45 +0100 |
---|---|---|
committer | mms <michal@sapka.me> | 2023-11-28 13:11:45 +0100 |
commit | 2b1e12780e96a700bfe6cfb7783c08d18808e907 (patch) | |
tree | 94caac4c936db05e20f5fd3d8181c0452a9f7d0d | |
parent | be3668eefdfe4c019bbb31162a6df77eac800fc2 (diff) |
feat: new header
-rw-r--r-- | content/_index.md | 1 | ||||
-rw-r--r-- | content/site/info.md | 2 | ||||
-rw-r--r-- | content/toc.md | 3 | ||||
-rw-r--r-- | layouts/_default/baseof.html | 49 | ||||
-rw-r--r-- | layouts/_default/index.html | 2 | ||||
-rw-r--r-- | layouts/partials/site-name.html | 9 | ||||
-rw-r--r-- | layouts/shortcodes/site-name.html | 0 | ||||
-rw-r--r-- | static/style.css | 57 |
8 files changed, 81 insertions, 42 deletions
diff --git a/content/_index.md b/content/_index.md index f8959f2..e97c42a 100644 --- a/content/_index.md +++ b/content/_index.md @@ -3,5 +3,6 @@ title: "" date: 2022-12-28T23:42:51+01:00 draft: false tags: [] +category: mws --- diff --git a/content/site/info.md b/content/site/info.md index fb151a4..7c3e3aa 100644 --- a/content/site/info.md +++ b/content/site/info.md @@ -7,7 +7,7 @@ abstract: Basic info about this site. type: special date: 2023-11-08T15:01:07+01:00 draft: false -hard-back: true +hardback: true --- ## Information sheet diff --git a/content/toc.md b/content/toc.md index 7625913..2d7d140 100644 --- a/content/toc.md +++ b/content/toc.md @@ -1,10 +1,11 @@ --- title: "Table of contents" -category: "meta" +category: mws abstract: All content type: special date: 2023-11-17T20:42:09+01:00 draft: false +hardback: true --- This is lost of all pages on my website. I think it's better to go into individual sections to explore, but this also exists. diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 9addbf0..b5305ab 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -41,30 +41,21 @@ <link rel="pingback" href="https://webmention.io/d-s.sh/xmlrpc"> </head> <body> - <header> - <a href="/"> - <h1>{{ .Site.Title }}</h1> - </a> - - <nav id="top-nav"> - <nav id="main-nav"> - <a href="/">Home</a> - <a href="/about">About</a> - <a href="/links">Links</a> - <a href="/index.xml">RSS</a> - </nav> - <nav id="categories-nav"> - <a href="/category/engineering">Engineering</a> - <a href="/category/emacs">Emacs</a> - <a href="/category/bsd">BSD</a> - <a href="/category/computer-history">Computer History</a> - <a href="/star-trek">Star Trek</a> + <div class="logo"> + </div> + + <div class="name"> + <nav> + <h1>{{partial "site-name" . }}</h1> + {{ if not (in .Page.Params.category "mws") }} + <a href="/">Part of MWS</a> + {{ end }} </nav> - </nav> + </div> + </header> - </header> <main class="right-column"> {{ partial "back_nav" . }} @@ -81,5 +72,23 @@ </main> + + <footer> + <nav id="top-nav"> + <nav id="main-nav"> + <a href="/">Home</a> + <a href="/about">About</a> + <a href="/links">Links</a> + <a href="/index.xml">RSS</a> + </nav> + <nav id="categories-nav"> + <a href="/category/engineering">Engineering</a> + <a href="/category/emacs">Emacs</a> + <a href="/category/bsd">BSD</a> + <a href="/category/computer-history">Computer History</a> + <a href="/star-trek">Star Trek</a> + </nav> + </nav> + </footer> </body> </html> diff --git a/layouts/_default/index.html b/layouts/_default/index.html index d4b0324..1143c15 100644 --- a/layouts/_default/index.html +++ b/layouts/_default/index.html @@ -13,7 +13,7 @@ Hey! I'm Michał Sapka, a computer programmer living in Kraków, Poland. This we <h2>Sections</h2> <nav> - <P> ✦ <a h class="sec-link" ref="/star-trek/home/"><b>Star Trek fan site</b>: my little shrine to the greatest american Sci-Fi that has ever graced our screens.</a> </p> + <P> ✦ <a class="sec-link" href="/star-trek/home/"><b>Star Trek fan site</b>: my little shrine to the greatest american Sci-Fi that has ever graced our screens.</a> </p> <P> ♠ <a class="sec-link" href="/funnies/"><b>Funnies</b>: A small, curated collection of things I found funny or ammusing.</a> </p> <p> ♻ <a class="sec-link" href="/vcs/git/"><b>Version control system</b> : My little code repository. I don't expect to cooporate on any of those, so it's just stagit.</a></p> <p> ♥ <a class="sec-link" href="/site/info/"><b>Site info</b> : you can find site uptates, metrics, statics, and legal thingies here.</a></p> diff --git a/layouts/partials/site-name.html b/layouts/partials/site-name.html new file mode 100644 index 0000000..9ee0cc8 --- /dev/null +++ b/layouts/partials/site-name.html @@ -0,0 +1,9 @@ + +{{ if in .Page.Params.category "star-trek" }} + Star Trek Fansite +{{ else if in .Page.Params.category "site-info" }} + Site info + +{{ else }} + Michał Sapka's website +{{ end }} diff --git a/layouts/shortcodes/site-name.html b/layouts/shortcodes/site-name.html new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/layouts/shortcodes/site-name.html diff --git a/static/style.css b/static/style.css index 361f447..4c9912f 100644 --- a/static/style.css +++ b/static/style.css @@ -57,10 +57,6 @@ body { } } -header { - width: 100%; - text-align: center; -} main, footer { width: 100%; max-width: 95%; @@ -83,25 +79,48 @@ a:hover { /* ----------- Site header */ header { - font-family: var(--header-font); - font-size: var(--header-font-size); -} -h1 { - font-size: var(--h1-size); - margin: 0; - padding-bottom: 5px; - padding-top: 10px; + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: normal; + align-items: normal; + align-content: normal; } -#top-nav #main-nav { - padding-bottom: 5px; +header > .logo { + display: block; + flex-grow: 0; + flex-shrink: 1; + flex-basis: auto; + align-self: auto; + order: 0; + width: 50px; + height: 80px; + background-color: #000000; } -#top-nav { -} -#top-nav a { - margin-right: 5px; + +header > .name { + display: block; + flex-grow: 1; + flex-shrink: 0; + flex-basis: auto; + align-self: auto; + order: 0; + text-align: left; + position: relative; } +header > .name > nav { + position: absolute; + bottom: 0px; + padding: 10px; + +} + +h1 { + font-size: inherit; + margin: 0; +} /* ---------- Main */ main { @@ -199,7 +218,7 @@ figure.graph img { /* ----------- Footer */ footer { text-align: center; - padding: 10px 0 10px 0; + padding: 10px 0 30px 0; } /* ---------- Footnotes */ |