From bd5796ceb2da03291124ab8ff66769ac67a585c9 Mon Sep 17 00:00:00 2001 From: Prefetch Date: Sun, 3 Oct 2021 21:42:46 +0200 Subject: Reveal name + general improvements --- Makefile | 5 ++++- content/_index.md | 9 ++++++--- content/know/_index.md | 5 +---- layouts/know/know.html | 18 ++++++++++++++++++ layouts/partials/footer.html | 3 ++- static/main.css | 13 +++++++------ static/robots.txt | 2 ++ 7 files changed, 40 insertions(+), 15 deletions(-) create mode 100644 static/robots.txt diff --git a/Makefile b/Makefile index 104b8ff..6fd2934 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,13 @@ FINDARGS= \( -name "*.html" -o -name "*.xml" -o -name "*.css" -o -name "*.js" \) all: - rm -rf public/* hugo for f in `find public/ -type f $(FINDARGS)`; do \ echo "Compressing $$f..." ; \ gzip --keep --force -9 $$f ; \ brotli --keep --force -Z $$f ; \ done + @echo "###########################################" + @echo "### If you (re)moved files, remember to ###" + @echo "#### delete them manually from public/ ####" + @echo "###########################################" diff --git a/content/_index.md b/content/_index.md index e9e5dcc..833d7b3 100644 --- a/content/_index.md +++ b/content/_index.md @@ -11,7 +11,10 @@ related to my areas of interest: programming, optimization, mathematics, physics and even linguistics. -This site is served to you by [nginx](https://nginx.org/), -and statically generated by [Hugo](https://gohugo.io). -I intend to keep it forever free of advertising and trackers, +You might be interested in my [knowledge base](/know/), +where I explain STEM concepts I've learned over the years. + +This website is made by me using [Hugo](https://gohugo.io), +and served to you by [nginx](https://nginx.org/). +I intend to keep it free of advertising and trackers, and to maintain my A+ score for [TLS quality](https://www.ssllabs.com/ssltest/analyze.html?d=prefetch.eu). diff --git a/content/know/_index.md b/content/know/_index.md index 8993ee1..f14e7e3 100644 --- a/content/know/_index.md +++ b/content/know/_index.md @@ -20,10 +20,7 @@ is freely available to anyone who needs it. I hope it helps you in your studies or work. Keep in mind that I'm only human, so there are probably mistakes here. -I take no responsibility for any resulting injuries. +I take no responsibility for any injuries. If you're doing something important, you should check things yourself! -The contents of this knowledge base are found here: -* [List of concepts](/know/concept/) -* [List of categories](/know/category/) diff --git a/layouts/know/know.html b/layouts/know/know.html index b1910dc..18ae347 100644 --- a/layouts/know/know.html +++ b/layouts/know/know.html @@ -7,6 +7,24 @@ {{ partial "navigation.html" . }} {{ .Content }} + +{{ $numcon := len (where .RegularPagesRecursive "File.Dir" ">" "know/concept/") }} +{{ $numcat := len (where .RegularPagesRecursive "File.Dir" "==" "know/category/") }} +

+There are currently +{{ $numcon }} articles in this knowledge base, +in {{ $numcat }} categories. +

+ +

+Most recent articles: +

    + {{ range first 10 (where .RegularPagesRecursive "File.Dir" ">" "know/concept/").ByPublishDate.Reverse }} +
  1. {{ .Title }}
  2. + {{ end }} +
+

+ {{ partial "footer.html" . }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 8ac5a50..85b9645 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,6 +1,7 @@
-© "Prefetch". Licensed under CC BY-SA 4.0. +© Marcus R.A. Newman, a.k.a. "Prefetch". +Available under CC BY-SA 4.0.
uses diff --git a/static/main.css b/static/main.css index f3778e5..b9ac894 100644 --- a/static/main.css +++ b/static/main.css @@ -1,6 +1,6 @@ body { - background:#ddd; - color:#222; + background:#e3e3e3; + color:#161616; max-width:80ch; margin:auto; padding:1em 0; @@ -10,8 +10,9 @@ h1,h2,h3 {text-align:center} h1 {font-size:200%;} h2 {font-size:160%;} h3 {font-size:120%;} -a {text-decoration:none;color:#00f;} -.noha a:link, .noha a:visited {color:#222;} +a {text-decoration:none;color:#0000ff;} +.noha a:link, .noha a:visited {color:#161616;} +.noha a:hover, .noha a:focus, .noha a:active {color:#0000ff;} .nav {height:3rem;font-size:250%;} .navl {float:left;text-align:left;} .navr {float:right;text-align:right;} @@ -19,7 +20,7 @@ a {text-decoration:none;color:#00f;} .footr {float:right;text-align:right;} pre {filter:invert(100%);} @media (prefers-color-scheme: dark) { - body {background:#222;filter:invert(100%);} + body {background:#161616;filter:invert(100%);} } .accordion { display:block; @@ -27,7 +28,7 @@ pre {filter:invert(100%);} border-style:dotted; } input {display:none;} -label {color:#00f;cursor:pointer;} +label {color:#0000ff;cursor:pointer;} input + label + .hidden {display:none;} input:checked + label {display:none;} input:checked + label + .hidden {display:block;} diff --git a/static/robots.txt b/static/robots.txt new file mode 100644 index 0000000..eb05362 --- /dev/null +++ b/static/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: -- cgit v1.2.3