Kloon van Maverick-thema naar custom-thema

This commit is contained in:
Michael Boelen 2023-05-05 16:36:10 +02:00
parent 9072f86867
commit 1e1d536e3d
65 changed files with 2923 additions and 1 deletions

View file

@ -0,0 +1,14 @@
<!doctype html>
<html lang="en">
{{ partial "head.html" . }}
<body>
<a class="skip-link" href="#main">Skip to main</a>
<main id="main">
<div class="content">
{{ partial "header.html" . }}
<p>The page you requested doesn't exist.</p>
</div>
</main>
</body>
</html>

View file

@ -0,0 +1,8 @@
<img
src="{{ .Destination | safeURL }}"
alt="{{ .Text }}"
loading="lazy"
decoding="async"
class="full-width"
/>

View file

@ -0,0 +1,24 @@
<!doctype html>
<html lang="en">
{{ partial "head.html" . }}
<body>
<a class="skip-link" href="#main">Skip to main</a>
<main id="main">
<div class="content">
{{ partial "header.html" . }}
<section>
<ul reversed class="list">
{{ range .Pages }}
<li>
<a class="link" href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}
</a>
<hr class="hr-list">
<time class="g time" datetime="{{ dateFormat "2006-01-02" .Date }}">{{ dateFormat "02/01/06" .Date }}</time>
</li>
{{ end }}
</ul>
</section>
</div>
</main>
</body>
</html>

View file

@ -0,0 +1,32 @@
<!doctype html>
<html lang="en">
{{ partial "head.html" . }}
<body>
<a class="skip-link" href="#main">Skip to main</a>
<main id="main">
<div class="content">
{{ partial "header.html" . }}
<section>
<h2 class="post">{{ .Title }}</h2>
{{ .Content }}
{{ if eq .Section "posts" }}
<div class="post-date">
<span class="g time">{{.Date.Format "January 2, 2006"}} </span> &#8729;
{{ $taxonomy := "tags" }} {{ with .Param $taxonomy }}
{{ range $index, $tag := . }} {{ with $.Site.GetPage (printf "/%s/%s"
$taxonomy $tag) -}}
<a href="{{ .Permalink }}">{{ $tag | urlize }}</a>
{{- end -}} {{- end -}}
{{ end }}
</div>
{{ end }}
</section>
{{ if eq .Section "posts" }}
<div id="comments">
{{ partial "comments.html" $ }}
</div>
{{ end }}
</div>
</main>
</body>
</html>

View file

@ -0,0 +1,24 @@
<!doctype html>
<html lang="en">
{{ partial "head.html" . }}
<body>
<a class="skip-link" href="#main">Skip to main</a>
<main id="main">
<div class="content">
{{ partial "header.html" . }}
{{ .Content }}
{{ if gt (len ( where .Site.RegularPages "Section" "posts" )) 0 }}
<h1>Latest Post</h1>
<section>
{{ range (first 3 (where .Site.RegularPages "Section" "posts" ).ByDate.Reverse) }}
<p>
<time class="g time" datetime="{{ dateFormat "2006-01-02" .Date }}">{{ dateFormat "2006-01-02" .Date }}</time>&nbsp;
<a href="{{ .Permalink }}">{{ .Title }}</a>
<p>
{{ end }}
</section>
{{ end }}
</div>
</main>
</body>
</html>

View file

@ -0,0 +1,34 @@
{
"version": "https://jsonfeed.org/version/1",
"title": "{{ .Site.Title }}",
"home_page_url": "{{ .Site.BaseURL }}",
"feed_url": "{{ .Site.BaseURL }}feed.json",
"description": "{{ .Site.Params.description }}",
"favicon": "{{ .Site.BaseURL }}/assets/favicon.ico",
"expired": false,
"author": {
"name": "{{ .Site.Params.author }}",
"url": "{{ .Site.BaseURL }}"
},
"items": [
{{ $list := (where .Site.RegularPages "Section" "posts") }}
{{ $len := (len $list) }}
{{ range $index, $element := $list }}
{
"id": {{ sha1 .Title | jsonify }},
"title": {{ .Title | jsonify }},
"summary": {{ .Description | jsonify }},
"content_text": {{ .Content | plainify | jsonify }},
"content_html": {{ .Content | jsonify }},
"url": {{ .Permalink | jsonify }},
"date_published": "{{ .Date.Format `2016-02-09T14:22:00-07:00` | safeHTML }}",
"date_modified": "{{ .Date.Format `2016-02-09T14:22:00-07:00` | safeHTML }}",
"author": {
"name": "{{ .Site.Params.author }}",
"url": "{{ .Site.BaseURL }}"
}
}{{ if ne (add $index 1) $len }},{{ end }}
{{ end }}
]
}

View file

