commit 708b8f2898dfcd84b729b90fd202c0ab54a9a652 Author: Jan-Lukas Else Date: Tue Sep 3 17:50:00 2019 +0200 Initial commit diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..cf1ab25 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +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 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. + +For more information, please refer to diff --git a/README.md b/README.md new file mode 100644 index 0000000..79e76e5 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# Indieroad + +This is the Hugo theme I developed for my blogs and websites. It originally derived from the [Mainroad theme](https://github.com/Vimux/Mainroad), but since then, no line of code is like it was before. + +A lot of things are customized to [my own needs](https://jlelse.dev), but I wanted to open source the code, because it might be helpful to others to see how I implemented things. + +This theme is released to the public domain, so you can do whatever you want with it. But of course it would be nice, if you give attributions and contribute improvements. Thanks! \ No newline at end of file diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..551ed7c --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,7 @@ +--- +title: "Title" +date: {{ .Date }} +lastmod: +tags: +- Tag +--- \ No newline at end of file diff --git a/archetypes/link.md b/archetypes/link.md new file mode 100644 index 0000000..5385389 --- /dev/null +++ b/archetypes/link.md @@ -0,0 +1,6 @@ +--- +title: "Title" +date: {{ .Date }} +lastmod: +externalURL: "https://link.tld/" +--- \ No newline at end of file diff --git a/assets/css/custom.scss b/assets/css/custom.scss new file mode 100644 index 0000000..925b914 --- /dev/null +++ b/assets/css/custom.scss @@ -0,0 +1 @@ +$mainColor: #1976d2; \ No newline at end of file diff --git a/assets/css/style.scss b/assets/css/style.scss new file mode 100644 index 0000000..22daece --- /dev/null +++ b/assets/css/style.scss @@ -0,0 +1,828 @@ +@import 'custom.scss'; + +/* Themes */ +$colors: ( + body-background: #f7f7f7, + container-background: #fff, + contrast-text: #fff, + contrast-background: #263238, + headline: #000, + strong-text: #000, + light-background: #f5f5f5, + border: #ebebeb, + border-hover: #aaa, + meta: #666, + hr: #dadada, + body-background-dark: #263238, + container-background-dark:#000a12, + contrast-text-dark:#fff, + contrast-background-dark:#4f5b62, + headline-dark:#fff, + strong-text-dark:#000, + light-background-dark:#4f5b62, + border-dark:#ebebeb, + border-hover-dark:#aaa, + meta-dark:#666, + hr-dark:#dadada, + main-color: $mainColor +); + +@mixin color($property, $varName) { + #{$property}: map-get($colors, $varName); + #{$property}: var(--#{$varName}, map-get($colors, $varName)); +} + +@mixin color-border($property, $val1, $val2, $varName) { + #{$property}: #{$val1} #{$val2} map-get($colors, $varName); + #{$property}: #{$val1} #{$val2} var(--#{$varName}, map-get($colors, $varName)); +} + +@mixin lightmode { + --body-background: #{map-get($colors, body-background)}; + --container-background: #{map-get($colors, container-background)}; + --contrast-text: #{map-get($colors, contrast-text)}; + --contrast-background: #{map-get($colors, contrast-background)}; + --headline: #{map-get($colors, headline)}; + --strong-text: #{map-get($colors, strong-text)}; + --light-background: #{map-get($colors, light-background)}; + --border: #{map-get($colors, border)}; + --border-hover: #{map-get($colors, border-hover)}; + --meta: #{map-get($colors, meta)}; + --hr: #{map-get($colors, hr)}; + --main-color: #{map-get($colors, main-color)}; + color: #000; +} + +@mixin darkmode { + --body-background: #{map-get($colors, body-background-dark)}; + --container-background: #{map-get($colors, container-background-dark)}; + --contrast-text: #{map-get($colors, contrast-text-dark)}; + --contrast-background: #{map-get($colors, contrast-background-dark)}; + --headline: #{map-get($colors, headline-dark)}; + --strong-text: #{map-get($colors, strong-text-dark)}; + --light-background: #{map-get($colors, light-background-dark)}; + --border: #{map-get($colors, border-dark)}; + --border-hover: #{map-get($colors, border-hover-dark)}; + --meta: #{map-get($colors, meta-dark)}; + --hr: #{map-get($colors, hr-dark)}; + --main-color: #{map-get($colors, main-color)}; + color: #fff; +} + +* { + @include lightmode; + @media (prefers-color-scheme: light) { + @include lightmode; + } + @media (prefers-color-scheme: dark) { + @include darkmode; + } +} + +.dark, .dark * { + @include darkmode; +} + +/* Structure */ + +$break1: 620px; +$break2: 767px; +$break3: 900px; +$break4: 1475px; + +*, +*::before, +*::after { + box-sizing: border-box; +} + +article, +aside, +dialog, +figcaption, +figure, +footer, +header, +hgroup, +main, +nav, +section { + display: block; +} + +body { + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; + font-size: 1rem; + line-height: 1.5; + word-wrap: break-word; + @include color(background, body-background); +} + +.container { + position: relative; + width: 100%; + max-width: 1080px; + margin: 0 auto; +} + +.body-container { + @extend .container; + margin: 25px auto; + @media screen and (max-width: $break4) { + width: 95%; + } + @media screen and (max-width: $break3) { + width: 100%; + margin: 0 auto; + } +} + +.wrapper { + padding: 25px; + @include color(background, container-background); + @media screen and (max-width: $break3) { + padding: 20px; + } + @media screen and (max-width: $break2) { + display: block; + } +} + +.flex { + display: flex; +} + +.primary { + flex: 1 0 65.83%; + order: 1; + min-width: 0; +} + +.clearfix { + display: block; + &::after { + display: block; + height: 0; + padding: 0; + margin: 0; + clear: both; + line-height: 0; + visibility: hidden; + content: ""; + } +} + +input, +button, +select, +optgroup, +textarea { + margin: 0; + font-family: inherit; + font-size: inherit; + line-height: inherit; +} + +/* Button */ +.btn { + padding: 5px 10px; + font-weight: 700; + white-space: pre-line; + @include color(color, contrast-text); + @include color(background, contrast-background); + &:hover { + @include color(color, contrast-text); + @include color(background, main-color); + } +} + +/* Typography */ +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 0 0 20px; + font-weight: 700; + line-height: 1.3; + @include color(color, headline); +} + +h1 { + font-size: 2rem; +} + +h2 { + font-size: 1.5rem; +} + +h3 { + font-size: 1.25rem; +} + +h4 { + font-size: 1.125rem; +} + +h5, +h6 { + font-size: 1rem; +} + +a { + text-decoration: none; + &:hover { + @include color(color, main-color); + } +} + +hr { + margin: 0 0 20px; + border: 0; + @include color-border(border-top, 1px, solid, hr); +} + +p { + margin: 0 0 20px; +} + +b, +strong { + font: inherit; + font-weight: 700; +} + +i, +em { + font: inherit; + font-style: italic; +} + +ol, +ul { + padding: 0; + margin: 0; +} + +small { + font-size: .75rem; +} + +figure { + margin: 0 0 20px; +} + +figcaption { + margin-top: 4px; + @include color(color, meta); + h4 { + margin: 0; + color: inherit; + } +} + +pre, +code, +kbd, +samp { + font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + font-size: inherit; +} + +pre, +code { + @include color(background, light-background); + @include color-border(border, 1px, solid, border); +} + +code { + padding: 0 5px; + white-space: nowrap; +} + +pre { + display: block; + padding: 20px; + margin-bottom: 20px; + @include color(color, strong-text); + white-space: pre-wrap; + code { + padding: 0; + color: inherit; + white-space: inherit; + background: inherit; + border: 0; + } +} + +blockquote { + display: block; + padding: 5px 0 5px 15px; + margin: 0 0 20px; + line-height: 1.6; + @include color-border(border-left, 5px, solid, main-color); + p:last-child { + margin: 0; + } + footer { + text-align: right; + } +} + +sup, +sub { + font-size: .625rem; + font-style: normal; +} + +sup { + vertical-align: super; +} + +sub { + vertical-align: sub; +} + +abbr[title] { + text-decoration: none; + cursor: help; + border-bottom: 1px dotted; +} + +q { + font-style: italic; +} + +dl { + margin: 0 0 10px 20px; +} + +dt, +dd { + display: list-item; +} + +dt { + font-weight: bold; + list-style-type: square; +} + +dd { + margin-left: 20px; + list-style-type: circle; +} + +select { + max-width: 100%; +} + +.warning { + padding: 20px 10px; + text-align: center; +} + +/* Header */ +.header { + @include color(background, container-background); + .logo { + padding: 25px; + @media screen and (max-width: $break3) { + padding: 20px; + } + @media screen and (max-width: $break2) { + text-align: center; + } + .link { + display: inline-block; + line-height: 1; + font-weight: 700; + .title { + font-size: 2rem; + @include color(color, headline); + } + .tagline { + padding-top: 10px; + margin-top: 10px; + font-size: .875rem; + @include color(color, main-color); + @include color-border(border-top, 1px, solid, border); + } + } + } +} + +/* Main menu */ +.menu { + .expand { + display: block; + width: 100%; + @include color(background, contrast-background); + border: 0; + cursor: pointer; + @media screen and (min-width: $break2) { + display: none; + } + .title { + font-size: .9375rem; + @include color(color, contrast-text); + display: block; + padding: 10px 15px; + font-weight: 700; + text-align: right; + text-transform: uppercase; + } + } + #menu-toggle { + display: none; + } + #menu-list { + list-style: none; + @include color(background, contrast-background); + position: absolute; + width: 100%; + visibility: hidden; + transform: scaleY(0); + transform-origin: top; + @media screen and (min-width: $break2) { + position: relative; + display: flex; + flex-wrap: wrap; + visibility: visible; + transform: none; + } + .item { + .link { + display: block; + padding: 10px 15px; + font-weight: 700; + font-size: .9375rem; + @include color(color, contrast-text); + text-transform: uppercase; + &:hover { + @include color(color, contrast-text); + @include color(background, main-color); + } + } + } + } + #menu-toggle:checked + #menu-list { + visibility: visible; + transform: scaleY(1); + } +} + +.divider { + height: 5px; + margin: 0; + @include color(background, main-color); + border: 0; +} + +/* Posts/Pages */ +.main-header { + margin-bottom: 20px; + .main-title { + font-size: 1.75rem; + } + .post-title { + margin: 0; + } + .post-meta { + @extend .meta; + padding: 5px 0; + margin-top: 10px; + @include color-border(border-top, 1px, dotted, border); + @include color-border(border-bottom, 1px, dotted, border); + } +} + +.main-content { + @extend .content; + @extend .clearfix; + margin-bottom: 20px; +} + +.meta { + font-size: .8125rem; + vertical-align: baseline; + @include color(color, meta); + .item { + display: inline; + margin-left: 15px; + @media screen and (max-width: $break1) { + display: block; + margin-left: 0; + } + &:first-child { + margin-left: 0; + } + .text { + vertical-align: middle; + } + } +} + +.content { + a { + font-weight: 700; + &:hover { + @include color(color, main-color); + text-decoration: underline; + } + } + ul { + list-style: square; + } + ol { + list-style: decimal; + } + ul, ol { + margin: 0 0 20px 40px; + @media screen and (max-width: $break1) { + margin: 0 0 20px 20px; + } + } + ul ul, ol ol, ol ul, ul ol { + margin: 0 0 0 40px; + @media screen and (max-width: $break1) { + margin: 0 0 0 20px; + } + } + li { + margin-bottom: 5px; + } +} + +.tags { + @extend .clearfix; + margin-bottom: 20px; + font-size: .75rem; + line-height: 1; + @include color(color, contrast-text); + .tags-list { + list-style: none; + .tag-item { + float: left; + margin: 0 6px 6px 0; + text-transform: uppercase; + @include color(background, contrast-background); + &:hover { + @include color(background, main-color); + } + .tag-link { + @extend .btn; + display: block; + padding: 10px 15px; + } + } + } +} + +/* Authorbox */ +.authorbox { + padding: 25px 0; + margin-bottom: 25px; + line-height: 1.5; + @include color-border(border-top, 1px, solid, border); + @include color-border(border-bottom, 1px, solid, border); + display: block; + @media screen and (max-width: $break1) { + text-align: center; + } + .author-header { + margin-bottom: 10px; + } + .author-name { + font-size: 1rem; + font-weight: 700; + } +} + +/* Webmentionform */ +.wm-form { + margin-bottom: 25px; + line-height: 1.5; + display: block; + #wm-source { + width: 100%; + margin-bottom: 10px; + } + .description { + margin-bottom: 10px; + } +} + +/* List content */ +.list { + .list-item { + padding-bottom: 20px; + margin-bottom: 20px; + @include color-border(border-bottom, 1px, solid, border); + .list-header { + margin-bottom: 10px; + .list-title { + margin: 0; + &:hover { + @include color(color, main-color); + } + } + .list-meta { + @extend .meta; + margin-top: 5px; + } + } + .list-excerpt { + @extend .content; + @extend .clearfix; + } + .list-footer { + @extend .clearfix; + .read-more { + @extend .btn; + float: right; + margin-top: 10px; + } + } + } +} + +/* Pagination */ +.pagination { + margin-top: 20px; + .item { + display: inline-block; + padding: 10px 15px; + font-weight: 700; + @include color(color, strong-text); + @include color(background, light-background); + &:hover, &--current { + @include color(color, contrast-text); + @include color(background, main-color); + } + } +} + +/* Post Navigation */ +.post-nav { + justify-content: space-between; + padding-top: 25px; + padding-bottom: 25px; + margin-bottom: 25px; + @include color-border(border-bottom, 1px, solid, border); + display: flex; + @media screen and (max-width: $break1) { + display: block; + } + .item { + flex: 1 1 50%; + max-width: 48%; + @media screen and (max-width: $break1) { + max-width: 100%; + } + &--prev { + margin-right: auto; + text-align: left; + @media screen and (max-width: $break1) { + padding-bottom: 25px; + min-width: 100%; + text-align: center; + } + } + &--next { + margin-left: auto; + text-align: right; + @media screen and (max-width: $break1) { + min-width: 100%; + text-align: center; + } + } + .link { + display: block; + .post-title { + margin-bottom: 0; + overflow: hidden; + font-size: .8125rem; + } + .caption { + display: block; + margin-bottom: 5px; + font-weight: 700; + line-height: 1; + text-transform: uppercase; + } + } + } +} + +/* Images / Video */ +img { + max-width: 100%; + height: auto; + vertical-align: bottom; +} + +iframe, +embed, +object, +video { + max-width: 100%; +} + +/* Table */ +table { + width: 100%; + margin-bottom: 20px; + border-spacing: 0; + border-collapse: collapse; + @include color-border(border-top, 1px, solid, border); + @include color-border(border-left, 1px, solid, border); +} + +td, +th { + padding: 5px 10px; + @include color-border(border-right, 1px, solid, border); + @include color-border(border-bottom, 1px, solid, border); +} + +th { + font-weight: 700; +} + +/* Forms */ +input { + padding: 5px; + vertical-align: middle; + @include color(background, light-background); + @include color-border(border, 1px, solid, border); + &[type=text], &[type=email], &[type=tel], &[type=url] { + width: 100%; + } + &[type=submit], &[type=reset] { + @extend .btn; + min-width: 100px; + border: 0; + text-transform: uppercase; + cursor: pointer; + } +} + +textarea { + width: 100%; + padding: 5px; + overflow: auto; + line-height: 1.5; + resize: vertical; + @include color(background, light-background); + @include color-border(border, 1px, solid, border); +} + +/* Footer */ +.footer { + padding: 10px 25px; + font-size: .75rem; + @include color(background, contrast-background); + *, *:hover { + @include color(color, contrast-text); + } + .container { + @extend .flex; + flex-flow: row wrap; + justify-content: space-between; + @media screen and (max-width: $break3) { + display: block; + } + } + .copyright { + order: 1; + @media screen and (max-width: $break3) { + padding-bottom: 8px; + text-align: center; + } + } + .toggle { + order: 2; + &:hover { + cursor: pointer; + } + @media screen and (max-width: $break3) { + padding-bottom: 8px; + text-align: center; + } + .no-js & { + display: none; + } + } + .links { + order: 3; + a:hover { + cursor: pointer; + } + @media screen and (max-width: $break3) { + padding-bottom: 8px; + text-align: center; + } + } +} \ No newline at end of file diff --git a/assets/js/theme.js b/assets/js/theme.js new file mode 100644 index 0000000..5408ad5 --- /dev/null +++ b/assets/js/theme.js @@ -0,0 +1,28 @@ +'use strict'; + +function toggleTheme(){ + if (localStorage && localStorage.getItem("theme") === "dark"){ + localStorage.setItem("theme", "default"); + } else if (localStorage){ + localStorage.setItem("theme", "dark"); + } + checkTheme(); +} + +function checkTheme(){ + if (localStorage && localStorage.getItem("theme") === "dark"){ + document.body.className = "body dark"; + } else if (localStorage){ + document.body.className = "body"; + } +} + +function checkToggleAllowed(){ + if(window.matchMedia("(prefers-color-scheme: dark)").matches || window.matchMedia("(prefers-color-scheme: light)").matches){ + document.getElementById("theme-toggle").remove(); + } else { + checkTheme(); + } +} + +checkToggleAllowed(); \ No newline at end of file diff --git a/config.yaml b/config.yaml new file mode 100644 index 0000000..081f448 --- /dev/null +++ b/config.yaml @@ -0,0 +1,4 @@ +module: + hugoVersion: + extended: true + min: "0.57.2" \ No newline at end of file diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..689b679 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module codeberg.org/jlelse/Indieroad + +go 1.12 diff --git a/i18n/de.yaml b/i18n/de.yaml new file mode 100644 index 0000000..68143ba --- /dev/null +++ b/i18n/de.yaml @@ -0,0 +1,42 @@ +# General +- id: read_more + translation: Weiterlesen + +- id: permalink + translation: Permalink + +- id: menu_label + translation: Menü + +# Post meta +- id: meta_lastmod + translation: Zuletzt geändert + +# Post nav +- id: post_nav_prev + translation: Zurück + +- id: post_nav_next + translation: Weiter + +# Authorbox +- id: authorbox_name + translation: Über + +# 404 +- id: 404_title + translation: Seite nicht gefunden + +- id: 404_text + translation: "Die gesuchte Seite existiert nicht, wurde verschoben oder gelöscht." + +# Toggle theme +- id: toggle_theme + translation: Theme umschalten + +# Webmention Form +- id: wmform_label + translation: "Hast du eine Antwort hierzu veröffentlicht? Lass mich den Link wissen:" + +- id: wmform_btn + translation: "Senden" \ No newline at end of file diff --git a/i18n/en.yaml b/i18n/en.yaml new file mode 100644 index 0000000..66fb973 --- /dev/null +++ b/i18n/en.yaml @@ -0,0 +1,42 @@ +# General +- id: read_more + translation: Read more + +- id: permalink + translation: Permalink + +- id: menu_label + translation: Menu + +# Post meta +- id: meta_lastmod + translation: Last Modified + +# Post nav +- id: post_nav_prev + translation: Previous + +- id: post_nav_next + translation: Next + +# Authorbox +- id: authorbox_name + translation: About + +# 404 +- id: 404_title + translation: Page not found + +- id: 404_text + translation: "The page you were looking for appears to have been moved, deleted or does not exist." + +# Toggle theme +- id: toggle_theme + translation: Toggle theme + +# Webmention Form +- id: wmform_label + translation: "Have you published a response to this? Let me know the link:" + +- id: wmform_btn + translation: "Send" \ No newline at end of file diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..9a27616 --- /dev/null +++ b/layouts/404.html @@ -0,0 +1,8 @@ +{{ define "main" }} +
+
+

