diff --git a/themes/dead-simple/.gitignore b/themes/dead-simple/.gitignore deleted file mode 100644 index 0e5b974..0000000 --- a/themes/dead-simple/.gitignore +++ /dev/null @@ -1,19 +0,0 @@ -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib - -# Test binary, built with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# Dependency directories (remove the comment below to include it) -# vendor/ - -/exampleSite/public -/exampleSite/resources -/exampleSite/.hugo_build.lock diff --git a/themes/dead-simple/LICENSE b/themes/dead-simple/LICENSE deleted file mode 100644 index 7d26f68..0000000 --- a/themes/dead-simple/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2022 Gleb Buzin - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/themes/dead-simple/README.md b/themes/dead-simple/README.md deleted file mode 100644 index 9718612..0000000 --- a/themes/dead-simple/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# Hugo Dead Simple - -Simple hugo theme designed to be dead easy on the reader. - -General idea is to stay off of enshittifying trend: no icons, less whitespace, less colors, links are blue, etc... - - - -## Features - -- Auto light and dark themes -- Fast without bullshit - minified, minimal vanilla css, images are lazy-loaded, system fonts, no CDNs, functional without js if Katex is not used -- Site-wide search -- Keyboard-friendly: `h` to home, `t` to tags, `i` to search, `Tab` to navigate posts and search -- Dynamic wiki-style table of contents -- Katex math (inline and block) -- Info boxes -- Attachments -- Info boxes -- Columns / Tabs -- Copy buttons on code blocks -- Mobile-friendly - -[Example site, overview of features and configuration.](https://hugo-dead-simple.netlify.app/post/hugo-dead-simple/) \ -[Example site repo.](https://github.com/barklan/hugo-dead-simple-example) - -## TODO - -- https://gohugo.io/content-management/mathematics/ (recent hugo) diff --git a/themes/dead-simple/assets/css/code.css b/themes/dead-simple/assets/css/code.css deleted file mode 100644 index 4a119e7..0000000 --- a/themes/dead-simple/assets/css/code.css +++ /dev/null @@ -1,125 +0,0 @@ -@keyframes code-fade-in { - from { - opacity: 0; - } - to { - opacity: 1; - } -} - -.highlight div, -pre { - background-color: var(--code-background); - padding: 0.7em; - overflow-x: auto; - margin: 0px; - border: 1px solid var(--code-border); - border-radius: 3px 0 3px 3px; - line-height: 1.3; -} - -.highlight { - margin: 0.8em 0; -} - -.highlight div pre { - border: 0px; - padding: 0px 5px; - margin: 0px; - box-shadow: 0px 0px 0px; -} - -code { - font-family: 'Source Code Pro', monospace; - color: var(--code); - - /* For Iosevka */ - /* font-stretch: expanded; */ - font-stretch: normal; - - background: var(--code-background); - border-radius: 5%; - padding: 1px 4px; - border: 1px solid var(--code-border); - font-size: 0.920em; -} - -pre code { - font-size: 0.900em; - font-stretch: normal; - - border: none; - background: none; - padding: 0; - margin: 0px; - tab-size: 4; -} - -@media screen and (max-width: 760px) { - pre code { - font-size: 80%; - } -} - -.fs95 { - font-size: 90%; -} - -.fs90 { - font-size: 90%; -} - -.fs85 { - font-size: 85%; -} - -.fs80 { - font-size: 80%; -} - -.fs75 { - font-size: 75%; -} - -.fs70 { - font-size: 75%; -} - -.fs50 { - font-size: 50%; -} - -/* Line numbers in code blocks. */ -.ln { - user-select: none; - margin-right: 14px; - color: rgb(150, 150, 150); -} - -.hl { - background-color: var(--code-hl); - outline-style: solid; - outline-color: var(--code-hl); - outline-width: 0.5px; -} - -/* Copy code button */ -.copy-code-button { - display: none; -} - -@media screen and (min-width: 760px) { - .copy-code-button { - animation-duration: 1s; - animation-name: code-fade-in; - margin-top: -22px; - float: right; - display: block; - background-color: var(--code-background); - border-color: var(--code-border); - border-style: solid; - border-width: 1px 1px 0 1px; - border-radius: 2px 2px 0 0; - color: var(--text-dim); - } -} diff --git a/themes/dead-simple/assets/css/images.css b/themes/dead-simple/assets/css/images.css deleted file mode 100644 index 17b828f..0000000 --- a/themes/dead-simple/assets/css/images.css +++ /dev/null @@ -1,85 +0,0 @@ -@keyframes images { - from { - opacity: 0; - } - to { - opacity: 1; - } -} - -img { - max-height: 70vh; - margin: 0.8em 0; - animation-duration: 1s; - animation-name: images; -} - -.imgp { - margin: auto; - text-align: center; -} - -figure { - margin: auto; - text-align: center; -} - -.imgp img, -figure img -{ - border-radius: 4px; -} - -figcaption { - color: var(--text-dim); - font-size: 0.96rem; - text-align: center; -} - -figcaption h4 { - margin-top: 0px; - font-weight: normal; -} - -img, -iframe, -video { - max-width: 100%; -} - -/* Image gallery. */ -.image-gallery, .image-gallery-img { - list-style-type: none; - display: flex; - flex-wrap: wrap; - justify-content: center; - gap: 10px; - padding-left: 0; -} - -.image-gallery { - margin: 0 0 1.2rem 0; -} - -.image-gallery-img { - margin: 0 0 2.6rem 0; -} - -.image-gallery > li, .image-gallery-img > li { - flex-basis: 440px; -} - -.image-gallery li img, -.image-gallery-img li img -{ - object-fit: cover; - width: 100%; - height: 100%; - - border-radius: 4px; - vertical-align: middle; -} - -.three-image-gallery > li { - flex-basis: 290px; -} diff --git a/themes/dead-simple/assets/css/main.css b/themes/dead-simple/assets/css/main.css deleted file mode 100644 index 61891e9..0000000 --- a/themes/dead-simple/assets/css/main.css +++ /dev/null @@ -1,216 +0,0 @@ -:root { - --complimentary: #815205; - --text: black; - --code: black; - --text-dim: #444; - --link: #3366cc; - --link-visited: #795cb2; - --code-background: #f3f5f7; - --code-border: #eaecf0; - --code-border: transparent; - --code-hl: #e6e6e6; - --border-general: #cccfd4; - --table-th: #e1e5ea; - --table-tr: #edeff2; - --toc-background: #f9f9f9; - --toc-border: #aaa; -} - -@media (prefers-color-scheme: dark) { - :root { - --complimentary: #815205; - --text: #d8d8d8; - --code: #cbcbcb; - --text-dim: #a7a7a7; - /* --link: #8cb4ff; */ - --link: #88a9e9; - --link-visited: #a390ca; - --code-background: #272727; - --code-border: transparent; - --code-hl: #5a5a5a; - --border-general: #495057; - --table-th: #414141; - --table-tr: #343434; - --toc-background: #343434; - --toc-border: #495057; - } -} - -#gitinfo-date { - color: var(--text-dim); - filter: opacity(40%); - font-style: italic; - font-size: 0.9em; - white-space: nowrap; -} - -@media screen and (min-width: 760px) { - #gitinfo-date { - margin-left: 30px; - } -} - -/* TODO: add iframe margins */ - -/* HTML & BODY */ -html { - color: var(--text); - /* set in header*/ - /* background-color: var(--background); */ - scroll-behavior: smooth; -} - -body { - margin: auto; - padding: 0em 1em 2em 1em; - font-family: - "Inter", - -apple-system, - BlinkMacSystemFont, - "Roboto", - Helvetica, - sans-serif; - line-height: 1.54; - text-align: justify; -} - -@media screen and (min-width: 760px) { - body { - margin: auto; - max-width: 68vw; - } -} - -@media screen and (min-width: 1150px) { - body { - margin: auto; - max-width: 62vw; - } -} - -main { - hyphens: none; -} - -/* BASIC HTML ELEMENTS */ -p { - margin: 1em 0; -} - -h1 { - font-weight: normal; - margin-bottom: 0px; - font-size: 2em; - margin-top: 0; -} - -h2 { - border-bottom: 1px solid; - border-color: var(--text-dim); - margin-bottom: 0.5em; - margin-top: 1.2em; - font-weight: normal; - font-size: 1.65em; -} - -h3 { - font-size: 1.25em; - font-weight: 600; - margin-bottom: 0.7em; - padding-bottom: 0; -} - -h4 { - font-size: 1.1em; - margin-bottom: 0; - padding-bottom: 0; - font-style: oblique; - font-weight: normal; -} - -a { - text-decoration: none; - color: var(--link); -} - -a:hover { - text-decoration: underline; -} - -a:visited { - color: var(--link-visited); -} - -hr { - border-style: dashed; - color: var(--text-dim); -} - -blockquote { - border-left: 0.3rem solid var(--complimentary); - font-style: oblique; - margin: 1.6rem 0; - padding: 0 1.4rem 0 1rem; - line-height: 1.6; -} - -blockquote p { - margin: 0; -} - -details { - padding: 0 0 0 14px; - border-left: 2px dashed var(--border-general); -} - -mark { - padding: 0 2px 0 2px; -} - -ul { - padding-left: 2rem; -} - -/* NOTE: fix for Inter font. */ -strong { - font-weight: 600; -} - -/* NOTE: fix for Inter font. */ -th { - font-weight: 500; -} - -/* MISC */ -.section-title { - border: 0; -} - -.post-list { - color: var(--complimentary); - padding-left: 1em; -} - -@media screen and (min-width: 760px) { - .post-list { - max-width: 60vw; - } -} - -.bold-post-in-list { - font-weight: 600; -} - -@media screen and (max-width: 760px) { - .katex { - font-size: 1.05em !important; - } -} - -.footnotes { - margin-top: 60px; -} - -.terms { - padding-left: 16px; -} diff --git a/themes/dead-simple/assets/css/menu.css b/themes/dead-simple/assets/css/menu.css deleted file mode 100644 index 3581f74..0000000 --- a/themes/dead-simple/assets/css/menu.css +++ /dev/null @@ -1,25 +0,0 @@ -.menu { - padding: 0px 4px 0px 0px; - z-index: 9999; - text-align: left; - margin-bottom: 10px; -} - -.menu li { - display: inline-block; -} - -.menu a { - margin-right: 1.1em; - text-decoration: none; - border-radius: 5px; -} - -.menu a:visited { - color: var(--link); -} - -.menu a:hover { - text-decoration: underline; -} - diff --git a/themes/dead-simple/assets/css/misc.css b/themes/dead-simple/assets/css/misc.css deleted file mode 100644 index a392622..0000000 --- a/themes/dead-simple/assets/css/misc.css +++ /dev/null @@ -1,73 +0,0 @@ -/* ATTACHMENTS */ -.attachments-files { - display: block; - font-size: 1rem; - margin: 0; -} - -.attachment-size { - display: inline-block; - color: var(--text-dim); -} - -.attachments ul { - margin-top: 4px; -} - -.attachments label { - font-weight: 300; - margin: 0; -} - -/* COLUMNS */ -.md-columns { - display: flex; - flex-wrap: wrap; - margin-left: -1rem; - margin-right: -1rem; -} - -.md-columns > div { - flex: 1 1; - margin: 1rem 0; - min-width: 100px; - max-width: 100%; - padding: 0 1rem; -} - -.md-columns .markdown-inner { - margin-top: 0; - margin-bottom: 0; -} - -/* TABS */ -.md-tabs { - margin-top: 1rem; - margin-bottom: 1rem; - border: 1px solid var(--border-general); - border-radius: 3px; - overflow: hidden; - display: flex; - flex-wrap: wrap; -} -.md-tabs label { - display: inline-block; - padding: 0.6rem 0.2rem 0.3rem 0.2rem; - border-bottom: 1px transparent; - cursor: pointer; -} -.md-tabs .md-tabs-content { - order: 999; - width: 100%; - border-top: 1px solid var(--border-general); - padding: 0.5rem 1rem 1rem 1rem; - display: none; -} - -.md-tabs input[type="radio"] { - margin-left: 1.1rem; -} - -.md-tabs input[type="radio"]:checked + label + .md-tabs-content { - display: block; -} diff --git a/themes/dead-simple/assets/css/post_meta.css b/themes/dead-simple/assets/css/post_meta.css deleted file mode 100644 index 632b4a0..0000000 --- a/themes/dead-simple/assets/css/post_meta.css +++ /dev/null @@ -1,50 +0,0 @@ -/* POST META */ -#single-header { - /* border-bottom: 2px solid var(--complimentary); */ - padding: 0px 8px 4px 0; - margin-bottom: 20px; - margin-top: 10px; -} - -.date { - color: var(--text-dim); - padding-top: 0.1em; - font-size: 90%; -} - -#single-meta { - margin-top: 0; - margin-bottom: 0px; - padding-top: 0px; - font-size: 0.9em; -} - -#single-meta a:visited { - color: var(--link); -} - -#subtitle { - font-family: "Linux Libertine", "Georgia", "Times", serif; - margin-top: -8px; - margin-bottom: 0.3em; - font-size: 1.4em; - color: var(--text-dim); -} - -.datesub { - font-weight: normal; - color: var(--text-dim); -} - -#tags { - font-weight: normal; - color: var(--text-dim); -} - -#tags a { - filter: brightness(80%); -} - -#tags a:visited { - filter: brightness(80%); -} diff --git a/themes/dead-simple/assets/css/search.css b/themes/dead-simple/assets/css/search.css deleted file mode 100644 index e74666e..0000000 --- a/themes/dead-simple/assets/css/search.css +++ /dev/null @@ -1,28 +0,0 @@ -/* SEARCH */ -#search-input { - padding: 6px; - width: 72%; -} - -@media screen and (min-width: 900px) { - #search-input { - width: 42%; - } -} - -@media screen and (min-width: 1150px) { - #search-input { - width: 33%; - } -} - -input { - background-color: var(--background); - color: var(--text); - border-color: var(--border-general); - border-radius: 4px; -} - -#results { - padding-left: 16px; -} diff --git a/themes/dead-simple/assets/css/tables.css b/themes/dead-simple/assets/css/tables.css deleted file mode 100644 index 67aa3ff..0000000 --- a/themes/dead-simple/assets/css/tables.css +++ /dev/null @@ -1,33 +0,0 @@ -/* TABLES */ -table { - border-collapse: collapse; - display: block; - overflow: auto; -} - -@media screen and (min-width: 760px) { - table { - display: table !important; - } -} - -table thead th { - border: 1px solid var(--border-general); -} - -th, -td { - padding: 4px 8px; - border: 1px solid rgb(200, 200, 200); - border: 1px solid var(--border-general); -} - -th { - background-color: var(--table-th); -} - -tr { - background-color: var(--table-tr); -} - - diff --git a/themes/dead-simple/assets/css/toc.css b/themes/dead-simple/assets/css/toc.css deleted file mode 100644 index bac6a3c..0000000 --- a/themes/dead-simple/assets/css/toc.css +++ /dev/null @@ -1,98 +0,0 @@ -/* TOC */ -.toc a { - color: var(--text-dim); -} - -.toc a:visited { - color: var(--text-dim); -} - -@media screen and (min-width: 1150px) { - #tableOfContentContainer { - position: fixed; - left: 20px; - top: 46px; - max-width: 15vw; - width: 15vw; - } - - #TableOfContents { - opacity: 0.6; - transition-duration: 1s; - } - - #TableOfContents:hover { - opacity: 1; - } -} - -.toc { - animation-duration: 1s; - background: var(--toc-background) none repeat scroll 0 0; - border: 1px solid var(--toc-border); - display: table; - font-size: 95%; - margin-bottom: 1em; - padding: 0.4em 1.5em 0.4em 0.2em; - width: auto; - margin-top: auto; -} - -@media screen and (min-width: 1150px) { - .toc { - padding: 0; - background-color: transparent; - font-size: 80%; - line-height: 1.3; - border-right: 0px; - border-top: 0px; - border-bottom: 0px; - border-left: 0px; - } - - #TableOfContents { - max-height: 85vh; - overflow-y: auto; - } - - #TableOfContents li { - max-width: 13vw; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } -} - -/* !important was here for some reason. */ -.toc li, -.toc ul, -.toc ul li { - list-style: outside none none; -} - -.toc ul li a { - transition-duration: 50ms; -} - -.active-toc { - font-weight: bold; - transition-duration: 50ms; -} - -/* h2 in toc has 20px padding and h1 should be the title and shouldn't be present in toc */ -@media screen and (min-width: 1150px) { - #TableOfContents { - margin-left: -32px; - } -} - -#TableOfContents ul { - padding-left: 20px; -} - -.toc h3 { - margin-left: 20px; - margin-top: 0.5em; - margin-bottom: 0.5em; - font-weight: normal; -} diff --git a/themes/dead-simple/go.mod b/themes/dead-simple/go.mod deleted file mode 100644 index 2767c19..0000000 --- a/themes/dead-simple/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module github.com/barklan/hugo-dead-simple - -go 1.18 diff --git a/themes/dead-simple/images/screenshot.png b/themes/dead-simple/images/screenshot.png deleted file mode 100644 index 843db6f..0000000 Binary files a/themes/dead-simple/images/screenshot.png and /dev/null differ diff --git a/themes/dead-simple/images/tn.png b/themes/dead-simple/images/tn.png deleted file mode 100644 index 112f418..0000000 Binary files a/themes/dead-simple/images/tn.png and /dev/null differ diff --git a/themes/dead-simple/layouts/404.html b/themes/dead-simple/layouts/404.html deleted file mode 100644 index c2e4e40..0000000 --- a/themes/dead-simple/layouts/404.html +++ /dev/null @@ -1,5 +0,0 @@ -{{ partial "header.html" . }} - -404 NOT FOUND - -{{ partial "footer.html" . }} diff --git a/themes/dead-simple/layouts/_default/_markup/render-image.html b/themes/dead-simple/layouts/_default/_markup/render-image.html deleted file mode 100644 index 9925e1b..0000000 --- a/themes/dead-simple/layouts/_default/_markup/render-image.html +++ /dev/null @@ -1,3 +0,0 @@ -

