1
0
Fork 0

Remove dead simple theme

Achieves 0% javascript with this change
This commit is contained in:
Ethan Marshall 2024-08-07 16:05:26 +01:00
parent 68c64da4fe
commit 92569dd0af
Signed by: ejv2
GPG key ID: EC2FAEF4DB8968D8
43 changed files with 0 additions and 1527 deletions

View file

@ -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

View file

@ -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.

View file

@ -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...
<img src="https://raw.githubusercontent.com/barklan/hugo-dead-simple/main/images/screenshot.png"/>
## 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)

View file

@ -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);
}
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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%);
}

View file

@ -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;
}

View file

@ -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);
}

View file

@ -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;
}

View file

@ -1,3 +0,0 @@
module github.com/barklan/hugo-dead-simple
go 1.18

Binary file not shown.

Before

Width:  |  Height:  |  Size: 480 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 492 KiB

View file

@ -1,5 +0,0 @@
{{ partial "header.html" . }}
404 NOT FOUND
{{ partial "footer.html" . }}

View file

@ -1,3 +0,0 @@
<p class="imgp">
<img loading="lazy" src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}"{{ end }} />
</p>

View file

@ -1 +0,0 @@
<a href="{{ .Destination | safeURL }}" {{ with .Title}}title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noreferrer nofollow"{{ end }}>{{ .Text | safeHTML }}</a>

View file

@ -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 -}}

View file

@ -1,20 +0,0 @@
{{ partial "header.html" . }}
<div class="home-content">{{ .Content }}</div>
{{ if .IsHome }}
<!--TODO: replace with faster search-->
{{ partial "search-form.html" . }}
<ul id="results"></ul>
{{ range .Sections }}
<h2 class="section-title">{{ .CurrentSection.Title }}</h2>
{{ .CurrentSection.Content }}
{{ partial "post_list.html" . }}
{{ end }}
{{ else }}
<h2 class="section-title">{{ .CurrentSection.Title }}</h2>
{{ partial "post_list.html" . }}
{{ end }}
{{ partial "footer.html" . }}

View file

@ -1,43 +0,0 @@
{{ partial "header.html" . }}
{{ if not .Params.notitle }}
<div id="single-header">
<h1>
{{ .Title | markdownify }}
</h1>
<div id="single-meta">
{{ if .Params.subtitle }}
<p id="subtitle">{{ .Params.subtitle }}</p>
{{ end }}
{{ if .Params.date }}
<span class="datesub">{{ .Date.Format "Jan 2, 2006" }}{{ if .GitInfo }} &nbsp;&nbsp; m. {{
.Lastmod.Format "Jan 2, 2006" }}{{ end }}</span>
{{ end }} {{ partial "tags.html" .}}
</div>
</div>
{{ else }}
<div style="padding-bottom: 1px;"></div>
{{ end }}
{{ if .Params.toc }}
<aside class="hidden lg:block toc " id="tableOfContentContainer">
{{ .TableOfContents }}
</aside>
{{ end }}
<main>{{ .Content }}</main>
{{ if .Params.Next }}
<br>
<hr>
{{ with .PrevInSection }}
Next: <a href="{{ .Permalink }}">{{ .Title }}</a>
{{ end }}
{{ end }}
{{ if .Params.math }}
{{ partial "math.html" . }}
{{ end }}
{{ partial "footer.html" . }}

View file

@ -1,13 +0,0 @@
{{ partial "header.html" . }}
<h1>{{ .Title }}</h1>
<ul class="post-list">
{{ range .Pages }}
{{ partial "post_row.html" . }}
{{ end }}
</ul>
{{ partial "footer.html" . }}

View file

@ -1,13 +0,0 @@
{{ partial "header.html" . }}
<h1>{{ .Title }}</h1>
<ul class="terms">
{{ range .Data.Terms }}
<li>
<a href="{{ .Page.RelPermalink }}">{{ .Page.Title }}</a> - {{ .Count }}
</li>
{{ end }}
</ul>
{{ partial "footer.html" . }}