{{ T "404_title" }}

+

{{ T "404_text" }}

+
+
+{{ end }} \ No newline at end of file diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..7e72ac3 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,55 @@ + + + + + + + {{ block "title" . }}{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ .Site.Title }}{{ end }} + + + + {{ template "_internal/opengraph.html" . }} + {{ template "_internal/schema.html" . }} + {{ template "_internal/twitter_cards.html" . }} + + + {{ range .AlternativeOutputFormats }} + + {{ end }} + {{ if .Param "original" }} + + {{ else }} + + {{ end }} + {{- if .Param "indieweb.enabled" }} + {{- with .Param "indieweb.endpoints.webmention" }} + + {{- end }} + {{- with .Param "indieweb.endpoints.pingback" }} + + {{- end }} + {{- end }} + {{ partial "customhead" . }} + + +
+ {{ partial "header" . }} +
+
+ {{ block "main" . }} + {{ with .Content }} +
+ {{ . }} +
+ {{ end }} + {{ end }} +
+
+ {{ partial "footer" . }} +
+ {{ with resources.Get "js/theme.js" | minify }}{{ end }} + {{ partial "custombodyend" . }} + + \ No newline at end of file diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..710b6ca --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,18 @@ +{{ define "main" }} +
+ {{- with .Title }} +
+

