updated hugo theme

master
Lars Hoogestraat 7 months ago
parent 8175b8e56f
commit 12cd7799aa
  1. 5
      .gitignore
  2. 26
      LICENSE
  3. 47
      README.md
  4. 10
      archetypes/default.md
  5. 47
      exampleSite/config.toml
  6. 24
      exampleSite/content/_index.md
  7. 4
      exampleSite/content/archive/index.md
  8. 46
      exampleSite/content/posts/emoji-support.md
  9. 148
      exampleSite/content/posts/markdown-syntax.md
  10. 49
      exampleSite/content/posts/math-typesetting.md
  11. 45
      exampleSite/content/posts/placeholder-text.md
  12. 34
      exampleSite/content/posts/rich-content.md
  13. 7
      exampleSite/content/privacy.md
  14. BIN
      images/darkmode.png
  15. BIN
      images/lightmode.png
  16. BIN
      images/mobile.png
  17. 25
      layouts/_default/archive.html
  18. 33
      layouts/_default/baseof.html
  19. 20
      layouts/_default/list.html
  20. 8
      layouts/_default/single.html
  21. 10
      layouts/_default/terms.html
  22. 10
      layouts/index.html
  23. 13
      layouts/partials/aside.html
  24. 12
      layouts/partials/footer.html
  25. 22
      layouts/partials/head.html
  26. 4
      layouts/partials/header.html
  27. 12
      layouts/partials/nav.html
  28. 18
      layouts/partials/pagination.html
  29. 9
      layouts/posts/single.html
  30. BIN
      static/css/Rubik-Regular.ttf
  31. BIN
      static/css/fonts/Rubik-Bold.ttf
  32. BIN
      static/css/fonts/Rubik-BoldItalic.ttf
  33. BIN
      static/css/fonts/Rubik-Italic.ttf
  34. BIN
      static/css/fonts/Rubik-Regular.ttf
  35. 530
      static/css/master.css
  36. 82
      static/css/syntax-dark.css
  37. 82
      static/css/syntax-light.css
  38. 15
      theme.toml

5
.gitignore vendored

@ -1,5 +1,5 @@
# Generated files by hugo
/public/
public/
/resources/_gen/
/assets/jsconfig.json
hugo_stats.json
@ -11,3 +11,6 @@ hugo.linux
# Temporary lock file while building
/.hugo_build.lock
/.idea/
/exampleSite/.hugo_build.lock

@ -1,20 +1,20 @@
The MIT License (MIT)
Copyright (c) 2022 Lars Hoogestraat
Copyright (c) 2021 YOUR_NAME_HERE
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

@ -0,0 +1,47 @@
# Clean Hugo Blog Theme
## Screenshot
- Darkmode
[![](images/darkmode.png)](images/darkmode.png)
- Lightmode
[![](images/lightmode.png)](images/lightmode.png)
- Mobile
[![](images/mobile.png)](images/mobile.png)
## Features
- Responsive
- Dark / Light Mode Theme
- Syntax highlighting for dark and light theme
- Left and bottom navigation
## Installation
- Clone repository:
- `git clone https://github.com/lhooge/hugo-theme-hoogi.git`
- Run command from exampleSite directory:
- `hugo server -t ../../ -D`
# Configuration
It is currently just 'useSummary' available for configuring if a summary should be shown on list overview.
```
[Params]
useSummary = true | false
```
## License
This project is licensed under MIT
## Thirdparty
- Rubik Font

@ -1,2 +1,8 @@
+++
+++
---
date: {{ .Date }}
categories: []
draft: true
author: ""
title: "{{ replace .Name "-" " " | title }}"
---

@ -0,0 +1,47 @@
baseURL = 'http://localhost/'
languageCode = 'en-us'
title = 'This is an example site'
theme = 'Hoogi'
pygmentsUseClasses = true
pygmentsCodeFences = true
pygmentsCodefencesGuessSyntax = true
relativeURLs = true
[Params]
useSummary = true
[permalinks]
posts = "/:year/:month/:slug/"
[menu]
[[menu.nav]]
name = "About"
identifier = "about"
url = "/"
weight = 1
[[menu.nav]]
name = "Articles"
identifier = "articles"
url = "/posts"
weight = 2
[[menu.nav]]
name = "Archive"
identifier = "archive"
url = "/archive"
weight = 3
[[menu.nav]]
name = "Tags"
identifier = "tags"
url = "/tags"
weight = 4
[[menu.footer]]
name = "Privacy Policy"
identifier = "privacy"
url = "/privacy"
weight = 1