View file

@ -1,9 +0,0 @@
<br>
<footer>
{{ partial "footer_scripts.html" . }}
{{ partial "search-index.html" . }}
</footer>
</body>
</html>

View file

@ -1,127 +0,0 @@
<!-- Shortcuts. -->
<script defer>
document.addEventListener("keydown", function (e) {
if (document.activeElement.isContentEditable) {
return false;
}
if (document.activeElement.tagName == "INPUT") {
return false;
}
if (e.altKey || e.ctrlKey || e.shiftKey) {
return false;
}
var key = e.key;
if (key === "h") {
e.preventDefault();
e.stopPropagation();
window.location.href = "/";
} else if (key === "t") {
e.preventDefault();
e.stopPropagation();
window.location.href = `https://${location.hostname}/tags`;
} else if (key === "i") {
e.preventDefault();
e.stopPropagation();
const inputs = document.querySelectorAll("input");
for (let i = 0; i < inputs.length; i++) {
if (inputs[i].offsetParent !== null) {
inputs[i].selectionStart = inputs[i].selectionEnd =
inputs[i].value.length;
inputs[i].focus();
break;
}
}
}
return false;
});
</script>
<!-- Dynamic toc. -->
<script defer>
function throttle(fn, wait) {
var time = Date.now();
return function () {
var now = Date.now()
if (time + wait - now < 0) {
fn();
time = now;
}
};
}
function scrollHandler() {
const anchors = Array.from(document.querySelectorAll("body h2, body h3"));
function scrollCallback() {
var scrollTop = window.pageYOffset || document.documentElement.scrollTop;
// Highlight the last scrolled-to: set everything inactive first
for (var i = 0; i < anchors.length; i++) {
var anchorId = anchors[i].getAttribute("id");
var link = document.querySelector(
'nav ul li a[href="#' + anchorId + '"]',
);
if (link) {
link.classList.remove("active-toc");
}
}
// Then iterate backwards, on the first match highlight it and break
for (var i = anchors.length - 1; i >= 0; i--) {
var offsetTop = anchors[i].offsetTop;
if (scrollTop > offsetTop - 75) {
var anchorId = anchors[i].getAttribute("id");
var link = document.querySelector(
'nav ul li a[href="#' + anchorId + '"]',
);
if (link) {
link.classList.add("active-toc");
break;
}
}
}
}
window.addEventListener(
"scroll",
throttle(scrollCallback, 300),
);
}
setTimeout(scrollHandler, 100);
</script>
<script defer>
function addCopyButtonToCodeBlocks() {
// Get all code blocks with a class of "language-*"
const codeBlocks = document.querySelectorAll('code[class^="language-"]');
codeBlocks.forEach((codeBlock) => {
const copyButton = document.createElement("button");
copyButton.classList.add("copy-code-button");
copyButton.innerHTML = "copy";
// Add a click event listener to the copy button
copyButton.addEventListener("click", () => {
// Copy the code inside the code block to the clipboard
const elements = codeBlock.querySelectorAll(".cl");
let codeToCopy = "";
elements.forEach((element) => {
codeToCopy += element.innerText;
});
navigator.clipboard.writeText(codeToCopy);
// Update the copy button text to indicate that the code has been copied
copyButton.innerHTML = "copied!";
setTimeout(() => {
copyButton.innerHTML = "copy";
}, 1500);
});
// Add the copy button to the code block
codeBlock.parentNode.before(copyButton);
});
}
setTimeout(function () {
addCopyButtonToCodeBlocks();
}, 100);
</script>

View file

