From e024cb16808fca8018f6312d3ba74e2398a7eef3 Mon Sep 17 00:00:00 2001 From: Adrian Short Date: Sun, 23 Aug 2020 21:18:23 +0100 Subject: [PATCH] Remove redundant stuff; improve typography --- layouts/_default/li.html | 4 +- layouts/_default/list.html | 10 +- layouts/_default/single.html | 12 ++- layouts/index.html | 2 + layouts/partials/footer.html | 1 - layouts/partials/header.html | 21 +--- static/css/main.css | 188 +++++++++-------------------------- 7 files changed, 69 insertions(+), 169 deletions(-) diff --git a/layouts/_default/li.html b/layouts/_default/li.html index c7ae720..19e0690 100644 --- a/layouts/_default/li.html +++ b/layouts/_default/li.html @@ -1,5 +1,5 @@ -
+

{{ .Title }}

- {{ .Description }} +

{{ .Description }}

{{ .Date.Format "January 2006" }}

diff --git a/layouts/_default/list.html b/layouts/_default/list.html index bf7fe99..c60491f 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,14 +1,10 @@ {{ define "main" }} - {{ $.Scratch.Set "fa_icon" "fa-tag" }} - - {{ if isset .Params "fa_icon" }} - {{ $.Scratch.Set "fa_icon" .Params.fa_icon }} - {{ end }} - -

{{ .Title }}

+

{{ .Title }}