- {{ .Text }} -

diff --git a/themes/dead-simple/layouts/_default/_markup/render-link.html b/themes/dead-simple/layouts/_default/_markup/render-link.html deleted file mode 100644 index c7cc5a3..0000000 --- a/themes/dead-simple/layouts/_default/_markup/render-link.html +++ /dev/null @@ -1 +0,0 @@ -{{ .Text | safeHTML }} diff --git a/themes/dead-simple/layouts/_default/index.json b/themes/dead-simple/layouts/_default/index.json deleted file mode 100644 index 957b20b..0000000 --- a/themes/dead-simple/layouts/_default/index.json +++ /dev/null @@ -1,15 +0,0 @@ -{{/* layouts/_default/index.json */}} -{{- $index := slice -}} -{{- range where .Site.RegularPages.ByDate.Reverse "Type" "not in" (slice "page" "json") -}} - {{ if .Params.dateCreated }} - {{ $.Scratch.Set "date" (.Params.dateCreated) }} - {{ else }} - {{- if isset site.Params "date_format" -}} - {{- $.Scratch.Set "date" (.Date.Format site.Params.date_format) -}} - {{- else -}} - {{- $.Scratch.Set "date" (.Date.Format "2006-01-02") -}} - {{- end -}} - {{ end }} - {{- $index = $index | append (dict "title" ( .Title | plainify ) "permalink" .Permalink "contents" .Plain "section" (i18n (.Section | title)) "tags" (apply .Params.tags "i18n" "." ) "categories" (apply .Params.categories "i18n" "." ) "summary" (.Params.summary | markdownify | htmlUnescape | plainify) "date" ($.Scratch.Get "date") ) -}} -{{- end -}} -{{- $index | jsonify -}} diff --git a/themes/dead-simple/layouts/_default/list.html b/themes/dead-simple/layouts/_default/list.html deleted file mode 100644 index 63a3784..0000000 --- a/themes/dead-simple/layouts/_default/list.html +++ /dev/null @@ -1,20 +0,0 @@ -{{ partial "header.html" . }} - -
{{ .Content }}
- -{{ if .IsHome }} - - {{ partial "search-form.html" . }} - - - {{ range .Sections }} -