@ -1,74 +0,0 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
<link rel="apple-touch-icon" sizes="180x180" href="{{ relURL "apple-touch-icon.png" }}"}>
<link rel="icon" type="image/png" sizes="32x32" href="{{ relURL "favicon-32x32.png" }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ relURL "favicon-16x16.png" }}">
<link rel="manifest" href="{{ relURL "site.webmanifest" }}">
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#ffffff" />
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#1b1b1b" />
<meta name="description" content="{{ .Title }}">
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
{{ if .IsHome }}
<title>{{ .Site.Title }}</title>
{{ else }}
<title>{{ .Title }} | {{ .Site.Title }}</title>
{{ end }}
<!-- Prevent flicker on page load. -->
<style>
:root {
--background: #ffffff;
}
@media (prefers-color-scheme: dark) {
:root {
--background: #1b1b1b;
}
}
html {
background-color: var(--background);
}
body {
background-color: var(--background);
}
</style>
{{ $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 }}
<link rel="stylesheet" type="text/css" href="{{ $CSS.RelPermalink }}" media="all">
</head>
<body>
{{ if not .Params.nomenu }}
<nav>
<ul class="menu">
{{ range .Site.Menus.main }}
<li><a tabindex="-1" class="menu-link" href="{{ .URL | relURL }}">{{ safeHTML .Name }}</a></li>
{{ end }}
</ul>
</nav>
{{ end }}

View file

@ -1,3 +0,0 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min.css" crossorigin="anonymous" referrerpolicy="no-referrer" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/contrib/auto-render.min.js" crossorigin="anonymous" referrerpolicy="no-referrer" onload="renderMathInElement(document.body);"></script>

View file

@ -1,8 +0,0 @@
<ul class="post-list">
{{ range .CurrentSection.RegularPages }}
{{ partial "post_row.html" . }}
{{ end }}
</ul>

View file

@ -1,23 +0,0 @@
<li>
{{ if not .CurrentSection.Params.nodate }}
<div style="display: grid; grid-template-columns: 7em auto">
<span class="date">{{ .Date.Format "Jan 2, 2006" }}</span>
{{ if .Params.bold }}
<a class="bold-post-in-list" href="{{ .RelPermalink }}"
>{{ .Page.Title | markdownify }}</a
>
{{ else }}
<a href="{{ .RelPermalink }}">{{ .Page.Title | markdownify }}</a>
{{ end }}
</div>
{{ else }}
{{ if .Params.bold }}
<a class="bold-post-in-list" href="{{ .RelPermalink }}"
>{{ .Page.Title | markdownify }}</a
>
{{ else }}
<a href="{{ .RelPermalink }}">{{ .Page.Title | markdownify }}</a>
{{ end }}
{{ end }}
</li>

View file

@ -1,8 +0,0 @@
<form id="search"
action='{{ with .GetPage "/" }}{{.Permalink}}{{end}}' method="get">
<label hidden for="search-input">Search site</label>
<input tabindex="-1" type="text" id="search-input" name="query"
placeholder="search [i] ...">
<!-- <input tabindex="-1" type="submit" value="search"> -->
</form>

View file

@ -1,14 +0,0 @@
<script>
window.store = {
{{ range .Site.Pages }}
"{{ .Permalink }}": {
"title": "{{ .Title }}",
"tags": [{{ range .Params.Tags }}"{{ . }}",{{ end }}],
"content": {{ .Content | plainify }}, // Strip out HTML tags
"url": "{{ .Permalink }}"
},
{{ end }}
}
</script>
<script defer src="{{ relURL "/js/lunr.js" }}"></script>
<script defer src="{{ relURL "/js/search.js" }}"></script>

View file

@ -1,11 +0,0 @@
{{ $taxonomy := "tags" }} {{ with .Param $taxonomy }}
<span id="tags">
&nbsp;&nbsp;
{{ range $index, $tag := . }} {{ with $.Site.GetPage (printf "/%s/%s"
$taxonomy $tag) -}}
<span>
<a href="{{ .Permalink }}">#{{ $tag | urlize }}</a>
</span>&nbsp;
{{- end -}} {{- end -}}
</span>
{{ end }}

