From e64906314669da865516bc9b15f04138632a7101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ask=20Bj=C3=B8rn=20Hansen?= Date: Sat, 18 Apr 2020 02:47:22 -0700 Subject: [PATCH] Local tweaks --- layouts/_default/single.html | 32 +++++++++++++++--------- layouts/index.html | 17 ++++++++++--- layouts/partials/footer.html | 32 +++++++++++++++++++++--- layouts/partials/head.html | 11 +++++++-- layouts/partials/header.html | 27 ++++++-------------- static/css/fonts.css | 2 ++ static/css/main.css | 48 ++++++++++++++++++++++-------------- 7 files changed, 112 insertions(+), 57 deletions(-) create mode 100644 static/css/fonts.css diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 4138ac7..dff41b2 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,13 +1,22 @@ {{ partial "header.html" . }} +
{{ partial "head.html" . }}

{{ .Title }}

-
Posted at — {{ dateFormat "Jan 2, 2006" .Date }}{{ if .Draft }} DRAFT {{ end }}
+ +
+ {{ if eq .Section "posts" }} + Posted at — {{ dateFormat "Jan 2, 2006" .Date }} + {{ end }} + {{ if .Draft }} + DRAFT + {{ end }} +
@@ -16,15 +25,15 @@ {{- $.Scratch.Set "isDisqus" true -}} @@ -52,4 +61,5 @@
{{ partial "footer.html" . }} - + + \ No newline at end of file diff --git a/layouts/index.html b/layouts/index.html index 1c97468..43a1a3b 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,20 +1,27 @@ {{ partial "header.html" . }} +
{{ partial "head.html" . }} +
+ {{.Content}} +
+ + {{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} + {{ $paginator := .Paginate (where $pages "Params.hidden" "ne" true) }} + {{ if $paginator.Pages }}

Recent posts

- {{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} - {{ $paginator := .Paginate (where $pages "Params.hidden" "ne" true) }} {{ range $paginator.Pages }}
-
{{ dateFormat "Jan 2, 2006" .Date }}{{ if .Draft }} DRAFT {{ end }}
+
{{ dateFormat "Jan 2, 2006" .Date }}{{ if .Draft }} DRAFT {{ end }}
{{.Title}} {{ if isset .Params "description" }} @@ -28,7 +35,9 @@ {{ template "partials/paginator.html" . }}
+ {{ end }}
{{ partial "footer.html" . }} - + + \ No newline at end of file diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 1841def..c43e68d 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,12 +1,38 @@ +{{ if and (isset .Site.Params "social") (isset .Site.Params "feathericonscdn") (eq .Site.Params.featherIconsCDN true) -}} + +{{- else if (isset .Site.Params "social") -}} + +{{ end }} + +{{- if isset .Site.Params "customjs" -}} +{{- range .Site.Params.customJS }} +{{- if or (hasPrefix . "http://") (hasPrefix . "https://") }} + +{{- else }} + +{{- end }} +{{- end }} +{{- end }} + {{ if not .Site.IsServer }} {{ template "_internal/google_analytics_async.html" . }} {{ end }} {{- with .Site.Params.Social -}} - -{{- end -}} + +{{- end -}} \ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 2467747..03607d6 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,9 +1,11 @@
+ {{- if .IsHome -}}

{{ .Site.Title }}

{{- if isset .Site.Params "subtitle" -}}

{{ .Site.Params.Subtitle | markdownify }}

{{- end -}} + {{ if .Site.Params.Social }} + {{ end }}
+ {{ end }} -
+
\ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 62e9d27..e557189 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -20,7 +20,9 @@ {{- template "_internal/opengraph.html" . -}} {{- template "_internal/twitter_cards.html" . -}} - + + @@ -28,25 +30,12 @@ {{ end }} {{- if or (eq .Site.Params.mode "auto") (eq .Site.Params.mode "dark") -}} - + {{- if isset .Site.Params "customdarkcss" }} - + {{- end }} {{- end }} - {{ if and (isset .Site.Params "social") (isset .Site.Params "feathericonscdn") (eq .Site.Params.featherIconsCDN true) -}} - - {{- else if (isset .Site.Params "social") -}} - - {{ end }} - - {{- if isset .Site.Params "customjs" -}} - {{- range .Site.Params.customJS }} - {{- if or (hasPrefix . "http://") (hasPrefix . "https://") }} - - {{- else }} - - {{- end }} - {{- end }} - {{- end }} - + \ No newline at end of file diff --git a/static/css/fonts.css b/static/css/fonts.css new file mode 100644 index 0000000..b9ce3bc --- /dev/null +++ b/static/css/fonts.css @@ -0,0 +1,2 @@ +@import url('https://fonts.googleapis.com/css2?family=Frank+Ruhl+Libre:wght@300;400;500;700;900&display=swap'); +@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap'); \ No newline at end of file diff --git a/static/css/main.css b/static/css/main.css index 2e7cda5..aad70ee 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -1,18 +1,23 @@ body { - font-family: "ubuntu", sans-serif; + font-family: "Verdana", sans-serif; font-weight: 400; color: #333; line-height: 1.6; font-size: 16px; } -a, a:hover { +a, +a:hover { color: #a00; text-decoration: none; word-break: break-word; } -html,button,input,select,textarea { +html, +button, +input, +select, +textarea { color: #333; } @@ -42,7 +47,7 @@ img { } a img { - border:none; + border: none; } figure { @@ -64,7 +69,7 @@ blockquote { margin-left: 1rem; font-style: italic; font-size: 1.4rem; - font-family: Georgia,bitstream charter,serif; + font-family: Georgia, bitstream charter, serif; border-left: 3px solid; border-color: #a00; padding-left: 20px; @@ -79,7 +84,8 @@ blockquote em { font-weight: 600; } -a,a:hover { +a, +a:hover { color: #a00; text-decoration: none } @@ -88,11 +94,16 @@ a:hover { text-decoration: underline } -h1,h2,h3,h4,h5,h6 { - font-family: raleway,sans-serif; +h1, +h2, +h3, +h4, +h5, +h6 { + font-family: "Frank Ruhl Libre", sans-serif; line-height: 1.2; color: #333; - font-weight: 200; + font-weight: 500; } h1 { @@ -167,8 +178,8 @@ ul { } .site-title a { - color: #333; - text-decoration: none !important; + color: #333; + text-decoration: none !important; } .post ul li { @@ -197,12 +208,12 @@ ul { } .container { - margin-top: 50px; + margin-top: 30px; } .header { margin-bottom: 20px; - padding-bottom: 20px; + /* padding-bottom: 20px; */ } .header h1, @@ -218,8 +229,8 @@ ul { } .header nav { - margin-top: 20px; - border-top: 1px solid #f4f4f4; + /* margin-top: 10px; */ + /* border-top: 1px solid #f4f4f4; */ } .header nav ul, @@ -287,7 +298,7 @@ ul { } .post-tags a { - margin-right: 5px; + margin-right: 5px; } .post .post-header .meta { @@ -379,7 +390,8 @@ table th { background-color: #f4f4f4; } -table th, table td { +table th, +table td { padding: 10px 20px; border: 1px solid #dddddd; } @@ -408,4 +420,4 @@ table th, table td { .container { margin-top: 10px; } -} +} \ No newline at end of file