From 01c78188037ea12117603c5fe616638455b89ef3 Mon Sep 17 00:00:00 2001 From: Arona Jones Date: Tue, 14 Jul 2020 22:36:04 +0100 Subject: [PATCH] CSSing, baseof stuff --- content/about.md | 1 + content/blog/2020-07-14-go-hugo.md | 4 +++ layouts/_default/baseof.html | 17 ++++++++++ layouts/_default/list.html | 49 ++++++++------------------- layouts/_default/single.html | 30 ++++------------ layouts/blog/single.html | 41 ++++++---------------- layouts/partials/head.html | 2 +- layouts/partials/nav.html | 7 ++++ static/css/{custom.css => screen.css} | 29 ++++++++++++++-- 9 files changed, 88 insertions(+), 92 deletions(-) create mode 100644 layouts/_default/baseof.html create mode 100644 layouts/partials/nav.html rename static/css/{custom.css => screen.css} (88%) diff --git a/content/about.md b/content/about.md index 9985d56..31280a6 100644 --- a/content/about.md +++ b/content/about.md @@ -3,6 +3,7 @@ title: "About This Website" menu: main: name: "About Site" + weight: 130 --- # Technology diff --git a/content/blog/2020-07-14-go-hugo.md b/content/blog/2020-07-14-go-hugo.md index 50549a1..b7ce73a 100644 --- a/content/blog/2020-07-14-go-hugo.md +++ b/content/blog/2020-07-14-go-hugo.md @@ -11,3 +11,7 @@ I've just moved the site over from Jekyll to Hugo. Why? Because I have a growing This all spiraled from trying to finish my build system, as these things do. Now every time I push to master in my git repo, the site will be automatically built and copied in place, which was the last piece missing for a self-hosted equivalent to GitHub Pages. Win! And I only totally FUBARed Docker once in the process... Still very much working on the webdesign and have taken a bit of a step backwards for now, but it is functional, at least. I've ditched a theme and am handmaking the CSS, which is obviously the high effort way of doing things, but if I wasn't invested in that I would still be using Github Pages! + +Here's some useful posts I used in the process (as much for my reference as yours!): +* https://alligator.io/css/collapsible/ +* https://barilaro.me/posts/automatic-static-site-with-docker/ diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..84e3135 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,17 @@ + + + {{ partial "head.html" . }} + +
+
+

Arona Jones

+ {{ partial "nav.html" . }} +
+
+ {{ block "main" . }} + {{ end }} +
+ {{ partial "footer.html" . }} +
+ + diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 3b61013..a3a362b 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,34 +1,15 @@ - - - {{ partial "head.html" . }} - -
-
-

Arona Jones: {{ .Title }}

- -
-
-
- {{.Content}} -
-
-

Posts:

- -
-
- {{ partial "footer.html" . }} -
- - +{{ define "main" }} +
+ {{.Content}} +
+
+

Posts:

+ +
+{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 60fa36f..26cf7f4 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,24 +1,6 @@ - - - {{ partial "head.html" . }} - -
-
-

Arona Jones: {{ .Title }}

- -
-
-
- {{.Content}} -
-
- {{ partial "footer.html" . }} -
- - +{{ define "main" }} +
+

{{ .Title }}

+{{.Content}} +
+{{ end }} diff --git a/layouts/blog/single.html b/layouts/blog/single.html index 8baa7c6..7ebea25 100644 --- a/layouts/blog/single.html +++ b/layouts/blog/single.html @@ -1,30 +1,11 @@ - - - {{ partial "head.html" . }} - -
-
-

Arona Jones

- -
-
-
-

{{ .Title }}

-

Tags: - {{ range (.GetTerms "categories") }} - {{ .LinkTitle }} - {{ end }}

- {{.Content}} - Published on {{ .Date.Format "2006-01-02" }} -
-
- {{ partial "footer.html" . }} -
- - +{{ define "main" }} +
+

{{ .Title }}

+

Tags: + {{ range (.GetTerms "categories") }} + {{ .LinkTitle }} + {{ end }}

+ {{.Content}} + Published on {{ .Date.Format "2006-01-02" }} +
+{{ end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 1eaf1fc..9d09bfb 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -3,6 +3,6 @@ - + diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html new file mode 100644 index 0000000..01c231c --- /dev/null +++ b/layouts/partials/nav.html @@ -0,0 +1,7 @@ + diff --git a/static/css/custom.css b/static/css/screen.css similarity index 88% rename from static/css/custom.css rename to static/css/screen.css index ba67a63..b685e26 100644 --- a/static/css/custom.css +++ b/static/css/screen.css @@ -24,9 +24,6 @@ ul, ol { margin-left: 30px; } li > ul, li > ol { margin-bottom: 0; } -/** Headings */ -h1, h2, h3, h4, h5, h6 { font-weight: 400; } - /** Links */ a { color: #2a7ae2; text-decoration: none; } @@ -75,6 +72,9 @@ header, footer { header > * { padding-top: 0.5em; } +header { + box-shadow: 0 0 25px 0 black; +} footer { color: white; } @@ -174,6 +174,7 @@ a.button { } nav { display: flex; + /* Looks crap, but better than broken nav */ flex-wrap: wrap; align-items: center; width: 70%; @@ -181,4 +182,26 @@ nav { nav > * { padding-left: 2em; padding-right: 2em; + border-left: 2px solid black; +} +nav :first-child { + padding-left: 0; + border-left: none; +} +nav a:hover { + color: white; +} + +@media only screen and (max-width: 800px) { + nav { + flex-direction: column; + } + nav > * { + margin-right: auto; + padding-bottom: 0.5em; + } + nav :first-child { + padding-left: 2em; + border-left: 2px solid black; + } }