View file

@ -1,24 +0,0 @@
<section class="attachments">
<label>{{- (.Get "title") | default "Attachments" -}}{{ with (.Get "caption") }} ({{- . -}}){{ end }}</label>
<div class="attachments-files">
{{- $folderName := default "files" (.Get "folder") -}}
{{- $hasPattern := false -}}
{{- if .Get "pattern" -}}{{- $hasPattern = true -}}{{- end -}}
{{- $folder := path.Join "content" (path.Join .Page.File.Dir $folderName) -}}
<ul>
{{- range readDir $folder -}}
{{- $include := not $hasPattern -}}
{{- if $hasPattern -}}{{- $include = findRE ($.Get "pattern") .Name -}}{{- end -}}
{{- if $include -}}
<li>
<a class="tooltipped tooltipped-n" aria-label="Download" href="{{ ($.Page.Resources.GetMatch (path.Join $folderName .Name)).RelPermalink }}" download>{{- .Name | markdownify -}}</a>
<a class="new-tab tooltipped tooltipped-n" aria-label="Open in new tab" href="{{ ($.Page.Resources.GetMatch (path.Join $folderName .Name)).RelPermalink }}" target="_blank">🔗</a>
&nbsp;
<div class="attachment-size">({{- if le .Size 1024 -}}{{- .Size -}} b{{- else -}}{{- div .Size 1024 -}}kb{{- end -}})</div>
</li>
{{- end -}}
{{- end -}}
</ul>
</div>
</section>

View file

@ -1,42 +0,0 @@
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300&display=swap" rel="stylesheet">
<link href="/fonts/iosevka-extendedlight.woff2" rel="preload" type="font/woff2" as="font" crossorigin="">
<style>
@font-face {
font-family: 'Iosevka Web';
font-display: swap;
font-weight: 300;
font-stretch: expanded;
font-style: normal;
src: url('/fonts/iosevka-extendedlight.woff2') format('woff2');
}
h1, h2 {
font-family: 'Space Grotesk', sans-serif;
}
body {
text-align: justify;
font-family: 'Space Grotesk', sans-serif;
font-size: 17px;
}
code {
font-family: 'Iosevka Web', sans-serif;
font-weight: 300;
font-stretch: expanded;
font-style: normal;
}
pre code {
font-family: 'Iosevka Web', sans-serif;
font-weight: 300;
font-stretch: expanded;
font-style: normal;
font-size: 13.5px;
}
</style>

View file