@ -0,0 +1,24 @@
---
title: "About"
date: 2022-01-28T13:37:00+01:00
---
# About
Written in Go, Hugo is an open source static site generator available under the [Apache Licence 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows.
Hugo makes use of a variety of open source projects including:
* https://github.com/yuin/goldmark
* https://github.com/alecthomas/chroma
* https://github.com/muesli/smartcrop
* https://github.com/spf13/cobra
* https://github.com/spf13/viper
Hugo is ideal for blogs, corporate websites, creative portfolios, online magazines, single page applications or even a website with thousands of pages.
Hugo is for people who want to hand code their own website without worrying about setting up complicated runtimes, dependencies and databases.
Websites built with Hugo are extremely fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider.
Learn more and contribute on [GitHub](https://github.com/gohugoio).

@ -0,0 +1,4 @@
---
layout: "archive"
title: "Archive"
---

@ -0,0 +1,46 @@
---
author: "Hugo Authors"
title: "Emoji Support"
date: "2020-03-05"
description: "Guide to emoji usage in Hugo"
tags: [
"emoji",
]
---
Emoji can be enabled in a Hugo project in a number of ways.
<!--more-->
The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes).
To enable emoji globally, set `enableEmoji` to `true` in your site's [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g.
<p><span class="nowrap"><span class="emojify">๐Ÿ™ˆ</span> <code>:see_no_evil:</code></span> <span class="nowrap"><span class="emojify">๐Ÿ™‰</span> <code>:hear_no_evil:</code></span> <span class="nowrap"><span class="emojify">๐Ÿ™Š</span> <code>:speak_no_evil:</code></span></p>
<br>
The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes.
***
**N.B.** The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g.
{{< highlight html >}}
.emoji {
font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
}
{{< /highlight >}}
{{< css.inline >}}
<style>
.emojify {
font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
font-size: 2rem;
vertical-align: middle;
}
@media screen and (max-width:650px) {
.nowrap {
display: block;
margin: 25px 0;
}
}
</style>
{{< /css.inline >}}

@ -0,0 +1,148 @@
---
author: "Hugo Authors"
title: "Markdown Syntax Guide"
date: "2019-03-11"
description: "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
tags: [
"markdown",
"css",
"html",
]
categories: [
"themes",
"syntax",
]
series: ["Themes Guide"]
aliases: ["migrate-from-jekyl"]
---
This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.
<!--more-->
## Headings
The following HTML `<h1>`โ€”`<h6>` elements represent six levels of section headings. `<h1>` is the highest section level while `<h6>` is the lowest.
# H1
## H2
### H3
#### H4
##### H5
###### H6
## Paragraph
Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.
Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.
## Blockquotes
The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations.
#### Blockquote without attribution
> Tiam, ad mint andaepu dandae nostion secatur sequo quae.
> **Note** that you can use *Markdown syntax* within a blockquote.
#### Blockquote with attribution
> Don't communicate by sharing memory, share memory by communicating.<br>
> โ€” <cite>Rob Pike[^1]</cite>
[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
## Tables
Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box.
Name | Age
--------|------
Bob | 27
Alice | 23
#### Inline Markdown within tables
| Italics | Bold | Code |
| -------- | -------- | ------ |
| *italics* | **bold** | `code` |
## Code Blocks
#### Code block with backticks
```html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>
```
#### Code block indented with four spaces
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>
#### Code block with Hugo's internal highlight shortcode
{{< highlight html >}}
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>
{{< /highlight >}}
## List Types
#### Ordered List
1. First item
2. Second item
3. Third item
#### Unordered List
* List item
* Another item
* And another item
#### Nested list
* Fruit
* Apple
* Orange
* Banana
* Dairy
* Milk
* Cheese
## Other Elements โ€” abbr, sub, sup, kbd, mark
<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
H<sub>2</sub>O
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
Press <kbd><kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd></kbd> to end the session.
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.

@ -0,0 +1,49 @@
---
author: Hugo Authors
title: Math Typesetting
date: 2019-03-08
description: A brief guide to setup KaTeX
math: true
---
Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries.
<!--more-->
In this example we will be using [KaTeX](https://katex.org/)
- Create a partial under `/layouts/partials/math.html`
- Within this partial reference the [Auto-render Extension](https://katex.org/docs/autorender.html) or host these scripts locally.
- Include the partial in your templates like so:
```bash
{{ if or .Params.math .Site.Params.math }}
{{ partial "math.html" . }}
{{ end }}
```
- To enable KaTex globally set the parameter `math` to `true` in a project's configuration
- To enable KaTex on a per page basis include the parameter `math: true` in content files
**Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html)
{{< math.inline >}}
{{ if or .Page.Params.math .Site.Params.math }}
<!-- KaTeX -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
{{ end }}
{{</ math.inline >}}
### Examples
{{< math.inline >}}
<p>
Inline math: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887โ€ฆ\)
</p>
{{</ math.inline >}}
Block math:
$$
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
$$

@ -0,0 +1,45 @@
---
author: "Hugo Authors"
title: "Placeholder Text"
date: "2019-03-09"
description: "Lorem Ipsum Dolor Si Amet"
tags: [
"markdown",
"text",
]
---
Lorem est tota propiore conpellat pectoribus de pectora summo. <!--more-->Redit teque digerit hominumque toris verebor lumina non cervice subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum.
1. Exierant elisi ambit vivere dedere
2. Duce pollice
3. Eris modo
4. Spargitque ferrea quos palude
Rursus nulli murmur; hastile inridet ut ab gravi sententia! Nomine potitus silentia flumen, sustinet placuit petis in dilapsa erat sunt. Atria tractus malis.
1. Comas hunc haec pietate fetum procerum dixit
2. Post torum vates letum Tiresia
3. Flumen querellas
4. Arcanaque montibus omnes
5. Quidem et
# Vagus elidunt
<svg class="canon" xmlns="http://www.w3.org/2000/svg" overflow="visible" viewBox="0 0 496 373" height="373" width="496"><g fill="none"><path stroke="#000" stroke-width=".75" d="M.599 372.348L495.263 1.206M.312.633l494.95 370.853M.312 372.633L247.643.92M248.502.92l246.76 370.566M330.828 123.869V1.134M330.396 1.134L165.104 124.515"></path><path stroke="#ED1C24" stroke-width=".75" d="M275.73 41.616h166.224v249.05H275.73zM54.478 41.616h166.225v249.052H54.478z"></path><path stroke="#000" stroke-width=".75" d="M.479.375h495v372h-495zM247.979.875v372"></path><ellipse cx="498.729" cy="177.625" rx=".75" ry="1.25"></ellipse><ellipse cx="247.229" cy="377.375" rx=".75" ry="1.25"></ellipse></g></svg>
[The Van de Graaf Canon](https://en.wikipedia.org/wiki/Canons_of_page_construction#Van_de_Graaf_canon)
## Mane refeci capiebant unda mulcebat
Victa caducifer, malo vulnere contra dicere aurato, ludit regale, voca! Retorsit colit est profanae esse virescere furit nec; iaculi matertera et visa est, viribus. Divesque creatis, tecta novat collumque vulnus est, parvas. **Faces illo pepulere** tempus adest. Tendit flamma, ab opes virum sustinet, sidus sequendo urbis.
Iubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli Lelegas tu lux. Verbis obstitit intus oblectamina fixis linguisque ausus sperare Echionides cornuaque tenent clausit possit. Omnia putatur. Praeteritae refert ausus; ferebant e primus lora nutat, vici quae mea ipse. Et iter nil spectatae vulnus haerentia iuste et exercebat, sui et.
Eurytus Hector, materna ipsumque ut Politen, nec, nate, ignari, vernum cohaesit sequitur. Vel **mitis temploque** vocatus, inque alis, *oculos nomen* non silvis corpore coniunx ne displicet illa. Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem Propoetides **parte**.
{{< css.inline >}}
<style>
.canon { background: white; width: 100%; height: auto; }
</style>
{{< /css.inline >}}

@ -0,0 +1,34 @@
---
author: "Hugo Authors"
title: "Rich Content"
date: "2019-03-10"
description: "A brief description of Hugo Shortcodes"
tags: [
"shortcodes",
"privacy",
]
---
Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugos-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds.
<!--more-->
---
## YouTube Privacy Enhanced Shortcode
{{< youtube ZJthWmvUzzc >}}
<br>
---
## Twitter Simple Shortcode
{{< twitter_simple 1085870671291310081 >}}
<br>
---
## Vimeo Simple Shortcode
{{< vimeo_simple 48912912 >}}

@ -0,0 +1,7 @@
---
title: "Privacy Policy"
id: "privacy"
---
Some information about privacy concerns...

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

@ -0,0 +1,25 @@
{{ define "main" }}
<article>
<div id="index">
<h1>Index</h1>
<ul>
{{ with .Site.GetPage "section" "posts" }}
{{ range .Data.Pages.GroupByDate "2006-01" }}
<li class="year">
<h4>{{.Key}}</h4>
</li>
<ul class="submenu">
{{ range .Pages }}
<li class="submenu-item">
<a href="{{.Permalink}}"><time>{{ .Date.Format "Jan 2, 2006" }}</time> | {{.Title}}</a>
</li>
{{ end }}
</ul>
{{ end }}
{{ end }}
</ul>
</div>
</article>
{{ end }}

@ -1,29 +1,42 @@
<!DOCTYPE html>
<html>
<html {{ if .Site.Params.languageCode }} lang=".Site.Params.languageCode" {{ end }}>
{{- partial "head.html" . -}}
<body>
<div class="container">
<div id="container">
{{ if hugo.IsProduction }}
{{- partialCached "header.html" . -}}
{{- partialCached "header.html" . }}
{{else}}
{{- partial "header.html" . -}}
{{- partial "header.html" . }}
{{end}}
{{ if hugo.IsProduction }}
{{- partialCached "nav.html" . -}}
{{- partialCached "nav.html" . .Section .Name }}
{{else}}
{{- partial "nav.html" . -}}
{{- partial "nav.html" . }}
{{end}}
<div id="content">
<main>
{{- block "main" . }}{{- end }}
</div>
</main>
{{ if isset .Site.Taxonomies "categories" }}
{{ if not (eq (len .Site.Taxonomies.categories) 0) }}
<aside>
{{ if hugo.IsProduction }}
{{- partialCached "aside.html" . .Title }}
{{else}}
{{- partial "aside.html" . }}
{{end}}
</aside>
{{ end }}
{{ end }}
{{ if hugo.IsProduction }}
{{- partialCached "footer.html" . -}}
{{- partialCached "footer.html" . .Name }}
{{else}}
{{- partial "footer.html" . -}}
{{- partial "footer.html" . }}
{{end}}
</div>
</body>

@ -0,0 +1,20 @@
{{ define "main" }}
{{ range .Paginator.Pages }}
<article>
<header>
<h1><a href="{{.Permalink}}">{{.Title}}</a></h1>
<p>{{ if .Date }} written {{ if .Params.Author }} by {{ .Params.Author }} {{ end }} on <time>{{ .Date.Format "Jan 2, 2006" }}</time>{{ end }}</p>
</header>
{{ if .Site.Params.useSummary }}
{{ .Summary }}
<p style="text-align: right"><a href='{{ .Permalink }}'>Read more &raquo;</a></p>
{{ else }}
{{.Content}}
{{ end }}
</article>
{{ end }}
{{ partial "pagination.html" . }}
{{ end }}

@ -0,0 +1,8 @@
{{ define "main" }}
<article>
<h1>{{.Title}}</h1>
{{ .Content }}
</article>
{{ end }}

@ -0,0 +1,10 @@
{{ define "main" }}
<article>
<h1>{{ .Title }}</h1>
{{ range .Data.Terms.Alphabetical }}
<ul>
<li><a href="{{.Page.Permalink}}">{{ printf "%s (%d)" .Page.Title .Count }}</a></li>
</ul>
{{ end }}
</article>
{{ end }}

@ -1,9 +1,5 @@
{{ define "main" }}
<main>
<div class="">
{{ .Content }}
</div>
</main>
<article>
{{ .Content }}
</article>
{{ end }}

@ -0,0 +1,13 @@
<ul>
{{ $current := . }}
<li>Categories</li>
{{ range $key, $value := .Site.Taxonomies.categories }}
{{ $active := (eq $key $current.Title) }}
<li>
<a href="{{ .Page.Permalink | relURL }}" {{if $active}}class="active"{{end}}>{{ $key | humanize }} ({{ len $value }})</a>
</li>
{{end}}
</ul>

@ -1,7 +1,13 @@
<footer>
<ul>
<li>
<a class="active" href="#">Impressum</a>
</li>
{{ $current := . }}
{{ range .Site.Menus.footer.ByWeight }}
{{ $active := or ($current.IsMenuCurrent "footer" .) ($current.HasMenuCurrent "footer" .) }}
{{ $active = or $active (eq .Name $current.Title) }}
<li>
<a class="{{if $active}}active{{end}}" href="{{ .URL | relLangURL }}">{{ .Name }}</a>
</li>
{{ end }}
</ul>
</footer>

@ -1,11 +1,21 @@
<head>
<meta charset="UTF-8">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="stylesheet" href="css/master.css">
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
<link rel="stylesheet" href="{{ "css/master.css" | relURL }}">
<link rel="icon" href="/favicon.ico" type="image/vnd.microsoft.icon">
{{ $title := print .Site.Title " | " .Title }}
{{ if .IsHome }}{{ $title = .Site.Title }}{{ end }}
{{ if .OutputFormats.Get "RSS" }}
{{ with .OutputFormats.Get "RSS" }}
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
<link href="{{ .RelPermalink }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" />
{{ end }}
{{ end }}
{{ $title := print .Title " | " .Site.Title }}
<title>{{ $title }}</title>
</head>
</head>

@ -1,3 +1,3 @@
<header>
<h1 id="header-text">{{.Site.Title }}</h1>
<header id="page-header">
<h1>{{.Site.Title }}</h1>
</header>

@ -1,11 +1,13 @@
<nav>
<ul>
{{ $current := . }}
{{ range .Site.Menus.nav }}
{{ $active := or ($current.IsMenuCurrent "nav" .) ($current.HasMenuCurrent "nav" .) }}
{{ $active = or $active (eq .Name $current.Title) }}
{{ $active = or $active (and (eq .Name "Articles") (eq $current.Section "posts")) }}
<li>
<a class="active" href="/">Articles</a>
</li>
<li>
<a href="/index">Index</a>
<a {{if $active}}class="active"{{end}} href="{{ .URL | relLangURL }}">{{ .Name }}</a>
</li>
{{ end }}
</ul>
</nav>

@ -0,0 +1,18 @@
{{ if gt .Paginator.TotalPages 1 }}
<div id="pagination">
<ul>
{{ if .Paginator.HasPrev }}
<a class="button button-active" href="{{ .Paginator.Prev.URL }}">&laquo; Backward</a>
{{ end }}
{{ range .Paginator.Pagers }}
<a class="button button-active" href="{{ .URL }}">{{ .PageNumber }}</a>
{{ end }}
{{ if .Paginator.HasNext }}
<a class="button button-active" href="{{ .Paginator.Next.URL }}">Forward &raquo;</a>
{{ end }}
</ul>
</div>
{{ end }}

@ -0,0 +1,9 @@
{{ define "main" }}
<article>
<header>
<h1>{{.Title}}</h1>
{{ if .Date }}<p>written {{ if .Params.Author }} by {{ .Params.Author }} {{ end }} on <time datetime="{{.Date }}">{{ .Date.Format "Jan 2, 2006" }}</time></p>{{ end }}
</header>
{{ .Content }}
</article>
{{ end }}

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -1,6 +1,38 @@
/* Import syntax themes */
@import "syntax-light.css" screen;
@import "syntax-dark.css" screen and (prefers-color-scheme: dark);
*,
*:before,
*:after {
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
padding: 0;
}
@font-face {
font-family: 'rubik';
src: url("fonts/Rubik-Regular.ttf");
}
@font-face {
font-family: 'rubik';
src: url("Rubik-Regular.ttf") format('truetype');
src: url("fonts/Rubik-Bold.ttf");
font-weight: bold;
}
@font-face {
font-family: 'rubik';
src: url("fonts/Rubik-Italic.ttf");
font-style: italic;
}
@font-face {
font-family: 'rubik';
src: url("fonts/Rubik-BoldItalic.ttf");
font-weight: bold;
font-style: italic;
}
html {
@ -11,14 +43,68 @@ html {
body {
font-family: "rubik", Helvetica, Arial, sans-serif;
font-size: 100%;
background-color: #fffaf0;
background-color: var(--body-bg-color);
color: var(--body-text-color);
}
.container {
@media (prefers-color-scheme: light) {
:root {
--body-bg-color: #ffffff;
--body-text-color: #000000;
--header-bg-color: #285e8e;
--header-text-color: #fffaf0;
--nav-bg-color: #1f1f1f;
--nav-text-color: #ffffff;
--nav-hover-bg-color: #fffaf0;
--nav-border-color: #285e8e;
--nav-hover-color: #285e8e;
--footer-bg-color: #1f1f1f;;
--footer-text-color: #ffffff;
--headline-text-color: #285e8e;
--article-box-bg-color: #f8f8f8;
--link-text-color: #285e8e;
--link-visited-text-color: #c58af9;
--code-text-color: #000000;
--code-bg-color: #f8f8f8;
}
}
@media (prefers-color-scheme: dark) {
:root {
--body-bg-color: #000000;
--body-text-color: #ffffff;
--header-bg-color: #132d44;
--header-text-color: #fffaf0;
--nav-bg-color: #1f1f1f;
--nav-border-color: #132d44;
--nav-hover-bg-color: #000000;
--nav-hover-color: #ffffff;
--footer-bg-color: #1f1f1f;;
--footer-text-color: #ffffff;
--article-box-bg-color: #1f1f1f;
--headline-text-color: #3a8cd3;
--link-text-color: #8ab4f8;
--link-visited-text-color: #c58af9;
--code-text-color: #ffffff;
--code-bg-color: #1f1f1f;
}
}
#container {
height: 100vh;
display: grid;
grid-template-rows: 80px 1fr 30px;
grid-template-columns: minmax(250px, 20%) 30% 35% minmax(200px, 15%);
grid-template-columns: minmax(150px, 20%) 30% 35% minmax(100px, 15%);
grid-template-areas:
"header header header header"
"nav content content sidebar"
@ -26,8 +112,8 @@ body {
;
}
@media screen and (max-width: 39em) {
.container {
@media screen and (max-width: 70em) {
#container {
height: 100vh;
grid-template-areas:
"header"
@ -35,7 +121,8 @@ body {
"content"
"sidebar"
"footer"
;
;
grid-template-columns: 100%;
grid-template-rows:
80px
@ -43,58 +130,17 @@ body {
min-content
min-content
40px
;
;
}
}
.container-admin {
height: 100vh;
display: grid;
grid-template-rows: 80px 1fr 30px;
grid-template-columns: minmax(250px, 20%) 30% 35% 15%;
grid-template-areas:
"header header header header"
"nav content content ."
"footer footer footer footer"
;
}
@media screen and (max-width: 39em) {
.container-admin {
grid-template-areas: "header"
"nav"
"content"
"footer";
grid-template-columns: 100%;
grid-template-rows:
80px
min-content
min-content
40px;
}
.container-admin #header-text {
display:none;
text-align: left;
}
.container-admin #header-actions {
text-align: left;
margin: 0;
}
}
*,
*:before,
*:after {
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
padding: 0;
}
/**
* General styles
*/
h1, h2, h3, h4, h5, h6 {
color: #285e8e;
font-weight: 600;
color: var(--headline-text-color);
font-weight: 700;
}
h1 {
@ -103,34 +149,29 @@ h1 {
h2 {
font-size: 1.8em;
margin-bottom: 0.9em;
margin-top: 0.2em;
}
h3 {
font-size: 1.5em;
margin-bottom: 0.7em;
margin-top: 0.7em;
}
a {
color: var(--link-text-color);
text-decoration: underline;
}
a:hover,
a:focus {
color: var(--link-text-color);
text-decoration: none;
}
p {
font-size: 1.1em;
line-height: 1.5;
margin-bottom: 1em;
a:visited {
color: var(--link-visited-text-color);
}
/*
* Grid Layout positioning
* Layout positioning
*/
main {
grid-area: content;
@ -138,10 +179,84 @@ main {
padding: 0 1em 1em 1em;
}
header#page-header {
display: flex;
grid-area: header;
align-items: center;
justify-content: left;
background-color: var(--header-bg-color);
}
nav {
grid-area: nav;
background-color: var(--nav-bg-color);
font-size: 1.1em;
}
aside {
color: var(--nav-text-color);
grid-area: sidebar;
background-color: var(--nav-bg-color);
font-size: 1.1em;
}
header#page-header {
padding-left: 20px;
}
#page-header h1 {
color: var(--header-text-color);
}
/**
* Navigation styles left and right side
*/
aside ul li:first-child {
padding: 1rem 0.5rem;
font-size: 1.3em;
border-bottom: 0.0625rem solid var(--nav-border-color);
}
aside a,
nav a,
aside a:visited,
nav a:visited {
color: var(--nav-text-color);
display: inline-block;
border-bottom: 0.0625rem solid var(--nav-border-color);
padding: 1rem 0.5rem;
width: 100%;
text-decoration: none;
}
nav a:active,
nav a:hover,
nav a:active,
nav a.active {
color: var(--nav-hover-color);
background-color: var(--nav-hover-bg-color);
border-right: 0.3125rem solid var(--nav-border-color);
}
aside a:active,
aside a:hover,
aside a:active,
aside a.active {
color: var(--nav-hover-color);
background-color: var(--nav-hover-bg-color);
border-left: 0.3125rem solid var(--nav-border-color);
}
/**
* Footer styles
*/
footer {
grid-area: footer;
background-color: #1f1f1f;
color: #ffffff;
background-color: var(--footer-bg-color);
color: var(--footer-text-color);
text-align: center;
font-size: 0.9em;
}
@ -162,8 +277,9 @@ footer ul li {
padding: 5px 0;
}
footer a {
color: #fff;
footer a,
footer a:visited {
color: var(--footer-text-color);
width: 100%;
text-decoration: underline;
}
@ -176,182 +292,140 @@ footer a.active {
text-decoration: none;
}
header {
display: flex;
grid-area: header;
background-color: #285e8e;
align-items: center;
}
aside {
grid-area: sidebar;
background-color: #1f1f1f;
nav li,
aside li {
list-style-type: none;
}
nav {
grid-area: nav;
background-color: #1f1f1f;
pre {
display: block;
font-size: 1.1em;
white-space: pre;
white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -o-pre-wrap;
border: 1px solid grey;
background-color: var(--code-bg-color);
color: var(--code-text-color);
padding: 1em;
margin-bottom: 2em;
}
#header-text {
color: #fffaf0;
padding-left: 10px;
/* FIX for highlighted lines in code */
.chroma .hl {
background-color: rgba(255, 255, 0, 0.1);
}
#header-actions {
height: calc(80px - 0.0625rem);
margin-left: auto;
color: white;
article {
background-color: var(--article-box-bg-color);
margin: 2em 1em 2em 1em;
border: 1px dotted grey;
padding: 15px;
}
#header-actions ul {
margin-right: 2em;
article header {
margin: 0;
padding-bottom: 10px;
}
#header-actions li {
list-style-type: none;
color: white;
display: inline-block;
line-height: 80px;
height: calc(80px - 0.0625rem);
article header h1 {
margin: 0;
padding: 0;
font-size: 2em;
}
#header-actions a {
display: inline-block;
color: white;
text-decoration: none;
padding: 0 10px 0 10px;
font-weight: bold;
-webkit-transition-duration: 250ms;
transition-duration: 250ms;
-webkit-transition-property: all;
transition-property: all;
-webkit-transition-timing-function: ease-in-out;
transition-timing-function: ease-in-out;
article header h1 a {
color: var(--headline-text-color);
}
#header-actions a:active,
#header-actions a:hover,
#header-actions a:active,
#header-actions a.active {
color: black;
background-color: #fffaf0;
border-bottom-color: #285e8e;
border-bottom-style: solid;
border-bottom-width: 0.0625rem;
article header p {
font-size: 0.9em;
margin: 0 0 1em 0;
padding-bottom: 5px;
border-bottom: 0.14rem solid #285e8e;
}
aside a,
nav a {
color: #fff;
display: inline-block;
border-bottom-color: #285e8e;
border-bottom-style: solid;
border-bottom-width: 0.0625rem;
padding: 1rem 0.5rem;
width: 100%;
text-decoration: none;
-webkit-transition-duration: 250ms;
transition-duration: 250ms;
-webkit-transition-property: all;
transition-property: all;
-webkit-transition-timing-function: ease-in-out;
transition-timing-function: ease-in-out;
article h1,
article h2,
article h3,
article h4,
article h5,
article h6 {
margin-top: 0;
margin-bottom: 0.8em;
}
nav a:active,
nav a:hover,
nav a:active,
nav a.active {
color: #285e8e;
background-color: #fffaf0;
border-right-color: #285e8e;
border-right-style: solid;
border-right-width: 0.3125rem;
article h1 {
font-size: 2em;
}
aside a:active,
aside a:hover,
aside a:active,
aside a.active {
color: #285e8e;
background-color: #fffaf0;
border-left-color: #285e8e;
border-left-style: solid;
border-left-width: 0.3125rem;
article h2 {
font-size: 1.6em;
}
nav li,
aside li {
list-style-type: none;
article h3 {
font-size: 1.4em;
}
main a[href^='http'] {
background: url('../svg/external-link.svg') no-repeat left center;
background-size: 10px 10px;
display: inline-block;
padding-left: 15px;
article h4 {
font-size: 1.2em;
}
code {
display: block;
white-space: pre;
white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -o-pre-wrap;
padding: 0.5em 1em;
border: 1px solid grey;
background-color: #faf8f0;
margin-top: 0.5em;
article h5 {
font-size: 1.0em;
}
article {
padding: 1.25rem 0;
article h6 {
font-size: 0.8em;
}
main h1 {
margin-top: 1em;
article ul,
article ol,
article p {
font-size: 1.1em;
margin-bottom: 20px;
line-height: 1.5;
}
main h2 {
margin-top: 0.8em;
article ul,
article ol {
margin-left: 2.2em;
}
main h3 {
margin-top: 0.6em;
article table {
border-collapse: collapse;
border: 1px solid gray;
margin-bottom: 1.5em;
}
main h4 {
margin-top: 0.4em;
article td,
article th {
border: 1px solid gray;
padding: 0.5rem;
}
main ul {
margin-left: 1.5em;
padding-left: 2.2em;
line-height: 1.5;
article th {
font-weight: bold;
}
main ul li {
padding-left: 0.2em;
line-height: 1.5;
.footnotes {
margin-top: 0.4em;
font-size: 0.7em;
}
main ul li p {
margin-bottom: 0;
line-height: 1.5;
article sup {
margin-left: 0.1rem;
font-weight: bold;
font-size: 0.8em;
}
main ol {
margin-left: 2.2em;
line-height: 1.5;
article hr {
border: 1px dotted gray;
margin-bottom: 1rem;
margin-top: 1rem;
}
main p {
margin-top: 0.8em;
line-height: 1.5;
.highlight .chroma {
background-color: var(--article-box-bg-color);
}
#pagination {
@ -364,29 +438,6 @@ main p {
padding: 1em 0;
}
.article_link {
margin: 0;
}
.article_info {
font-size: 0.9em;
margin: 0 0 1em 0;
padding-bottom: 5px;
border-bottom-color: #285e8e;
border-bottom-style: solid;
border-bottom-width: 0.14rem;
}
.alert {
border-style: solid;
border-color: #555;
border-radius: 0;
border-width: 0.125rem;
margin: 10px;
padding: 5px;
font-weight:bold;
}
#index .menu {
list-style-type: none;
}