{{ . }}

+
+ {{- end }} + {{- with .Content }} +
+ {{ . }} +
+ {{- end }} + {{- range .Paginator.Pages }} + {{- .Render "summary" }} + {{- end }} +
+{{ partial "pagination.html" . }} +{{ end }} \ No newline at end of file diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml new file mode 100644 index 0000000..5f064d3 --- /dev/null +++ b/layouts/_default/rss.xml @@ -0,0 +1,30 @@ +{{- $pctx := . -}} +{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} +{{- $pages := $pctx.RegularPages -}} +{{- $limit := .Site.Config.Services.RSS.Limit -}} +{{- if ge $limit 1 -}} +{{- $pages = $pages | first $limit -}} +{{- end -}} +{{- printf "" | safeHTML }} + + + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} + {{ .Permalink }} + Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} + {{ with .Site.LanguageCode }}{{.}}{{end}} + {{ with .Site.Copyright }}{{.}}{{end}} + {{ if not .Date.IsZero }}{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} + {{ with .OutputFormats.Get "RSS" }} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{ end }} + {{ range $pages }} + + {{ .Title }} + {{ .Permalink }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ .Permalink }} + {{ .Content | html }} + + {{ end }} + + \ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..929cc08 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,22 @@ +{{ define "main" }} +
+
+
+

