.
This commit is contained in:
parent
6623ee03f6
commit
44c8324063
120 changed files with 22842 additions and 4673 deletions
|
|
@ -1 +1,5 @@
|
|||
<h1>uhoh 404 :/</h1>
|
||||
{{ define "main" }}
|
||||
<h1>404 - Page not found</h1>
|
||||
<p>The page you're looking for doesn't exist.</p>
|
||||
<p><a href="{{ .Site.BaseURL }}">Go home</a></p>
|
||||
{{ end }}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@
|
|||
<body>
|
||||
{{- partial "header.html" . -}}
|
||||
<main id="content">{{ block "main" . }}{{ end }}</main>
|
||||
{{ partial "footer.html" . }}
|
||||
{{- partial "footer.html" . -}}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,20 @@
|
|||
{{ define "main" }} {{ range where site.RegularPages "Type" "in"
|
||||
site.Params.mainSections }}
|
||||
<a href="{{ .RelPermalink}}">{{ .Title }}</a>
|
||||
{{ end }} {{ end }}
|
||||
{{ define "main" }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
|
||||
{{ $years := .Pages.GroupByDate "2006" }}
|
||||
<ul class="year-list">
|
||||
{{ range $years }}
|
||||
<li>
|
||||
<span class="year">{{ .Key }}</span>
|
||||
<ul class="post-list">
|
||||
{{ range .Pages }}
|
||||
<li>
|
||||
<time>{{ .Date.Format "Jan 2" }}</time>
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
|
|
|||
|
|
@ -1,36 +1,24 @@
|
|||
{{ define "main" }}
|
||||
<h1>Search</h1>
|
||||
<p>Search posts by keyword.</p>
|
||||
|
||||
<p>This is not a very clever search. It simply looks if the content of a post contains your query. </p>
|
||||
|
||||
<input type="text" id="search" placeholder="🔎 leaf through the archive"/>
|
||||
|
||||
<input type="text" id="search" placeholder="Search..." />
|
||||
<ul id="results"></ul>
|
||||
|
||||
<p>Alternatively, this is everything.</p>
|
||||
|
||||
{{ $pages := where site.RegularPages "Type" "posts" }}
|
||||
{{ $years := $pages.GroupByDate "2006" }}
|
||||
|
||||
<ul class="tree">
|
||||
{{ range $years }}
|
||||
<li>
|
||||
<span class="folder">{{ .Key }}</span>
|
||||
<ul>
|
||||
{{ $months := .Pages.GroupByDate "January" }}
|
||||
{{ range $months }}
|
||||
<li>
|
||||
<span class="folder">{{ .Key }}</span>
|
||||
<ul>
|
||||
{{ range .Pages }}
|
||||
<li>
|
||||
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</li>
|
||||
{{ with site.Taxonomies.tags }}
|
||||
<section class="tags">
|
||||
<h2>Tags</h2>
|
||||
{{ $tags := slice }}
|
||||
{{ range $name, $taxonomy := . }}
|
||||
{{ $tags = $tags | append (dict "name" $name "count" $taxonomy.Count) }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ $sorted := sort $tags "count" "desc" }}
|
||||
<div class="tag-list">
|
||||
{{ range $i, $tag := $sorted }}
|
||||
{{ if $i }}<span class="sep">·</span>{{ end }}
|
||||
<a href="{{ "tags/" | relURL }}{{ $tag.name | urlize }}">{{ $tag.name }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,18 @@
|
|||
{{ define "main" }}
|
||||
<article>
|
||||
<header id="post-header">
|
||||
<h2>{{ .Title }}</h2>
|
||||
<div>
|
||||
{{- if isset .Params "date" -}} {{ if eq .Lastmod .Date }}
|
||||
<p>{{ .Date | time.Format (i18n "post.created") }}</p>
|
||||
{{ else }}
|
||||
<p>{{ .Lastmod | time.Format (i18n "post.updated") }}</p>
|
||||
{{ end }} {{- end -}}
|
||||
</div>
|
||||
<article class="post">
|
||||
<header>
|
||||
<h1>{{ .Title }}</h1>
|
||||
<time>{{ .Date.Format "Jan 2, 2006" }}</time>
|
||||
{{ with .Params.tags }}
|
||||
<div class="tags">
|
||||
{{ range . }}
|
||||
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</header>
|
||||
{{- .Content -}}
|
||||
<div class="content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
||||
|
|
|
|||
11
layouts/_default/taxonomy.html
Normal file
11
layouts/_default/taxonomy.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{{ define "main" }}
|
||||
<h1>Tags</h1>
|
||||
<ul class="post-list">
|
||||
{{ range .Pages }}
|
||||
<li>
|
||||
<time>{{ .Date.Format "Jan 2, 2006" }}</time>
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
18
layouts/_default/term.html
Normal file
18
layouts/_default/term.html
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{{ define "main" }}
|
||||
{{ $years := .Pages.GroupByDate "2006" }}
|
||||
<ul class="year-list">
|
||||
{{ range $years }}
|
||||
<li>
|
||||
<span class="year">{{ .Key }}</span>
|
||||
<ul class="post-list">
|
||||
{{ range .Pages }}
|
||||
<li>
|
||||
<time>{{ .Date.Format "Jan 2 2006" }}</time>
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
|
@ -1,9 +1,26 @@
|
|||
{{ define "main" }}
|
||||
{{ range first 5 (where .Site.RegularPages "Type" "in" site.Params.mainSections) }}
|
||||
<article>
|
||||
<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
|
||||
<p>{{ .Date.Format "Jan 2, 2006" }}</p>
|
||||
<p>{{ .Summary }}</p>
|
||||
</article>
|
||||
{{ end }}
|
||||
<section class="intro">
|
||||
<p>This is a place to document bits and bobs I've been up to that have interested me. Expect linux and self-hosting tinkering, some novice programming, and maybe the occasional recipe. I tend to be a fool so take anything written here with a pinch of salt :)</p>
|
||||
</section>
|
||||
|
||||
{{ $posts := where site.RegularPages "Type" "in" site.Params.mainSections }}
|
||||
|
||||
<section class="archive">
|
||||
{{ $years := $posts.GroupByDate "2006" }}
|
||||
<ul class="year-list">
|
||||
{{ range $years }}
|
||||
<li>
|
||||
<span class="year">{{ .Key }}</span>
|
||||
<ul class="post-list">
|
||||
{{ range .Pages }}
|
||||
<li>
|
||||
<time>{{ .Date.Format "Jan 2" }}</time>
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</section>
|
||||
{{ end }}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<footer id="footer">
|
||||
<footer class="site-footer">
|
||||
<small>
|
||||
made with <a href="https://gohugo.io">hugo</a>
|
||||
<a href="/index.xml">RSS</a>
|
||||
·
|
||||
<a href="https://gohugo.io">Hugo</a>
|
||||
</small>
|
||||
<!-- search javascript -->
|
||||
<script src="/js/search.js"></script>
|
||||
<script src="/js/toggle.js"></script>
|
||||
<script src="/js/script.js"></script>
|
||||
</footer>
|
||||
|
|
|
|||
|
|
@ -1,16 +1,19 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
{{ with .Site.Params.description -}}
|
||||
<meta name="description" content="{{ . }}">
|
||||
{{ end }}
|
||||
{{ printf `<link rel="shortcut icon" href="%s">` ("favicon.ico" | absURL) | safeHTML }}
|
||||
{{ with .OutputFormats.Get "rss" -}}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||
{{ end -}}
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
{{ with .Site.Params.description -}}
|
||||
<meta name="description" content="{{ . }}">
|
||||
{{ end }}
|
||||
<link rel="canonical" href="{{ .Permalink }}" />
|
||||
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} - {{ .Site.Title }}{{ end }}</title>
|
||||
|
||||
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
|
||||
{{ with .OutputFormats.Get "rss" -}}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||
{{ end -}}
|
||||
|
||||
<link rel="canonical" href="{{ .Permalink }}" />
|
||||
<title>{{ .Title }}</title>
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
|
||||
<script>
|
||||
document.documentElement.setAttribute('data-theme', 'dark');
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
|||
|
|
@ -1,14 +1,11 @@
|
|||
<header id="banner">
|
||||
<nav class="navbar">
|
||||
<!-- home -->
|
||||
<a href="{{ .Site.BaseURL }}" class="home">🏠</a>
|
||||
<!-- menu items -->
|
||||
{{ range .Site.Menus.main.ByWeight -}} {{ .Pre }}<a
|
||||
href="{{ .URL }}"
|
||||
title="{{ .Title }}"
|
||||
>{{- .Name -}}</a
|
||||
>{{ .Post }} {{- end }}
|
||||
<!-- theme toggle -->
|
||||
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
|
||||
<header class="site-header">
|
||||
<nav>
|
||||
<a href="{{ .Site.BaseURL }}" class="home">~</a>
|
||||
<div class="nav-links">
|
||||
{{ range .Site.Menus.main.ByWeight }}
|
||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
<a href="/search">/</a>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue