From 67938a44949b1757310a0e8b21b6ffce3fa11257 Mon Sep 17 00:00:00 2001 From: Niklas Buschmann Date: Sat, 21 Dec 2019 22:27:34 +0100 Subject: [PATCH] better post metadata --- layouts/_default/baseof.html | 6 +++--- layouts/_default/list.html | 2 +- layouts/_default/single.html | 8 ++++++-- static/css/classes.css | 5 ----- static/css/theme.css | 33 ++++++++++++++++++++------------- 5 files changed, 30 insertions(+), 24 deletions(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 0cbddb8..3e7445a 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -12,9 +12,9 @@ {{- if or .Params.math .Site.Params.math }} - - - + + + {{- end }}
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index c331939..543e095 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -7,7 +7,7 @@ {{ end }}
-

{{ .Title | default "Posts" }}

+

{{ .Title | default "Posts" | humanize }}

    {{- range $Pages }}
  • diff --git a/layouts/_default/single.html b/layouts/_default/single.html index fe1b22f..d36688c 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -2,8 +2,12 @@
    -

    {{ .Title }}

    - {{ if .Date }}

    {{ end }} + {{ range $index, $tag := .Params.categories }} + {{- if gt $index 0 }}, {{ end -}} + {{ $tag | upper }} + {{- end -}} +

    {{ .Title }}

    +

    {{ if ($.Param "author") }}{{ $.Param "author" }}{{ end }}{{ if .Date }}{{ end }}

    {{ .Content }}
    diff --git a/static/css/classes.css b/static/css/classes.css index adbf123..17cef55 100644 --- a/static/css/classes.css +++ b/static/css/classes.css @@ -1,8 +1,3 @@ -.meta { - margin-top: .2em; - margin-bottom: 1.5em; -} - .bright { box-shadow: 0 0 .6em #3c3c3c0f; border-bottom: 1px solid #9494941f; diff --git a/static/css/theme.css b/static/css/theme.css index 62ebc61..03297ba 100644 --- a/static/css/theme.css +++ b/static/css/theme.css @@ -1,19 +1,19 @@ @media (prefers-color-scheme: light) { html { background: #fff; - color: #282828; + color: #222; } } @media (prefers-color-scheme: dark) { html { - background: #282828; + background: #222; color: #fff; } } body { - font-family: -apple-system,BlinkMacSystemFont,"Helvetica Neue","Segoe UI","Roboto",sans-serif; + font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", "Roboto", sans-serif; font-size: 16px; font-size: calc(0.8rem + 0.25vw); font-weight: 400; @@ -38,19 +38,18 @@ b, strong, th { a { color: inherit; text-decoration: inherit; - transition: color .2s; } -a:hover, header time { - color: #949494; +a:hover { + text-decoration: underline; } article a { color: #68f; } -article header a, article footer a { - color: inherit; +header time { + color: #949494; } hr { @@ -97,6 +96,7 @@ pre { pre code { all: unset; + -webkit-text-fill-color: initial; } code { @@ -115,20 +115,27 @@ body > header { align-items: center; } -h1 { - font-size: 1.7em; -} - header h1, header h2 { margin: 0; } +article header { + margin-bottom: 2em; +} + +article header h1 { + font-size: 1.75em; + padding: .25em 0; + margin-bottom: .7em; + border-bottom: 1px solid #94949436; +} + nav { margin: .5em -.8em; } nav a { - margin: 0 .8em; + padding: 0 .8em; } body > header, article {