diff options
author | Prefetch | 2021-10-03 21:42:46 +0200 |
---|---|---|
committer | Prefetch | 2021-10-03 21:42:46 +0200 |
commit | bd5796ceb2da03291124ab8ff66769ac67a585c9 (patch) | |
tree | 1ab16135066b4771e2f251e8aa26999f71799232 | |
parent | dedb366c3a78f61c64f6be627ea091e71e009f7d (diff) |
Reveal name + general improvements
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | content/_index.md | 9 | ||||
-rw-r--r-- | content/know/_index.md | 5 | ||||
-rw-r--r-- | layouts/know/know.html | 18 | ||||
-rw-r--r-- | layouts/partials/footer.html | 3 | ||||
-rw-r--r-- | static/main.css | 13 | ||||
-rw-r--r-- | static/robots.txt | 2 |
7 files changed, 40 insertions, 15 deletions
@@ -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 @@ <body> {{ partial "navigation.html" . }} {{ .Content }} + +{{ $numcon := len (where .RegularPagesRecursive "File.Dir" ">" "know/concept/") }} +{{ $numcat := len (where .RegularPagesRecursive "File.Dir" "==" "know/category/") }} +<p> +There are currently +<a href="/know/concept/">{{ $numcon }} articles</a> in this knowledge base, +in <a href="/know/category/">{{ $numcat }} categories</a>. +</p> + +<p> +Most recent articles: +<ol> + {{ range first 10 (where .RegularPagesRecursive "File.Dir" ">" "know/concept/").ByPublishDate.Reverse }} + <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li> + {{ end }} +</ol> +</p> + {{ partial "footer.html" . }} </body> </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 @@ <hr> <div class="footl noha"> -© "Prefetch". Licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>. +© Marcus R.A. Newman, a.k.a. "Prefetch". +Available under <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>. </div> <div class="footr noha"> <a href="/uses/">uses</a> 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: |