+
{{ range .Paginator.Pages }} {{ .Render "li" }} {{ end }} +
{{ template "_internal/pagination.html" . }} {{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index ebdd9d3..fcc4177 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,10 +1,14 @@ {{ define "main" }} {{ end }} diff --git a/layouts/index.html b/layouts/index.html index 649fb91..553d5cf 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,7 +1,9 @@ {{ define "main" }}

{{ .Site.Title }}

+
{{ range .Paginator.Pages }} {{ .Render "li" }} {{ end }} {{ template "_internal/pagination.html" . }} +
{{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 8abd8b5..308b1d0 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,3 +1,2 @@ -{{ template "_internal/google_analytics.html" . }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 7071016..afcc61c 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -3,11 +3,11 @@ {{- partial "data/title" . -}} {{ hugo.Generator }} - {{ "" | safeHTML }} - - - - + + + + {{- template "_internal/opengraph.html" . -}} {{ with .Params.image }} @@ -22,14 +22,3 @@ {{- partial "twitter_cards" . -}} -
- - -
- {{ range .Site.Params.social}} - - - - {{ end }} -
-
diff --git a/static/css/main.css b/static/css/main.css index 7cbf65a..7f6b999 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -1,47 +1,29 @@ body { background-color: #fff; color: #000; - width: 700px; - margin: 70px auto; - font-family: "Helvetica", "Helvetica Neue", Arial, serif; + width: 600px; + margin: 120px auto; + font-family: "PT Serif", serif; line-height: 1.0rem; font-size: 1.3em; + -webkit-font-smoothing: antialiased; } -a { - color: #333; - text-decoration: none; +div.highlight { + margin: 0 0 2rem 0; + line-height: 1.5rem; } -a:hover { - text-decoration: underline; +a { + color: #6b0000; + text-decoration: none; } a:visited { - color: #777; -} - -#site-social { - font-size: 1.3rem; -} - -.quote { - font-family: monospace; - border: 0px #777 solid; - /*background-color: #eee;*/ - font-size: 1.8rem; - line-height: 2.0rem; - /*padding: 20px;*/ - margin: 30px 0; -} - -.quote-credit { - /*font-style: italic;*/ - text-align: right; - font-size: 1.0rem; + color: #333; } -.list-item { +#articles div { display: block; border: 0px #777 solid; padding: 0; @@ -50,54 +32,39 @@ a:visited { line-height: 1.8rem; } -.list-date { - font-size: 1.0rem; -} - -.list-item h2 { - line-height: 2.5rem; - margin: 0 0 15px 0; -} - -.list-item img { - margin: 0px 0 20px 0; +#articles p { + font-size: 1.2rem; + margin: 1rem 0 0rem 0; } -.list-quote { - background-color: #444; - color: white; +#articles .list-date { + font-size: 1.2rem; + /* border: 1px red solid; */ } -.list-video { - background-color: #000; - color: white; +#articles h2 { + line-height: 2.5rem; + margin: 0 0 15px 0; } - - .postmeta, .listmeta { font-weight: 300; text-transform: uppercase; font-size: 0.9rem; - margin: 0; + margin: 20px 0; } -.aside-list { - font-family: Georgia, "Times New Roman", serif; - font-size: 2.7rem; - line-height: 3.5rem; +.postmeta { + margin: 1rem 0 3rem 0; } -#aside-single { - margin: 10rem 0; - color: white; - font-family: Georgia, "Times New Roman", serif; - font-size: 4.0rem; - line-height: 4.5rem; +.postmeta a, .postmeta a:visited { + color: #333; } img { width: 100%; + margin: 1rem 0 1rem 0; } figure { @@ -112,27 +79,14 @@ figcaption, figcaption h4 { } article { - font-size: 1.2rem; + font-size: 1.1rem; line-height: 1.9rem; color: #222; } article a { text-decoration: underline; - text-decoration-style: dotted; - color: #000; -} - -article a:visited { - text-decoration: underline; - text-decoration-style: dotted; - color: #aaa; -} - -article a:hover { - color: #fff; - text-decoration: none; - background-color: #333; + color: #4b0000; } article figcaption { @@ -142,32 +96,40 @@ article figcaption { font-size: 0.8rem; } - h1 { color: #eee; font-size: 1.0rem; } article h1 { - font-size: 2.5rem; - line-height: 3.2rem; - margin: 0 0 25px 0; - color: cornflowerblue; + font-size: 2.9rem; + line-height: 3.8rem; + margin: 0 0 50px 0; + color: #6b0000; +} + +article #description { + margin: 1rem 0 1rem 0; + font-style: italic; } article p { - margin: 0 0 30px 0; + margin: 0 0 1.3rem 0; +} + +article h2 { + margin: 50px 0 15px 0; } #site-title { - margin: 0 0 0 0; + margin: 0; font-size: 3.5rem; line-height: 4.0rem; - color: cornflowerblue; + color: #6b0000; + font-variant-caps: petite-caps; } #site-title a, #site-title a:visited { - /* font-size: 1.0rem; */ text-decoration: none; text-transform: uppercase; font-weight: normal; @@ -177,26 +139,6 @@ article p { text-transform: none; } -ul.tags { - margin: 0; - padding: 0; -} - -.tags li { - display: inline; - list-style-type: none; - margin: 0 15px 0 0; - font-size: 0.8rem; - background-color: #eee; - padding: 3px 6px; - border-radius: 5px; -} - -.tags li a, .tags li a:hover, .tags li a:visited { - color: #777; - text-decoration: none; -} - ul.pagination { margin: 0; padding: 0; @@ -223,30 +165,10 @@ ul.pagination li.disabled { color: #333; } -ul.tag-cloud { - margin: 30px 0; +blockquote { + margin: 0 0 0 2rem; padding: 0; -} - -ul.tag-cloud li { - display: inline; - margin: 0; - padding: 10px 20px 10px 0; - line-height: 2rem; -} - -ul.tag-cloud li a, ul.tag-cloud li a:visited { - color: white; - text-decoration: none; -} - -.fa { - margin: 0 15px 0 0; - color: white; -} - -header { - margin: 0px 0; + font-style: italic; } @media screen and (max-width: 699px) { @@ -259,15 +181,3 @@ header { width: 100%; } } - -blockquote { - margin: 0 0 0 20px; - padding: 0; - font-style: italic; -} - -/* -https://css-tricks.com/blockquote-bulge/ -http://www.andybudd.com/archives/2003/11/no_margin_for_error/ -*/ -/* blockquote p:last-child { margin-bottom: 0; } */