damnit four

This commit is contained in:
2024-10-28 16:26:25 -05:00
parent 44ad8cb367
commit 7966b0bcff
71 changed files with 4338 additions and 0 deletions

View File

@ -0,0 +1,7 @@
{{ define "main" }}
<section id="404">
<p>This is not the page you are looking for...</p>
</section>
{{ end }}

View File

@ -0,0 +1,6 @@
{{ partial "header" . }}
{{ block "main" . }}
{{ end }}
{{ partialCached "footer" . }}

View File

@ -0,0 +1,31 @@
{{ define "main" }}
<section id="list">
{{ if eq .Data.Singular "tag" }}
<h2>#{{ .Title | lower }}</h2>
{{ else }}
<h2>{{ .Title }}</h2>
{{ end }}
{{ .Content }}
{{ range (.Paginate (.Data.Pages.GroupByDate "2006")).PageGroups }}
<h3>{{ .Key }}</h3>
<ul>
{{ range .Pages }}
<li>
<a href="{{ .Permalink }}">{{ if .Draft }}{{ T "draft" }}: {{end}}{{ .Title | markdownify }}</a>
<time class="date-meta">{{ .Date.Format "Jan 2" }}</time>
</li>
{{ end }}
</ul>
{{ end }}
</section>
{{ template "_internal/pagination.html" . }}
{{ end }}

View File

@ -0,0 +1,30 @@
{{/***
* Override the Hugo RSS feed default as that only shows a summary of the post,
* not the whole article which is what most people really want.
***/}}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Params.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Params.Author.email }}
<webMaster>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{ with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }}
{{ range where .Site.RegularPages "Section" "in" site.Params.mainSections }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Params.Author.email }}<author>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>{{ .Content | replaceRE `[\x00-\x1F\x7F]` "" | html}}</description>
</item>
{{ end }}
</channel>
</rss>

View File

@ -0,0 +1,6 @@
{{ define "main" }}
{{ partial "article" . }}
{{ partial "single_footer" . }}
{{ end }}

View File

@ -0,0 +1,19 @@
{{ define "main" }}
<section id="list">
{{ $baseurl := .Site.BaseURL }}
<h2>{{ .Title }}</h2>
{{ .Content }}
<ul>
{{ range $key, $value := .Data.Terms }}
<li><a href="{{ $key | urlize }}">{{ $key }}</a> <span class="count">({{ .Count }} entries)</span></li>
{{ end }}
</ul>
</section>
{{ end }}

View File

@ -0,0 +1,24 @@
{{ define "main" }}
<section id="home">
<ul>
{{ $pages := where site.RegularPages "Type" "posts" }}
{{ $paginator := .Paginate $pages }}
{{ range $index, $page := $paginator.Pages }}
<li {{if eq $index 0}}class="first" {{end}}>
<h1><a href="{{ $page.Permalink }}" title="{{ $page.Title }}">{{ .Title }}</a></h1>
{{ partial "aside" . }}
{{ partial "featured_image" .}}
<p>{{ .Summary }}</p>
{{ if .Truncated }}
<a href="{{ .RelPermalink }}">{{ T "readMore" }}</a>
{{ end }}
</li>
{{ end }}
</ul>
</section>
{{ template "_internal/pagination.html" . }}
{{ end }}

View File

@ -0,0 +1,15 @@
<article>
<h1>{{ .Title }}</h1>
{{ if or (not (isset .Params "meta")) (eq .Params.meta true) }}
{{ partial "aside" . }}
{{ end }}
{{ if not (.Params.replace_site_logo) }}
{{ partial "featured_image" . }}
{{ end }}
{{ .Content }}
</article>

View File

@ -0,0 +1,36 @@
<aside>
<ul>
<li>
<time class="post-date" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}">{{ .Date.Format "Jan 2, 2006" }}</time>
</li>
{{ if ne .Date .Lastmod }}
<li>
{{ T "modifiedOn" }} <time datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}">{{ .Lastmod.Format "Jan 2, 2006" }}</time>
</li>
{{ end }}
{{ if .Params.categories }}
<li>
{{ T "categories" }}
<em>
{{ range $i, $c := .Params.categories }}
{{ if $i }}, {{ end }}
<a href="{{ relLangURL ( printf "categories/%s" ( $c | urlize ) ) }}">{{ $c }}</a>
{{ end }}
</em>
</li>
{{ end }}
{{ if .Params.tags }}
<li>
<em>
{{ range $i, $t := .Params.tags }}
{{ if $i }}, {{ end }}
<a href="{{ relLangURL ( printf "tags/%s" ( $t | urlize ) ) }}">#{{ $t }}</a>
{{ end }}
</em>
</li>
{{ end }}
<li>{{ T "readingTime" .ReadingTime }}</li>
</ul>
</aside>