{{ .Title }}

+ {{ with partial "post_meta.html" . -}} + + {{- end }} +
+
+ {{ with .Params.audio }} +

+ {{ end }} + {{ .Content }} +
+ {{ partial "post_tags.html" . }} +
+
+{{ partial "webmentionform" . }} +{{ partial "authorbox.html" . }} +{{ partial "post_nav.html" . }} +{{ end }} \ No newline at end of file diff --git a/layouts/_default/sitemap.xml b/layouts/_default/sitemap.xml new file mode 100644 index 0000000..92a285d --- /dev/null +++ b/layouts/_default/sitemap.xml @@ -0,0 +1,22 @@ +{{ printf "" | safeHTML }} + + {{ range .Site.RegularPages }}{{ if not .Params.robotsdisallow }} + + {{ .Permalink }}{{ if not .Lastmod.IsZero }} + {{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}{{ end }}{{ with .Sitemap.ChangeFreq }} + {{ . }}{{ end }}{{ if ge .Sitemap.Priority 0.0 }} + {{ .Sitemap.Priority }}{{ end }}{{ if .IsTranslated }}{{ range .Translations }} + {{ end }} + {{ end }} + + {{ end }}{{ end }} + \ No newline at end of file diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html new file mode 100644 index 0000000..611d735 --- /dev/null +++ b/layouts/_default/summary.html @@ -0,0 +1,20 @@ + \ No newline at end of file diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..441f58d --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,15 @@ +{{ define "main" }} +
+ {{- with .Content }} +
+ {{ . }} +
+ {{- end }} + {{- $postSections := ($.Param "postSections" | default (slice "posts")) }} + {{- $paginator := .Paginate ( where .Site.RegularPages "Section" "in" $postSections ) }} + {{- range $paginator.Pages }} + {{- .Render "summary" }} + {{- end }} +
+{{ partial "pagination.html" . }} +{{ end }} \ No newline at end of file diff --git a/layouts/links/single.html b/layouts/links/single.html new file mode 100644 index 0000000..98861f2 --- /dev/null +++ b/layouts/links/single.html @@ -0,0 +1,20 @@ +{{ define "main" }} +
+
+
+

{{ .Title }}

+ {{ with partial "post_meta.html" . -}} + + {{- end }} +
+
+ {{ .Content }} +

{{ .Params.externalUrl | markdownify }}

+
+ {{ partial "post_tags.html" . }} +
+
+{{ partial "webmentionform" . }} +{{ partial "authorbox.html" . }} +{{ partial "post_nav.html" . }} +{{ end }} \ No newline at end of file diff --git a/layouts/links/summary.html b/layouts/links/summary.html new file mode 100644 index 0000000..c410d70 --- /dev/null +++ b/layouts/links/summary.html @@ -0,0 +1,18 @@ + \ No newline at end of file diff --git a/layouts/partials/authorbox.html b/layouts/partials/authorbox.html new file mode 100644 index 0000000..5f1f895 --- /dev/null +++ b/layouts/partials/authorbox.html @@ -0,0 +1,16 @@ +{{- if .Param "authorbox" }} +{{- with .Site.Author }} +
+ {{- if .name }} +
+ {{ T "authorbox_name" }} {{ if .link }}{{ .name }}{{ else }}{{ .name }}{{ end }} +
+ {{- end }} + {{- with .bio }} +
+ {{ . }} +
+ {{- end }} +
+{{- end }} +{{- end }} \ No newline at end of file diff --git a/layouts/partials/custombodyend.html b/layouts/partials/custombodyend.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/partials/customhead.html b/layouts/partials/customhead.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..d18c7d5 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,17 @@ +
+
+ {{ with .Site.Menus.footer -}} + + {{- end }} + + +
+
\ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..f794217 --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,9 @@ +
+ + {{ partial "menu.html" . }} +
\ No newline at end of file diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html new file mode 100644 index 0000000..8f8f420 --- /dev/null +++ b/layouts/partials/menu.html @@ -0,0 +1,20 @@ +{{- if .Site.Menus.main }} + +{{- else -}} +
+{{- end }} \ No newline at end of file diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html new file mode 100644 index 0000000..39eee02 --- /dev/null +++ b/layouts/partials/pagination.html @@ -0,0 +1,11 @@ +{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }} + +{{ end }} \ No newline at end of file diff --git a/layouts/partials/post_meta.html b/layouts/partials/post_meta.html new file mode 100644 index 0000000..caedde0 --- /dev/null +++ b/layouts/partials/post_meta.html @@ -0,0 +1,10 @@ +{{- if not .Params.nometa }} +{{- if not .Date.IsZero }} +
+ +{{- if ne .Date .Lastmod }} + +{{- end }} +
+{{ end -}} +{{ end -}} \ No newline at end of file diff --git a/layouts/partials/post_nav.html b/layouts/partials/post_nav.html new file mode 100644 index 0000000..c82f98e --- /dev/null +++ b/layouts/partials/post_nav.html @@ -0,0 +1,16 @@ +{{- if .Site.Params.post_navigation }} +{{- if or (.PrevInSection) (.NextInSection) }} + +{{- end }} +{{- end }} \ No newline at end of file diff --git a/layouts/partials/post_tags.html b/layouts/partials/post_tags.html new file mode 100644 index 0000000..fc4eb50 --- /dev/null +++ b/layouts/partials/post_tags.html @@ -0,0 +1,9 @@ +{{- if .Params.tags }} +
+
    + {{- range .Params.tags }} +
  • + {{- end }} +
+
+{{- end }} \ No newline at end of file diff --git a/layouts/partials/webmentionform.html b/layouts/partials/webmentionform.html new file mode 100644 index 0000000..bb07ae1 --- /dev/null +++ b/layouts/partials/webmentionform.html @@ -0,0 +1,14 @@ +{{- if .Param "indieweb.enabled" }} +{{- if not (.Param "indieweb.hidewmform") }} +{{- if .Param "indieweb.endpoints.webmention" }} +
+
+

+ + + +
+
+{{- end }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/layouts/robots.txt b/layouts/robots.txt new file mode 100644 index 0000000..8b90f46 --- /dev/null +++ b/layouts/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +{{- range where .Site.RegularPages "Params.robotsdisallow" true }} +Disallow: {{ .RelPermalink }}{{end}} +Sitemap: {{ "sitemap.xml" | absLangURL }} \ No newline at end of file diff --git a/layouts/shortcodes/table.html b/layouts/shortcodes/table.html new file mode 100644 index 0000000..8807c21 --- /dev/null +++ b/layouts/shortcodes/table.html @@ -0,0 +1 @@ +
{{ .Inner | markdownify }}
\ No newline at end of file