{{ .CurrentSection.Title }}

- {{ .CurrentSection.Content }} - {{ partial "post_list.html" . }} - {{ end }} -{{ else }} -

{{ .CurrentSection.Title }}

- {{ partial "post_list.html" . }} -{{ end }} - -{{ partial "footer.html" . }} diff --git a/themes/dead-simple/layouts/_default/single.html b/themes/dead-simple/layouts/_default/single.html deleted file mode 100644 index 37425ba..0000000 --- a/themes/dead-simple/layouts/_default/single.html +++ /dev/null @@ -1,43 +0,0 @@ -{{ partial "header.html" . }} - - -{{ if not .Params.notitle }} -
-

- {{ .Title | markdownify }} -

-
- {{ if .Params.subtitle }} -

{{ .Params.subtitle }}

- {{ end }} - {{ if .Params.date }} - {{ .Date.Format "Jan 2, 2006" }}{{ if .GitInfo }}    m. {{ - .Lastmod.Format "Jan 2, 2006" }}{{ end }} - {{ end }} {{ partial "tags.html" .}} -
-
-{{ else }} -
-{{ end }} - -{{ if .Params.toc }} - -{{ end }} - - -
{{ .Content }}
- -{{ if .Params.Next }} -
-
- {{ with .PrevInSection }} - Next: {{ .Title }} - {{ end }} -{{ end }} - -{{ if .Params.math }} - {{ partial "math.html" . }} -{{ end }} -{{ partial "footer.html" . }} diff --git a/themes/dead-simple/layouts/_default/taxonomy.html b/themes/dead-simple/layouts/_default/taxonomy.html deleted file mode 100644 index 7b61fda..0000000 --- a/themes/dead-simple/layouts/_default/taxonomy.html +++ /dev/null @@ -1,13 +0,0 @@ -{{ partial "header.html" . }} - -