View File

@ -0,0 +1,63 @@
<section class="comments-block">
<button id="show-comments" style="display: none;"><i class="fa fa-comments"></i> {{ T "comments" }}</button>
</section>
<section id="disqus_thread"></section>
<script>
(function () {
// Don't ever inject Disqus on localhost--it creates unwanted
// discussions from 'localhost:1313' on your Disqus account...
if (window.location.hostname == "localhost")
return;
var disqus_loaded = false;
var disqus_shortname = '{{ .Site.Config.Services.Disqus.Shortname }}';
var disqus_button = document.getElementById("show-comments");
var disqus_autoload = {{ .Site.Params.commentAutoload }};
var disable_comment = {{ .Params.disableComments }};
if (disable_comment)
return;
disqus_button.style.display = "";
if (disqus_autoload){
disqus();
}else{
disqus_button.addEventListener("click", disqus, false);
}
function disqus() {
if (!disqus_loaded) {
disqus_loaded = true;
var e = document.createElement("script");
e.type = "text/javascript";
e.async = true;
e.src = "//" + disqus_shortname + ".disqus.com/embed.js";
(document.getElementsByTagName("head")[0] ||
document.getElementsByTagName("body")[0])
.appendChild(e);
//Hide the button after opening
document.getElementById("show-comments").style.display = "none";
}
}
//Opens comments when linked to directly
var hash = window.location.hash.substr(1);
if (hash.length > 8) {
if (hash.substring(0, 8) == "comment-") {
disqus();
}
}
//Remove this is you don't want to load comments for search engines
if (/bot|google|baidu|bing|msn|duckduckgo|slurp|yandex/i.test(navigator.userAgent)) {
disqus();
}
})();
</script>

View File

@ -0,0 +1,7 @@
{{if isset .Params "images" }}
<div class="featured_image">
<a href="{{ .Permalink }}" title="{{ .Title }}">
<img src="{{ index .Params.images 0 }}">
</a>
</div>
{{ end }}

View File

@ -0,0 +1,27 @@
</main>
<footer>
<ul>
<li>
<h6>{{ if .Site.Copyright }}{{ .Site.Copyright | markdownify }} | {{ end }}
{{ T "rendered" }} <a href="https://gohugo.io" title="Hugo">Hugo</a> |
<a href="{{.Site.BaseURL}}index.xml">{{ T "subscribe" }} </a></h6>
</li>
{{ $currentPage := . }}
{{ range .Site.Menus.footer }}
<li>
<h6><a class="{{if or ($currentPage.IsMenuCurrent "footer" .) ($currentPage.HasMenuCurrent "footer" .) }}active{{end}}" href="{{ .URL | relURL }}">
<i class="fa-li fa {{ .Pre }} fa-lg"></i><span>{{ .Name }}</span>
</a></h6>
</li>
{{ end }}
</ul>
</footer>
</div>
<script src="{{ "js/scripts.js" | relURL }}"></script>
{{ if .Site.Config.Services.GoogleAnalytics }}
{{ template "_internal/google_analytics.html" . }}
{{ end }}
{{ partial "user_footer" . }}
</body>
</html>

View File

@ -0,0 +1,46 @@
<!doctype html>
<html lang="{{ .Site.LanguageCode | default "en" }}">
<head>
<title>{{ if and (not .IsHome) (.Title) }}{{ .Params.Title }} - {{ end }}{{ .Site.Title }}</title>
{{ partial "meta" . }}
{{ partialCached "header_includes" . -}}
{{ if (templates.Exists "partials/header_supplement.html") }}
{{ partial "header_supplement.html" . -}}
{{ end }}
</head>
<body>
<div id="container">
<header>
{{ partial "site_logo" . }}
<h1>
<a href="{{ relLangURL "" }}">{{ .Site.Title | markdownify }}</a>
</h1>
<ul id="social-media">
{{- range .Site.Languages -}}
{{ if ne .LanguageName $.Site.Language.LanguageName }}
<li><a href="/{{ .Lang }}">{{ .LanguageName }}</a></li>
{{ end }}
{{- end -}}
{{- range .Site.Data.social.social_icons -}}
{{- if isset $.Site.Params.Author .id }}
<li>
<a href="{{ printf .url (index $.Site.Params.Author .id) }}" title="{{ .title }}">
<i class="{{ .icon }} fa-lg"></i>
</a>
</li>
{{- end -}}
{{ end }}
</ul>
{{ with .Site.Params.tagline }}
<p><em>{{ . | markdownify }}</em></p>
{{ end }}
</header>
{{ partial "nav" . }}
<main>

View File