@ -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") -}}
<style type="text/css">
.box-shortcode {
padding: 1.2em;
padding-top: 1em;
line-height: 1em;
margin-top: 1em;
margin-bottom: 2em;
border-radius: 3px;
color: var(--text);
background: #f3ebe850;
}
.box-title {
margin: -18px -18px 12px;
padding: 4px 18px;
border-radius: 3px 3px 0 0;
font-weight: 700;
color: var(--text);
background: #6ab0de;
}
.box-shortcode.warning .box-title {
background: #ff6b6b;
}
.box-shortcode.warning {
background: #ff6b6b4f;
}
.box-shortcode.info .box-title {
background: #0089e488;
}
.box-shortcode.info {
background: #0089e41c;
}
.box-shortcode.important .box-title {
background: #f7ec2c;
}
.box-shortcode.important {
background: #f7ec2c7d;
}
.box-shortcode.tip .box-title {
background: #a3ffa34d;
}
.box-shortcode.tip {
background: #a3ffa34d;
}
.icon-box {
display: inline-flex;
align-self: center;
margin-right: 8px;
}
.icon-box img,
.icon-box svg {
height: 1em;
width: 1em;
fill: var(--text-dim);
}
.icon-box img,
.icon-box.baseline svg {
top: 0.125em;
position: relative;
}
.box-shortcode p {
margin-bottom: 0.6em;
}
.box-shortcode p:first-of-type {
display: inline;
}
.box-shortcode p:nth-of-type(2) {
margin-top: 0.6em;
}
.box-shortcode p:last-child {
margin-bottom: 0;
}
</style>
{{/* SVG icons */}}
<svg width="0" height="0" display="none" xmlns="http://www.w3.org/2000/svg">
<symbol id="tip-box" viewBox="0 0 512 512" preserveAspectRatio="xMidYMid meet">
<path
d="M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"/>
</symbol>
<symbol id="important-box" viewBox="0 0 512 512" preserveAspectRatio="xMidYMid meet">
<path
d="M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"/>
</symbol>
<symbol id="warning-box" viewBox="0 0 576 512" preserveAspectRatio="xMidYMid meet">
<path
d="M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"/>
</symbol>
<symbol id="info-box" viewBox="0 0 512 512" preserveAspectRatio="xMidYMid meet">
<path
d="M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"/>
</symbol>
</svg>
{{- end -}}
{{- $.Page.Scratch.Add "box_count" 1 -}}
<div class="box box-shortcode {{ $boxType }}" {{ if len .Params | eq 2 }} id="{{ .Get 1 }}" {{ end }}>
<span class="icon-box baseline">
<svg><use href="#{{- $boxType -}}-box"></use></svg>
</span>
{{- if or $block (not $raw) }}
{{ $raw }}
{{ else }}
<p>{{ $raw }}</p>
{{ end -}}
</div>

View file

@ -1,7 +0,0 @@
<div class="md-columns">
{{ range split .Inner "<--->" }}
{{ printf "<div class=\"markdown-inner\">" | htmlUnescape | safeHTML }}
{{ . | safeHTML }}
{{ printf "</div>" | htmlUnescape | safeHTML }}
{{ end }}
</div>

View file

@ -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}}

View file

@ -1,18 +0,0 @@
{{ if .Inner }}{{ end }}
{{ $id := .Scratch.Get "tabs-id" }}
{{ $group := printf "tabs-%d" $id }}
<div class="md-tabs">
{{- range $index, $tab := .Scratch.Get $group -}}
{{ $individualTabId := printf "%s-%d" $group $index }}
<input type="radio" class="hidden" name="{{ $group }}" id="{{ $individualTabId }}" {{ if not $index }}checked="checked"{{ end }} />
<label for="{{ $individualTabId }}">
{{- $tab.Name -}}
</label>
<div class="md-tabs-content markdown-inner">
{{- .Content | markdownify | safeHTML -}}
</div>
{{- end -}}
</div>
{{ .Scratch.Delete "tabs-id" }}

View file

@ -1,13 +0,0 @@
<div class="image-gallery-container">
<ul class="image-gallery-img three-image-gallery">
<li>
<a target="_blank" href="{{ index .Params 0 }}"><img loading="lazy" src="{{ index .Params 0 }}" /></a>
</li>
<li>
<a target="_blank" href="{{ index .Params 1 }}"><img loading="lazy" src="{{ index .Params 1 }}" /></a>
</li>
<li>
<a target="_blank" href="{{ index .Params 2 }}"><img loading="lazy" src="{{ index .Params 2 }}" /></a>
</li>
</ul>
</div>

View file

@ -1,10 +0,0 @@
<div class="image-gallery-container">
<ul class="image-gallery-img">
<li>
<a target="_blank" href="{{ index .Params 0 }}"><img loading="lazy" src="{{ index .Params 0 }}" /></a>
</li>
<li>
<a target="_blank" href="{{ index .Params 1 }}"><img loading="lazy" src="{{ index .Params 1 }}" /></a>
</li>
</ul>
</div>

File diff suppressed because one or more lines are too long

View file

@ -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 += '<li><p><a href="' + item.url + '">' + item.title + '</a></p>'
resultList += '<p>' + item.content.substring(0, 150) + '...</p></li>'
}
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)
}

View file

@ -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"