{{ .Title }}

- - - -{{ partial "footer.html" . }} diff --git a/themes/dead-simple/layouts/_default/terms.html b/themes/dead-simple/layouts/_default/terms.html deleted file mode 100644 index 08024da..0000000 --- a/themes/dead-simple/layouts/_default/terms.html +++ /dev/null @@ -1,13 +0,0 @@ -{{ partial "header.html" . }} - -

{{ .Title }}

- - - -{{ partial "footer.html" . }} diff --git a/themes/dead-simple/layouts/partials/footer.html b/themes/dead-simple/layouts/partials/footer.html deleted file mode 100644 index 9c157ee..0000000 --- a/themes/dead-simple/layouts/partials/footer.html +++ /dev/null @@ -1,9 +0,0 @@ -
- - - - - diff --git a/themes/dead-simple/layouts/partials/footer_scripts.html b/themes/dead-simple/layouts/partials/footer_scripts.html deleted file mode 100644 index 6e367d3..0000000 --- a/themes/dead-simple/layouts/partials/footer_scripts.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - diff --git a/themes/dead-simple/layouts/partials/header.html b/themes/dead-simple/layouts/partials/header.html deleted file mode 100644 index 07daa9b..0000000 --- a/themes/dead-simple/layouts/partials/header.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - {{ with .OutputFormats.Get "rss" -}} - {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} - {{ end -}} - - {{ if .IsHome }} - {{ .Site.Title }} - {{ else }} - {{ .Title }} | {{ .Site.Title }} - {{ end }} - - - - - {{ $CSS := slice - (resources.Get "css/main.css") - (resources.Get "css/menu.css") - (resources.Get "css/toc.css") - (resources.Get "css/images.css") - (resources.Get "css/post_meta.css") - (resources.Get "css/search.css") - (resources.Get "css/code.css") - (resources.Get "css/tables.css") - (resources.Get "css/misc.css") - | resources.Concat "style.css" | minify | fingerprint }} - - - - - {{ if not .Params.nomenu }} - - {{ end }} diff --git a/themes/dead-simple/layouts/partials/math.html b/themes/dead-simple/layouts/partials/math.html deleted file mode 100644 index ce3fae7..0000000 --- a/themes/dead-simple/layouts/partials/math.html +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/themes/dead-simple/layouts/partials/post_list.html b/themes/dead-simple/layouts/partials/post_list.html deleted file mode 100644 index 295a957..0000000 --- a/themes/dead-simple/layouts/partials/post_list.html +++ /dev/null @@ -1,8 +0,0 @@ - - diff --git a/themes/dead-simple/layouts/partials/post_row.html b/themes/dead-simple/layouts/partials/post_row.html deleted file mode 100644 index 4c7a36f..0000000 --- a/themes/dead-simple/layouts/partials/post_row.html +++ /dev/null @@ -1,23 +0,0 @@ -
  • -{{ if not .CurrentSection.Params.nodate }} -
    - {{ .Date.Format "Jan 2, 2006" }} - {{ if .Params.bold }} - {{ .Page.Title | markdownify }} - {{ else }} - {{ .Page.Title | markdownify }} - {{ end }} -
    -{{ else }} - {{ if .Params.bold }} - {{ .Page.Title | markdownify }} - {{ else }} - {{ .Page.Title | markdownify }} - {{ end }} -{{ end }} -
  • - diff --git a/themes/dead-simple/layouts/partials/search-form.html b/themes/dead-simple/layouts/partials/search-form.html deleted file mode 100644 index 5c54737..0000000 --- a/themes/dead-simple/layouts/partials/search-form.html +++ /dev/null @@ -1,8 +0,0 @@ - - diff --git a/themes/dead-simple/layouts/partials/search-index.html b/themes/dead-simple/layouts/partials/search-index.html deleted file mode 100644 index 4fc165b..0000000 --- a/themes/dead-simple/layouts/partials/search-index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - diff --git a/themes/dead-simple/layouts/partials/tags.html b/themes/dead-simple/layouts/partials/tags.html deleted file mode 100644 index 5309370..0000000 --- a/themes/dead-simple/layouts/partials/tags.html +++ /dev/null @@ -1,11 +0,0 @@ -{{ $taxonomy := "tags" }} {{ with .Param $taxonomy }} - -    - {{ range $index, $tag := . }} {{ with $.Site.GetPage (printf "/%s/%s" - $taxonomy $tag) -}} - - #{{ $tag | urlize }} -   - {{- end -}} {{- end -}} - -{{ end }} diff --git a/themes/dead-simple/layouts/shortcodes/attachments.html b/themes/dead-simple/layouts/shortcodes/attachments.html deleted file mode 100644 index 0dd500a..0000000 --- a/themes/dead-simple/layouts/shortcodes/attachments.html +++ /dev/null @@ -1,24 +0,0 @@ -
    - -
    - {{- $folderName := default "files" (.Get "folder") -}} - {{- $hasPattern := false -}} - {{- if .Get "pattern" -}}{{- $hasPattern = true -}}{{- end -}} - {{- $folder := path.Join "content" (path.Join .Page.File.Dir $folderName) -}} - -
    -
    - diff --git a/themes/dead-simple/layouts/shortcodes/beauty.html b/themes/dead-simple/layouts/shortcodes/beauty.html deleted file mode 100644 index 092ea58..0000000 --- a/themes/dead-simple/layouts/shortcodes/beauty.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - diff --git a/themes/dead-simple/layouts/shortcodes/box.html b/themes/dead-simple/layouts/shortcodes/box.html deleted file mode 100644 index a2282e5..0000000 --- a/themes/dead-simple/layouts/shortcodes/box.html +++ /dev/null @@ -1,120 +0,0 @@ -{{/* Source:https://gitlab.com/Roneo/hugo-shortcode-roneo-collection */}} - -{{/* Available box types: warning, info, important, tip */}} -{{- $boxType := .Get 0 | default "info" -}} - -{{/* Workaround markdownify inconsistency for single/multiple paragraphs */}} -{{- $raw := (markdownify .Inner | chomp) -}} -{{- $block := findRE "(?is)^<(?:address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h(?:1|2|3|4|5|6)|header|hgroup|hr|li|main|nav|noscript|ol|output|p|pre|section|table|tfoot|ul|video)\\b" $raw 1 -}} - -{{/* Count how many times we've called this shortcode and load the css if it's the first time */}} -{{- if not ($.Page.Scratch.Get "box_count") -}} - - - - {{/* SVG icons */}} - - - - - - - - - - - - - - - -{{- end -}} - -{{- $.Page.Scratch.Add "box_count" 1 -}} - -
    - - - - {{- if or $block (not $raw) }} - {{ $raw }} - {{ else }} -

    {{ $raw }}

    - {{ end -}} -
    diff --git a/themes/dead-simple/layouts/shortcodes/columns.html b/themes/dead-simple/layouts/shortcodes/columns.html deleted file mode 100644 index 536e87e..0000000 --- a/themes/dead-simple/layouts/shortcodes/columns.html +++ /dev/null @@ -1,7 +0,0 @@ -
    -{{ range split .Inner "<--->" }} -{{ printf "
    " | htmlUnescape | safeHTML }} -{{ . | safeHTML }} -{{ printf "
    " | htmlUnescape | safeHTML }} -{{ end }} -
    diff --git a/themes/dead-simple/layouts/shortcodes/tab.html b/themes/dead-simple/layouts/shortcodes/tab.html deleted file mode 100644 index aecc34c..0000000 --- a/themes/dead-simple/layouts/shortcodes/tab.html +++ /dev/null @@ -1,18 +0,0 @@ -{{ if .Parent }} - {{ $name := .Get 0 }} - - {{- if not (.Parent.Scratch.Get "tabs-id") -}} - {{ $id := index (seq 1000 | shuffle) 0 }} - {{ .Parent.Scratch.Add "tabs-id" $id }} - {{- end -}} - - {{ $group := printf "tabs-%d" (.Parent.Scratch.Get "tabs-id") }} - - {{ if not (.Parent.Scratch.Get $group) }} - {{ .Parent.Scratch.Set $group slice }} - {{ end }} - - {{ .Parent.Scratch.Add $group (dict "Name" $name "Content" .Inner) }} -{{ else }} - {{ errorf "%q: 'tab' shortcode must be inside 'tabs' shortcode" .Page.Path }} -{{ end}} diff --git a/themes/dead-simple/layouts/shortcodes/tabs.html b/themes/dead-simple/layouts/shortcodes/tabs.html deleted file mode 100644 index 80cd05a..0000000 --- a/themes/dead-simple/layouts/shortcodes/tabs.html +++ /dev/null @@ -1,18 +0,0 @@ -{{ if .Inner }}{{ end }} - -{{ $id := .Scratch.Get "tabs-id" }} -{{ $group := printf "tabs-%d" $id }} - -
    -{{- range $index, $tab := .Scratch.Get $group -}} - {{ $individualTabId := printf "%s-%d" $group $index }} - - -
    - {{- .Content | markdownify | safeHTML -}} -
    -{{- end -}} -
    -{{ .Scratch.Delete "tabs-id" }} diff --git a/themes/dead-simple/layouts/shortcodes/threeimg.html b/themes/dead-simple/layouts/shortcodes/threeimg.html deleted file mode 100644 index 32529c6..0000000 --- a/themes/dead-simple/layouts/shortcodes/threeimg.html +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/themes/dead-simple/layouts/shortcodes/twoimg.html b/themes/dead-simple/layouts/shortcodes/twoimg.html deleted file mode 100644 index 2d863aa..0000000 --- a/themes/dead-simple/layouts/shortcodes/twoimg.html +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/themes/dead-simple/static/js/lunr.js b/themes/dead-simple/static/js/lunr.js deleted file mode 100644 index 286b389..0000000 --- a/themes/dead-simple/static/js/lunr.js +++ /dev/null @@ -1 +0,0 @@ -!function(){var e,t,r,i,n,s,o,a,u,l,c,h,d,f,p,y,m,g,x,v,w,Q,k,S,E,L,b,P,T,O,I,R,F=function(e){var t=new F.Builder;return t.pipeline.add(F.trimmer,F.stopWordFilter,F.stemmer),t.searchPipeline.add(F.stemmer),e.call(t,t),t.build()};F.version="2.3.9",F.utils={},F.utils.warn=(e=this,function(t){e.console&&console.warn&&console.warn(t)}),F.utils.asString=function(e){return null==e?"":e.toString()},F.utils.clone=function(e){if(null==e)return e;for(var t=Object.create(null),r=Object.keys(e),i=0;i0){var u=F.utils.clone(t)||{};u.position=[o,a],u.index=n.length,n.push(new F.Token(r.slice(o,s),u))}o=s+1}}return n},F.tokenizer.separator=/[\s\-]+/,F.Pipeline=function(){this._stack=[]},F.Pipeline.registeredFunctions=Object.create(null),F.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&F.utils.warn("Overwriting existing registered function: "+t),e.label=t,F.Pipeline.registeredFunctions[e.label]=e},F.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||F.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},F.Pipeline.load=function(e){var t=new F.Pipeline;return e.forEach((function(e){var r=F.Pipeline.registeredFunctions[e];if(!r)throw new Error("Cannot load unregistered function: "+e);t.add(r)})),t},F.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach((function(e){F.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)}),this)},F.Pipeline.prototype.after=function(e,t){F.Pipeline.warnIfFunctionNotRegistered(t);var r=this._stack.indexOf(e);if(-1==r)throw new Error("Cannot find existingFn");r+=1,this._stack.splice(r,0,t)},F.Pipeline.prototype.before=function(e,t){F.Pipeline.warnIfFunctionNotRegistered(t);var r=this._stack.indexOf(e);if(-1==r)throw new Error("Cannot find existingFn");this._stack.splice(r,0,t)},F.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},F.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r1&&(se&&(r=n),s!=e);)i=r-t,n=t+Math.floor(i/2),s=this.elements[2*n];return s==e||s>e?2*n:sa?l+=2:o==a&&(t+=r[u+1]*i[l+1],u+=2,l+=2);return t},F.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},F.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t0){var s,o=n.str.charAt(0);o in n.node.edges?s=n.node.edges[o]:(s=new F.TokenSet,n.node.edges[o]=s),1==n.str.length&&(s.final=!0),i.push({node:s,editsRemaining:n.editsRemaining,str:n.str.slice(1)})}if(0!=n.editsRemaining){if("*"in n.node.edges)var a=n.node.edges["*"];else{a=new F.TokenSet;n.node.edges["*"]=a}if(0==n.str.length&&(a.final=!0),i.push({node:a,editsRemaining:n.editsRemaining-1,str:n.str}),n.str.length>1&&i.push({node:n.node,editsRemaining:n.editsRemaining-1,str:n.str.slice(1)}),1==n.str.length&&(n.node.final=!0),n.str.length>=1){if("*"in n.node.edges)var u=n.node.edges["*"];else{u=new F.TokenSet;n.node.edges["*"]=u}1==n.str.length&&(u.final=!0),i.push({node:u,editsRemaining:n.editsRemaining-1,str:n.str.slice(1)})}if(n.str.length>1){var l,c=n.str.charAt(0),h=n.str.charAt(1);h in n.node.edges?l=n.node.edges[h]:(l=new F.TokenSet,n.node.edges[h]=l),1==n.str.length&&(l.final=!0),i.push({node:l,editsRemaining:n.editsRemaining-1,str:c+n.str.slice(2)})}}}return r},F.TokenSet.fromString=function(e){for(var t=new F.TokenSet,r=t,i=0,n=e.length;i=e;t--){var r=this.uncheckedNodes[t],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}},F.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},F.Index.prototype.search=function(e){return this.query((function(t){new F.QueryParser(e,t).parse()}))},F.Index.prototype.query=function(e){for(var t=new F.Query(this.fields),r=Object.create(null),i=Object.create(null),n=Object.create(null),s=Object.create(null),o=Object.create(null),a=0;a1?1:e},F.Builder.prototype.k1=function(e){this._k1=e},F.Builder.prototype.add=function(e,t){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=t||{},this.documentCount+=1;for(var n=0;n=this.length)return F.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},F.QueryLexer.prototype.width=function(){return this.pos-this.start},F.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},F.QueryLexer.prototype.backup=function(){this.pos-=1},F.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=F.QueryLexer.EOS&&this.backup()},F.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(F.QueryLexer.TERM)),e.ignore(),e.more())return F.QueryLexer.lexText},F.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(F.QueryLexer.EDIT_DISTANCE),F.QueryLexer.lexText},F.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(F.QueryLexer.BOOST),F.QueryLexer.lexText},F.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(F.QueryLexer.TERM)},F.QueryLexer.termSeparator=F.tokenizer.separator,F.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==F.QueryLexer.EOS)return F.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return F.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(F.QueryLexer.TERM),F.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(F.QueryLexer.TERM),F.QueryLexer.lexBoost;if("+"==t&&1===e.width())return e.emit(F.QueryLexer.PRESENCE),F.QueryLexer.lexText;if("-"==t&&1===e.width())return e.emit(F.QueryLexer.PRESENCE),F.QueryLexer.lexText;if(t.match(F.QueryLexer.termSeparator))return F.QueryLexer.lexTerm}else e.escapeCharacter()}},F.QueryParser=function(e,t){this.lexer=new F.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0},F.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=F.QueryParser.parseClause;e;)e=e(this);return this.query},F.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},F.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},F.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},F.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(null!=t)switch(t.type){case F.QueryLexer.PRESENCE:return F.QueryParser.parsePresence;case F.QueryLexer.FIELD:return F.QueryParser.parseField;case F.QueryLexer.TERM:return F.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+t.type;throw t.str.length>=1&&(r+=" with value '"+t.str+"'"),new F.QueryParseError(r,t.start,t.end)}},F.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(null!=t){switch(t.str){case"-":e.currentClause.presence=F.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=F.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+t.str+"'";throw new F.QueryParseError(r,t.start,t.end)}var i=e.peekLexeme();if(null==i){r="expecting term or field, found nothing";throw new F.QueryParseError(r,t.start,t.end)}switch(i.type){case F.QueryLexer.FIELD:return F.QueryParser.parseField;case F.QueryLexer.TERM:return F.QueryParser.parseTerm;default:r="expecting term or field, found '"+i.type+"'";throw new F.QueryParseError(r,i.start,i.end)}}},F.QueryParser.parseField=function(e){var t=e.consumeLexeme();if(null!=t){if(-1==e.query.allFields.indexOf(t.str)){var r=e.query.allFields.map((function(e){return"'"+e+"'"})).join(", "),i="unrecognised field '"+t.str+"', possible fields: "+r;throw new F.QueryParseError(i,t.start,t.end)}e.currentClause.fields=[t.str];var n=e.peekLexeme();if(null==n){i="expecting term, found nothing";throw new F.QueryParseError(i,t.start,t.end)}if(n.type===F.QueryLexer.TERM)return F.QueryParser.parseTerm;i="expecting term, found '"+n.type+"'";throw new F.QueryParseError(i,n.start,n.end)}},F.QueryParser.parseTerm=function(e){var t=e.consumeLexeme();if(null!=t){e.currentClause.term=t.str.toLowerCase(),-1!=t.str.indexOf("*")&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(null!=r)switch(r.type){case F.QueryLexer.TERM:return e.nextClause(),F.QueryParser.parseTerm;case F.QueryLexer.FIELD:return e.nextClause(),F.QueryParser.parseField;case F.QueryLexer.EDIT_DISTANCE:return F.QueryParser.parseEditDistance;case F.QueryLexer.BOOST:return F.QueryParser.parseBoost;case F.QueryLexer.PRESENCE:return e.nextClause(),F.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new F.QueryParseError(i,r.start,r.end)}else e.nextClause()}},F.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(null!=t){var r=parseInt(t.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new F.QueryParseError(i,t.start,t.end)}e.currentClause.editDistance=r;var n=e.peekLexeme();if(null!=n)switch(n.type){case F.QueryLexer.TERM:return e.nextClause(),F.QueryParser.parseTerm;case F.QueryLexer.FIELD:return e.nextClause(),F.QueryParser.parseField;case F.QueryLexer.EDIT_DISTANCE:return F.QueryParser.parseEditDistance;case F.QueryLexer.BOOST:return F.QueryParser.parseBoost;case F.QueryLexer.PRESENCE:return e.nextClause(),F.QueryParser.parsePresence;default:i="Unexpected lexeme type '"+n.type+"'";throw new F.QueryParseError(i,n.start,n.end)}else e.nextClause()}},F.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(null!=t){var r=parseInt(t.str,10);if(isNaN(r)){var i="boost must be numeric";throw new F.QueryParseError(i,t.start,t.end)}e.currentClause.boost=r;var n=e.peekLexeme();if(null!=n)switch(n.type){case F.QueryLexer.TERM:return e.nextClause(),F.QueryParser.parseTerm;case F.QueryLexer.FIELD:return e.nextClause(),F.QueryParser.parseField;case F.QueryLexer.EDIT_DISTANCE:return F.QueryParser.parseEditDistance;case F.QueryLexer.BOOST:return F.QueryParser.parseBoost;case F.QueryLexer.PRESENCE:return e.nextClause(),F.QueryParser.parsePresence;default:i="Unexpected lexeme type '"+n.type+"'";throw new F.QueryParseError(i,n.start,n.end)}else e.nextClause()}},I=this,R=function(){return F},"function"==typeof define&&define.amd?define(R):"object"==typeof exports?module.exports=R():I.lunr=R()}(); diff --git a/themes/dead-simple/static/js/search.js b/themes/dead-simple/static/js/search.js deleted file mode 100644 index b802865..0000000 --- a/themes/dead-simple/static/js/search.js +++ /dev/null @@ -1,51 +0,0 @@ -function displayResults (results, store) { - const searchResults = document.getElementById('results') - if (results.length) { - let resultList = '' - // Iterate and build result list elements - for (const n in results) { - const item = store[results[n].ref] - resultList += '
  • ' + item.title + '

    ' - resultList += '

    ' + item.content.substring(0, 150) + '...

  • ' - } - searchResults.innerHTML = resultList - } else { - searchResults.innerHTML = 'No results found.' - } -} - -// Get the query parameter(s) -const params = new URLSearchParams(window.location.search) -const query = params.get('query') - -// Perform a search if there is a query -if (query) { - // Retain the search input in the form when displaying results - document.getElementById('search-input').setAttribute('value', query) - - const idx = lunr(function () { - this.ref('id') - this.field('title', { - boost: 15 - }) - this.field('tags') - this.field('content', { - boost: 10 - }) - - for (const key in window.store) { - this.add({ - id: key, - title: window.store[key].title, - tags: window.store[key].category, - content: window.store[key].content - }) - } - }) - - // Perform the search - const results = idx.search(query) - // Update the list with results - displayResults(results, window.store) -} - diff --git a/themes/dead-simple/theme.toml b/themes/dead-simple/theme.toml deleted file mode 100644 index 8b5dab3..0000000 --- a/themes/dead-simple/theme.toml +++ /dev/null @@ -1,28 +0,0 @@ -name = "dead-simple" -license = "MIT" -licenselink = "https://github.com/barklan/hugo-dead-simple/blob/main/LICENSE" -description = "Dead simple Hugo theme." -homepage = "https://github.com/barklan/hugo-dead-simple" -tags = [ - "blog", - "company", - "documentation", - "docs", - "minimal", - "responsive", - "light", - "simple", - "clean" -] -features = [ - "responsive", - "single-column", - "blog", - "table-of-contents", - "favicon" -] -min_version = "0.83.0" - -[author] - name = "Gleb Buzin" - homepage = "https://github.com/barklan"