@ -0,0 +1,26 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<!-- Required channel elements -->
<title>{{ .Site.Title }}</title>
<description>{{ .Site.Params.description }}</description>
<link>{{ .Site.BaseURL }}</link>
<!-- Optional channel elements -->
<language>en</language>
<copyright>Copyright {{ now.Format "2006"}}, Calvin Tran</copyright>
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>
<generator>Hugo - gohugo.io</generator>
<docs>http://cyber.harvard.edu/rss/rss.html</docs>
<atom:link href="{{ .Site.BaseURL }}/atom.xml" rel="self" type="application/atom+xml"/>
{{ $author := or (.Site.Params.author) (.Site.Author.name) }}
{{ range where .Site.RegularPages "Section" "posts" }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<description>{{ .Content | html }}</description>
<author>{{ $author }}</author>
<guid>{{ .Permalink }}</guid>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
</item>
{{ end }}
</channel>
</rss>

View file

@ -0,0 +1,7 @@
<script src="https://utteranc.es/client.js"
repo={{ .Site.Params.comments.githubRepo }}
issue-term="pathname"
theme={{ .Site.Params.comments.theme }}
crossorigin="anonymous"
async>
</script>

View file

@ -0,0 +1,4 @@
<footer>
<p>© {{ dateFormat "2022" now }}</p>
</footer>

View file

@ -0,0 +1,89 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="Liste - {{ .Site.BaseURL }}">
<title>{{ if eq .IsHome true }}{{ .Site.Title }}{{ else }}{{ .Title }} | {{ .Site.Title }}{{ end }}</title>
<meta name="description" content="{{ if ne .Description "" }}{{ .Description }}{{ else }}{{ .Site.Params.description }}{{ end }}">
{{ template "_internal/opengraph.html" . }}
{{ template "_internal/schema.html" . }}
{{ template "_internal/google_analytics.html" . }}
<link rel="canonical" href="{{ .Permalink }}">
<link rel="icon" href="{{ .Site.BaseURL }}/assets/favicon.ico">
<link rel="dns-prefetch" href="https://www.google-analytics.com">
<link href="https://www.google-analytics.com" rel="preconnect" crossorigin>
<link rel="alternate" type="application/atom+xml" title="{{ .Site.Title }}" href="{{ .Site.BaseURL }}/atom.xml" />
<link rel="alternate" type="application/json" title="{{ .Site.Title }}" href="{{ .Site.BaseURL }}/feed.json" />
<link rel="shortcut icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=">
{{ $styles := resources.Get "scss/styles.scss" | toCSS (dict "outputStyle" "compressed") | minify }}
{{ $styles_extra := resources.Get "scss/_extra.scss" | toCSS (dict "outputStyle" "compressed") | minify }}
<style>{{ $styles.Content | safeCSS }} {{ $styles_extra.Content | safeCSS }}</style>
{{ if .IsHome -}}
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"name": "{{ .Site.Title }}",
"url": "{{ .Site.BaseURL }}",
"description": "{{ .Site.Params.description }}",
"thumbnailUrl": "{{ .Site.Params.Logo | absURL }}",
"license": "{{ .Site.Params.Copyright }}"
}
</script>
{{ else if .IsPage }}
{{ $author := or (.Params.author) (.Site.Author.name) }}
{{ $org_name := .Site.Title }}
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "BlogPosting",
"articleSection": "{{ .Section }}",
"name": "{{ .Title | safeJS }}",
"headline": "{{ .Title | safeJS }}",
"alternativeHeadline": "{{ .Params.lead }}",
"description": "{{ if .Description }}{{ .Description | safeJS }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ end }}{{ end }}",
"inLanguage": {{ .Site.LanguageCode | default "en-us" }},
"isFamilyFriendly": "true",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "{{ .Permalink }}"
},
"author" : {
"@type": "Person",
"name": "{{ $author }}"
},
"creator" : {
"@type": "Person",
"name": "{{ $author }}"
},
"accountablePerson" : {
"@type": "Person",
"name": "{{ $author }}"
},
"copyrightHolder" : "{{ $org_name }}",
"copyrightYear" : "{{ .Date.Format "2006" }}",
"dateCreated": "{{ .Date.Format "2006-01-02T15:04:05.00Z" | safeHTML }}",
"datePublished": "{{ .PublishDate.Format "2006-01-02T15:04:05.00Z" | safeHTML }}",
"dateModified": "{{ .Lastmod.Format "2006-01-02T15:04:05.00Z" | safeHTML }}",
"publisher":{
"@type":"Organization",
"name": {{ $org_name }},
"url": {{ .Site.BaseURL }},
"logo": {
"@type": "ImageObject",
"url": "{{ .Site.Params.logo | absURL }}",
"width":"32",
"height":"32"
}
},
"image": {{ if .Params.images }}[{{ range $i, $e := .Params.images }}{{ if $i }}, {{ end }}{{ $e | absURL }}{{ end }}]{{ else}}{{.Site.Params.logo | absURL }}{{ end }},
"url" : "{{ .Permalink }}",
"wordCount" : "{{ .WordCount }}",
"genre" : [ {{ range $index, $tag := .Params.tags }}{{ if $index }}, {{ end }}"{{ $tag }}" {{ end }}],
"keywords" : [ {{ range $index, $tag := .Params.tags }}{{ if $index }}, {{ end }}"{{ $tag }}" {{ end }}]
}
</script>
{{ end }}
</head>

View file

@ -0,0 +1,17 @@
<header>
<p style="padding: 0;margin: 0;">
<a href="/">
<b>{{ .Site.Title }}</b>
<span class="text-stone-500 animate-blink"></span>
</a>
</p>
<ul style="padding: 0;margin: 0;">
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<li class="{{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}">
<a href="{{ .URL }}"><span>{{ .Name }}</span></a>
{{ end }}
</li>
</ul>
</header>
<hr class="hr-list" style="padding: 0;margin: 0;">

View file

@ -0,0 +1,6 @@
This is tags
{{ range $i, $e := .Params.tags -}}
{{- if $i -}}, {{ end -}}
<a href='{{ "/tags/" | relLangURL }}{{ . | urlize }}'>{{ $e | humanize }}</a>
{{- end -}}