@ -0,0 +1,32 @@
{{ with .Site.Params.favicon}}
<link rel="shortcut icon" href="{{ . }}" />
{{ end }}
{{- if .Site.Params.mathjax }}
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<script src="/js/mathjax-config.js" defer></script>
<script src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=es6"></script>
{{- end }}
{{- if .Site.Params.katex }}
<link rel="stylesheet" href="/css/katex.min.css" >
<script defer src="/js/katex.min.js"></script>
<script defer src="/js/auto-render.min.js" onload="renderMathInElement(document.body);"></script>
{{- end }}
<link rel="stylesheet" href="{{ "css/normalize.min.css" | relURL }}" />
<link rel="stylesheet" href="{{ "fontawesome/css/all.min.css" | absURL }}" />
{{ if .Site.Params.google_fonts }}
{{ $url_part := (delimit .Site.Params.google_fonts "|") | safeHTMLAttr }}
<link {{ printf "href=\"//fonts.googleapis.com/css?family=%s\"" $url_part | safeHTMLAttr }} rel="stylesheet">
{{ else}}
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Slab|Ruda" />
{{ end }}
{{ if .Site.Params.disableDarkModeCSS }}
<link rel="stylesheet" type="text/css" href="{{ "css/styles-light.css" | relURL}}" />
{{ else}}
<link rel="stylesheet" type="text/css" href="{{ "css/styles.css" | relURL}}" />
{{- end -}}
{{- range .Site.Params.customCSS -}}
<link rel='stylesheet' href='{{ . | absURL }}'>
{{- end -}}

View File

@ -0,0 +1,10 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="{{ .Site.Params.description | default "The HTML5 Herald" }}" />
<meta name="author" content="{{ .Params.Author | default .Site.Params.Author.name }}" />
{{- with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{- end -}}
{{ template "_internal/opengraph.html" . }}
{{ template "_internal/twitter_cards.html" . }}
{{ hugo.Generator -}}

View File

@ -0,0 +1,12 @@
{{ $currentPage := . }}
<nav>
<ul>
{{ range .Site.Menus.main }}
<li>
<a class="{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }}active{{end}}" href="{{ .URL | relURL }}">
<i class="fa-li fa {{ .Pre }} fa-lg"></i><span>{{ .Name }}</span>
</a>
</li>
{{ end }}
</ul>
</nav>

View File

@ -0,0 +1,24 @@
{{ if not .Params.meta }}
<section class="post-nav">
<ul>
<li>
{{ with .PrevInSection }}
<a href="{{.Permalink}}"><i class="fa fa-chevron-circle-left"></i> {{ .Title }}</a>
{{ end }}
</li>
<li>
{{ with .NextInSection }}
<a href="{{.Permalink}}">{{ .Title }} <i class="fa fa-chevron-circle-right"></i> </a>
{{ end }}
</li>
</ul>
</section>
{{ if not .Params.disableComments }}
{{ if .Site.Params.UtterancesRepo }}
{{ partial "utterances" . }}
{{ end }}
{{ if .Site.Config.Services.Disqus.Shortname }}
{{ partial "disqus" . }}
{{ end }}
{{ end }}
{{ end }}

View File

@ -0,0 +1,7 @@
{{ if or (.Site.Params.site_logo) (.Params.replace_site_logo) }}
<div class="site_logo featured_image">
<a href="{{ relLangURL "/" }}">
<img class="{{ .Site.Params.site_logo_classes }}" src="{{ if .Params.replace_site_logo }}{{ index .Params.images 0 }}{{ else }}{{ .Site.Params.site_logo }}{{ end }}">
</a>
</div>
{{ end }}

View File

@ -0,0 +1,29 @@
<section id="utterances"></section>
<script>
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
let s = document.createElement("script");
s.setAttribute("repo", "{{ .Site.Params.utterancesRepo }}");
s.src = "https://utteranc.es/client.js";
{{ with .Site.Params.utterancesIssueTerm }}
s.setAttribute("issue-term", "{{ . }}");
{{ end }}
{{ with .Site.Params.utterancesDarkTheme }}
s.setAttribute("theme", "{{ . }}")
{{ end }}
document.getElementById("utterances").innerHTML = "";
document.getElementById("utterances").appendChild(s);
} else {
let s = document.createElement("script");
s.setAttribute("repo", "{{ .Site.Params.utterancesRepo }}");
s.src = "https://utteranc.es/client.js";
{{ with .Site.Params.utterancesIssueTerm }}
s.setAttribute("issue-term", "{{ . }}");
{{ end }}
{{ with .Site.Params.utterancesLightTheme }}
s.setAttribute("theme", "{{ . }}")
{{ end }}
document.getElementById("utterances").innerHTML = "";
document.getElementById("utterances").appendChild(s);
}
</script>