diff --git a/archetypes/default.adoc b/archetypes/default.adoc index ec83a6d..62b499a 100644 --- a/archetypes/default.adoc +++ b/archetypes/default.adoc @@ -1,5 +1,5 @@ --- -title: "{{ replace .Name "-" " " | title }}" +title: "{{ humanize .Name }}" date: {{ .Date }} draft: true @@ -10,7 +10,7 @@ tags: - "tag2" --- -= {{ replace .Name "-" " " | title }} += {{ humanize .Name }} {{ .Site.Author.name }} {{ with .Site.Author.email }}<{{ . }}>{{ end }} -{{ dateFormat "2006-01-02 15:04 -0700" .Date }} +{{ dateFormat "2006-01-02 15:04:05 -0700" .Date }} :stem: latexmath diff --git a/archetypes/default.md b/archetypes/default.md index 0ef7bf9..0e3ba03 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -1,5 +1,5 @@ --- -title: "{{ replace .Name "-" " " | title }}" +title: "{{ humanize .Name }}" date: {{ .Date }} draft: true diff --git a/static/css/main.css b/assets/css/main.css similarity index 93% rename from static/css/main.css rename to assets/css/main.css index e817b43..dc606ce 100644 --- a/static/css/main.css +++ b/assets/css/main.css @@ -9,11 +9,12 @@ /* The fonts. */ --body-family: serif; --header-family: sans-serif; + --mono-family: monospace; /* Spacing options. */ --font-size: 20px; --vertical-rhythm: 24px; - --content-width: 900px; + --content-width: 750px; --border-style: var(--foreground) solid 1px; } @@ -73,6 +74,7 @@ a:visited { } code { + font-family: var(--mono-family); font-size: 0.9em; } @@ -104,6 +106,7 @@ tr:nth-child(even) { pre { background: var(--background-light); border: var(--background) solid 1px; + font-family: var(--mono-family); font-size: 1rem; line-height: 1.5; margin-top: 1rem; @@ -259,3 +262,11 @@ footer { margin-bottom: 1rem; } } + +/* Automatic color scheme detection */ +@media (prefers-color-scheme: dark) { + :root { + } +} + +/* Table of contents autogenerated from Hugo */ diff --git a/i18n/en.toml b/i18n/en.toml index 4702756..2bb4c51 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -25,8 +25,11 @@ other = "Updated" [available_translations] other = "Translations" +[table_of_contents] +other = "Table of contents" -# General + +# General [and] other = "and" @@ -35,3 +38,6 @@ other = "Back to home" [multilingual] other = "Available in other languages" + +[page_not_found] +other = "Page not found" diff --git a/i18n/tl.toml b/i18n/tl.toml index c793f99..4f35396 100644 --- a/i18n/tl.toml +++ b/i18n/tl.toml @@ -25,6 +25,9 @@ other = "Binago noong" [available_translations] other = "Mga pagsasalin" +[table_of_contents] +other = "Talaan ng nilalaman" + # General [and] @@ -35,3 +38,6 @@ other = "Balik sa homepage" [multilingual] other = "Ibang lengwahe" + +[page_not_found] +other = "Hindi makita ang webpage na hinahanap mo" diff --git a/layouts/404.html b/layouts/404.html index 2cec83f..22109c3 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,3 +1,4 @@ {{ define "main" }} -

404

-{{ end }} \ No newline at end of file +

404

+

{{ i18n "page_not_found" }}

+{{ end }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index d59e2d5..a96f8fd 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -2,10 +2,13 @@
{{ .Content }} +{{- /* The homepage should show only pages from the given sections (with `$.Site.Params.mainSections`). +Otherwise, we take the pages of a section. */ -}} {{ $pages := .Pages }} {{ if .IsHome }} {{ $pages = where $.Site.RegularPages "Type" "in" $.Site.Params.mainSections }} {{ end }} + {{ range (where (.Paginate $pages).Pages "Params.hidden" "!=" true) }}

{{ .Title }}

diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 21b8e2f..da0f389 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -35,6 +35,12 @@ {{ $is_toc := cond (ne .Params.toc nil) .Params.toc $.Site.Params.toc }} {{ if $is_toc }} + {{ .TableOfContents }} {{ end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 60b92a7..06928f7 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,5 +1,7 @@ {{ if .IsHome }}{{ $.Site.Title | safeHTML }}{{ else }}{{ .Title | safeHTML }}{{ end }} - + +{{- $style := resources.Get "css/main.css" | resources.Minify | resources.Fingerprint -}} + {{- /* Some sane tags default */ -}} {{ hugo.Generator }}