🎉 Initial commit

This commit is contained in:
James Panther
2021-08-11 15:28:33 +10:00
commit a6a3ee761e
54 changed files with 6713 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
{{ if not .Site.IsServer }}
{{ with .Site.Params.fathomAnalytics.site }}
{{ if isset $.Site.Params.fathomanalytics "domain" }}
<script src="https://{{ $.Site.Params.fathomanalytics.domain }}/script.js" data-site="{{ . }}" defer></script>
{{ end }}
<script src="https://cdn.usefathom.com/script.js" data-site="{{ . }}" defer></script>
{{ end }}
{{ template "_internal/google_analytics.html" . }}
{{ end }}
+23
View File
@@ -0,0 +1,23 @@
<article>
<h3 class="mt-6 text-xl font-semibold">
{{ if isset .Params "externalurl" }}
<a class="hover:underline" href="{{ .Params.externalurl }}" target="_blank" rel="external"
>{{ .Title }}</a
>
<span
class="text-sm cursor-default"
style="vertical-align: super;"
title="Link to external site"
>&#8599;</span
>
{{ else }}
<a class="hover:underline" href="{{ .Permalink }}">{{ .Title }}</a>
{{ end }}
{{ if templates.Exists "partials/extend-article-link.html" }}
{{ partial "extend-article-link.html" . }}
{{ end }}
</h3>
<div class="text-sm text-gray-400 dark:text-gray-500">
{{ partial "meta.html" . }}
</div>
</article>
+50
View File
@@ -0,0 +1,50 @@
<div class="flex items-center pt-8">
{{ with .Site.Author.image }}
<img class="w-24 h-24 !mt-0 !mb-0 mr-4 rounded-full" src="{{ . }}" />
{{ end }}
<div>
{{ with .Site.Author.name }}
<div class="font-semibold leading-6 text-gray-800 dark:text-gray-300">
{{ . }}
</div>
{{ end }}
<div class="flex text-lg text-gray-400 dark:text-gray-500">
{{ with .Site.Author.twitter }}
<a
class="mr-2 hover:text-primary-700 dark:hover:text-primary-400"
href="{{ . }}"
target="_blank"
title="Twitter"
>{{ partial "icon.html" "twitter-brands" }}</a
>
{{ end }}
{{ with .Site.Author.github }}
<a
class="mr-2 hover:text-primary-700 dark:hover:text-primary-400"
href="{{ . }}"
target="_blank"
title="GitHub"
>{{ partial "icon.html" "github-brands" }}</a
>
{{ end }}
{{ with .Site.Author.keybase }}
<a
class="mr-2 hover:text-primary-700 dark:hover:text-primary-400"
href="{{ . }}"
target="_blank"
title="Keybase"
>{{ partial "icon.html" "keybase-brands" }}</a
>
{{ end }}
{{ with .Site.Author.linkedin }}
<a
class="mr-2 hover:text-primary-700 dark:hover:text-primary-400"
href="{{ . }}"
target="_blank"
title="Linkedin"
>{{ partial "icon.html" "linkedin-brands" }}</a
>
{{ end }}
</div>
</div>
</div>
+34
View File
@@ -0,0 +1,34 @@
<footer class="py-10 text-sm">
{{/* Copyright */}}
<p class="text-gray-400 dark:text-gray-500">
{{- with .Site.Copyright }}
{{ . | emojify | markdownify }}
{{- else }}
&copy;
{{ now.Format "2006" }}
{{ .Site.Author.name }}
{{- end }}
</p>
{{/* Theme attribution */}}
{{ if .Site.Params.attribution | default true }}
<p class="text-xs text-gray-300 dark:text-gray-600">
Powered by
<a class="hover:underline" href="https://gohugo.io/" target="_blank">Hugo</a>
&amp;
<a class="hover:underline" href="https://git.io/hugo-congo" target="_blank">Congo</a>
</p>
{{ end }}
</footer>
{{/* Extend footer - eg. for extra scripts, etc. */}}
{{ if templates.Exists "partials/extend-footer.html" }}
{{ partialCached "extend-footer.html" . }}
{{ end }}
{{/* Include mermaid.js only on pages that use the shortcode */}}
{{- if (in (string .Content) "class=\"mermaid\"") -}}
<script src="https://unpkg.com/mermaid@8.11.4/dist/mermaid.min.js"></script>
<script>
mermaid.initialize({ theme: "default" });
</script>
{{- end -}}
+68
View File
@@ -0,0 +1,68 @@
<head>
<meta charset="utf-8" />
{{ with .Site.LanguageCode }}
<meta http-equiv="content-language" content="{{ . }}" />
{{ end }}
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
{{/* Title */}}
{{ if .IsHome -}}
<title>{{ .Site.Title }}</title>
<meta name="title" content="{{ .Site.Title }}" />
{{- else -}}
<title>{{ .Title }} &middot; {{ .Site.Title }}</title>
<meta name="title" content="{{ .Title }} &middot; {{ .Site.Title }}" />
{{- end }}
{{/* Metadata */}}
{{ with .Params.Description -}}
<meta name="description" content="{{ . }}" />
{{- else -}}
<meta name="description" content="{{ $.Site.Params.Description }}" />
{{- end }}
{{ with .Site.Params.keywords -}}
<meta name="keywords" content="{{ . }}" />
{{- end }}
<base href="{{ .Site.BaseURL }}" />
<link rel="canonical" href="{{ .Permalink }}" />
{{/* Styles */}}
<link type="text/css" rel="stylesheet" href="{{ "css/main.css" | absURL }}" />
{{ if (fileExists "static/css/custom.css") -}}
<link type="text/css" rel="stylesheet" href="{{ "css/custom.css" | absURL }}" />
{{- end }}
{{/* Icons */}}
<link rel="apple-touch-icon" sizes="180x180" href="{{ "/apple-touch-icon.png" | absURL }}" />
<link rel="icon" type="image/png" sizes="32x32" href="{{ "/favicon-32x32.png" | absURL }}" />
<link rel="icon" type="image/png" sizes="16x16" href="{{ "/favicon-16x16.png" | absURL }}" />
<link rel="manifest" href="{{ "/site.webmanifest" | absURL }}" />
{{/* Site Verification */}}
{{ with .Site.Params.verification.google }}
<meta name="google-site-verification" content="{{ . }}" />
{{ end }}
{{ with .Site.Params.verification.bing }}
<meta name="msvalidate.01" content="{{ . }}" />
{{ end }}
{{ with .Site.Params.verification.pinterest }}
<meta name="p:domain_verify" content="{{ . }}" />
{{ end }}
{{ with .Site.Params.verification.yandex }}
<meta name="yandex-verification" content="{{ . }}" />
{{ end }}
{{/* Social */}}
{{ template "_internal/opengraph.html" . }}
{{ template "_internal/twitter_cards.html" . }}
{{/* Generator */}}
{{ hugo.Generator }}
{{/* Me */}}
{{ with .Site.Author.name }}<meta name="author" content="{{ . }}" />{{ end }}
{{ with .Site.Author.email }}<link href="mailto:{{ . }}" rel="me" />{{ end }}
{{ with .Site.Author.twitter }}<link href="{{ . }}" rel="me" />{{ end }}
{{ with .Site.Author.keybase }}<link href="{{ . }}" rel="me" />{{ end }}
{{ with .Site.Author.github }}<link href="{{ . }}" rel="me" />{{ end }}
{{ with .Site.Author.linkedin }}<link href="{{ . }}" rel="me" />{{ end }}
{{/* Analytics */}}
{{ partialCached "analytics.html" .Site }}
{{/* Extend head - eg. for custom analytics scripts, etc. */}}
{{ if templates.Exists "partials/extend-head.html" }}
{{ partialCached "extend-head.html" .Site }}
{{ end }}
</head>
+14
View File
@@ -0,0 +1,14 @@
<header class="flex justify-between py-10 font-semibold ">
<div>
<a class="hover:underline" rel="me" href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
</div>
<nav>
<ul class="flex list-none">
{{ range .Site.Menus.main }}
<li class="mr-7 last:mr-0">
<a class="hover:underline" href="{{ .URL }}" title="{{ .Title }}">{{ .Name }}</a>
</li>
{{ end }}
</ul>
</nav>
</header>
+1
View File
@@ -0,0 +1 @@
{{ . | replaceRE "(<h[2-4] id=\"([^\"]+)\".+)(</h[2-9]+>)" `${1}&nbsp;<a class="heading-anchor" href="#${2}" aria-label="Anchor">#</a> ${3}` | safeHTML }}
+4
View File
@@ -0,0 +1,4 @@
<span class="relative inline-block align-text-bottom icon">
{{- $icon:=print "themes/congo/assets/icons/" . ".svg" -}}
{{ readFile $icon | safeHTML }}
</span>
+8
View File
@@ -0,0 +1,8 @@
<time datetime="{{ .Date }}">{{ .Date.Format "2 January 2006" }}</time>
{{ if ne .ReadingTime 0 }}
<span class="px-1">&middot;</span>
<span title="Reading time">
{{ .ReadingTime }}
min{{ if gt .ReadingTime 1 }}s{{ end }}
</span>
{{ end }}
+46
View File
@@ -0,0 +1,46 @@
<!-- See: https://glennmccomb.com/articles/how-to-build-custom-hugo-pagination/ -->
<!-- Assign .Paginator object to a $paginator variable -->
{{ $paginator := .Paginator }}
<!-- If there's more than one page. -->
{{ if gt $paginator.TotalPages 1 }}
<ul class="Pagination">
<!-- Previous page. -->
{{ if $paginator.HasPrev }}
<li class="Pagination-item Pagination-item--previous">
<a
href="{{ $paginator.Prev.URL }}"
class="Pagination-itemLink Pagination-itemLink--previous"
rel="prev"
>
&larr;
</a>
</li>
{{ end }}
<!-- Page numbers. -->
{{ range $paginator.Pagers }}
<li
class="Pagination-item{{ if eq . $paginator }}
Pagination-item--current
{{ end }}"
>
<a href="{{ .URL }}" class="Pagination-itemLink"> {{ .PageNumber }} </a>
</li>
{{ end }}
<!-- Next page. -->
{{ if $paginator.HasNext }}
<li class="Pagination-item Pagination-item--next">
<a
href="{{ $paginator.Next.URL }}"
class="Pagination-itemLink Pagination-itemLink--next"
rel="next"
>
&rarr;
</a>
</li>
{{ end }}
</ul>
{{ end }}
+4
View File
@@ -0,0 +1,4 @@
<section>
<h1 class="mb-3 text-4xl font-extrabold">{{ .Title }}</h1>
<p class="mt-8 mb-12 text-gray-400 dark:text-gray-500">{{ .Description }}</p>
</section>