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