Initial commit
This commit is contained in:
commit
42f0673a5b
|
@ -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 <http://unlicense.org>
|
|
@ -0,0 +1,7 @@
|
|||
# Indiego
|
||||
|
||||
This is the Hugo theme for [my blog](https://jlelse.blog/).
|
||||
|
||||
A lot of things are customized to my own needs, 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!
|
|
@ -0,0 +1,129 @@
|
|||
$colors: (
|
||||
background: #fff,
|
||||
background-dark: #000,
|
||||
primary: #000,
|
||||
primary-dark: #fff
|
||||
);
|
||||
|
||||
@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 {
|
||||
--background: #{map-get($colors, background)};
|
||||
--primary: #{map-get($colors, primary)};
|
||||
color: #000;
|
||||
}
|
||||
|
||||
@mixin darkmode {
|
||||
--background: #{map-get($colors, background-dark)};
|
||||
--primary: #{map-get($colors, primary-dark)};
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
html {
|
||||
@include lightmode;
|
||||
@media (prefers-color-scheme: dark) {
|
||||
@include darkmode;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
/* Background color */
|
||||
@include color(background, background);
|
||||
/* Font settings */
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
line-height: 1.5;
|
||||
/* Center body */
|
||||
margin: 0 auto;
|
||||
max-width: 750px;
|
||||
padding: 10px;
|
||||
/* Wrapping */
|
||||
word-break: break-word;
|
||||
overflow-wrap: break-word;
|
||||
* {
|
||||
@include color(color, primary);
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
header {
|
||||
padding: 10px 0;
|
||||
* {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
h1 a {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
input, button {
|
||||
@include color-border(border, 1px, solid, primary);
|
||||
@include color(background, background);
|
||||
@include color(color, primary);
|
||||
padding: 5px 10px;
|
||||
border-radius: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
@include color-border(border-left, 5px, solid, primary);
|
||||
padding-left: 20px;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 10px;
|
||||
@include color-border(border, 1px, solid, primary);
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
footer {
|
||||
padding: 10px 0;
|
||||
* {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
footer, .border-top {
|
||||
@include color-border(border-top, 1px, solid, primary);
|
||||
}
|
||||
|
||||
header, .border-bottom {
|
||||
@include color-border(border-bottom, 1px, solid, primary);
|
||||
}
|
||||
|
||||
.fake-p {
|
||||
display: block;
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.full-width {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.invert {
|
||||
@include color(color, background);
|
||||
@include color(background, primary);
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
"use strict";
|
||||
|
||||
function getVoice() {
|
||||
if (window.speechSynthesis) {
|
||||
return window.speechSynthesis.getVoices().filter(voice => voice.lang.startsWith(document.querySelector('html').lang))[0];
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function initSpeak() {
|
||||
if (window.speechSynthesis) {
|
||||
let speakBtn = document.querySelector('#speakBtn');
|
||||
speakBtn.style.display = '';
|
||||
speakBtn.onclick = function() { speak() };
|
||||
speakBtn.textContent = speakText;
|
||||
}
|
||||
}
|
||||
|
||||
function speak() {
|
||||
console.log("Start speaking")
|
||||
let speakBtn = document.querySelector('#speakBtn');
|
||||
speakBtn.onclick = function() { stopSpeak() };
|
||||
speakBtn.textContent = stopSpeakText;
|
||||
let textContent =
|
||||
((document.querySelector('article .p-name')) ? document.querySelector('article .p-name').innerText + "\n\n" : "")
|
||||
+ document.querySelector('article .e-content').innerText;
|
||||
let utterThis = new SpeechSynthesisUtterance(textContent);
|
||||
utterThis.voice = getVoice();
|
||||
utterThis.onerror = stopSpeak;
|
||||
utterThis.onend = stopSpeak;
|
||||
window.speechSynthesis.speak(utterThis);
|
||||
}
|
||||
|
||||
function stopSpeak() {
|
||||
console.log("Stop speaking")
|
||||
window.speechSynthesis.cancel();
|
||||
let speakBtn = document.querySelector('#speakBtn');
|
||||
speakBtn.onclick = function() { speak() };
|
||||
speakBtn.textContent = speakText;
|
||||
}
|
||||
|
||||
window.onbeforeunload = function () {
|
||||
stopSpeak();
|
||||
}
|
||||
initSpeak();
|
|
@ -0,0 +1,8 @@
|
|||
outputFormats:
|
||||
jsonfeed:
|
||||
mediaType: "application/json"
|
||||
baseName: "feed"
|
||||
isPlainText: true
|
||||
podcast:
|
||||
mediaType: "application/rss+xml"
|
||||
baseName: "podcast"
|
|
@ -0,0 +1,50 @@
|
|||
- id: read_more
|
||||
translation: Weiterlesen
|
||||
|
||||
- id: meta_lastmod
|
||||
translation: Zuletzt geändert
|
||||
|
||||
- id: meta_reply_to
|
||||
translation: Antwort auf
|
||||
|
||||
- id: meta_like_of
|
||||
translation: Like von
|
||||
|
||||
- id: 404_title
|
||||
translation: Seite nicht gefunden
|
||||
|
||||
- id: 404_text
|
||||
translation: "Die gesuchte Seite existiert nicht, wurde verschoben oder gelöscht."
|
||||
|
||||
- id: wmform_label
|
||||
translation: "Hast du eine Antwort hierzu veröffentlicht? Füg dir URL hier ein."
|
||||
|
||||
- id: wmform_btn
|
||||
translation: "Senden"
|
||||
|
||||
- id: anon_comment
|
||||
translation: "Du kannst auch einen anonymen Kommentar erstellen."
|
||||
|
||||
- id: related
|
||||
translation: "Ähnlich"
|
||||
|
||||
- id: share
|
||||
translation: "Teilen"
|
||||
|
||||
- id: interactions
|
||||
translation: "Interaktionen"
|
||||
|
||||
- id: translations
|
||||
translation: Übersetzungen
|
||||
|
||||
- id: oldcontent
|
||||
translation: Dieser Eintrag ist bereits über ein Jahr alt. Er ist möglicherweise nicht mehr aktuell. Meinungen können sich geändert haben.
|
||||
|
||||
- id: speak
|
||||
translation: Lies mir bitte vor.
|
||||
|
||||
- id: stopspeak
|
||||
translation: Hör auf zu sprechen!
|
||||
|
||||
- id: subscribe
|
||||
translation: Abonnieren
|
|
@ -0,0 +1,53 @@
|
|||
- id: read_more
|
||||
translation: Read more
|
||||
|
||||
- id: meta_lastmod
|
||||
translation: Last modified
|
||||
|
||||
- id: meta_reply_to
|
||||
translation: Reply to
|
||||
|
||||
- id: meta_like_of
|
||||
translation: Like of
|
||||
|
||||
- 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."
|
||||
|
||||
- id: wmform_label
|
||||
translation: "Have you published a response to this? Paste the URL here."
|
||||
|
||||
- id: wmform_btn
|
||||
translation: "Send"
|
||||
|
||||
- id: anon_comment
|
||||
translation: "You can also create an anonymous comment."
|
||||
|
||||
- id: related
|
||||
translation: "Related"
|
||||
|
||||
- id: share
|
||||
translation: "Share"
|
||||
|
||||
- id: interactions
|
||||
translation: "Interactions"
|
||||
|
||||
- id: also_on
|
||||
translation: "Also on"
|
||||
|
||||
- id: translations
|
||||
translation: Translations
|
||||
|
||||
- id: oldcontent
|
||||
translation: This entry is already over one year old. It may no longer be up to date. Opinions may have changed.
|
||||
|
||||
- id: speak
|
||||
translation: Read to me, please.
|
||||
|
||||
- id: stopspeak
|
||||
translation: Stop speaking!
|
||||
|
||||
- id: subscribe
|
||||
translation: Subscribe
|
|
@ -0,0 +1,6 @@
|
|||
{{ define "main" }}
|
||||
<main>
|
||||
<h1>{{ T "404_title" }}</h1>
|
||||
<p>{{ T "404_text" }}</p>
|
||||
</main>
|
||||
{{ end }}
|
|
@ -0,0 +1 @@
|
|||
<a href="{{ .Destination | safeURL }}"><img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}"{{ end }} /></a>
|
|
@ -0,0 +1 @@
|
|||
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener"{{ end }}>{{ .Text | markdownify }}</a>
|
|
@ -0,0 +1,30 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.LanguageCode | default "en-us" }}">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>{{ block "title" . }}{{ if not .IsHome }}{{ with .Title }}{{ . }} - {{end}}{{ end }}{{ .Site.Title }}{{ end }}</title>
|
||||
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
{{ template "_internal/schema.html" . }}
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
||||
{{ partialCached "styles" . }}
|
||||
<link rel="shortcut icon" href="{{ .Site.Params.favicon }}">
|
||||
{{ range .AlternativeOutputFormats }}
|
||||
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
|
||||
{{ end }}
|
||||
{{ if .Param "original" }}
|
||||
<link rel="canonical" href="{{ .Param "original" }}">
|
||||
{{ else }}
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
{{ end }}
|
||||
{{ partialCached "indiewebhead" . (.Param "indieweb.enabled") }}
|
||||
{{ partialCached "customhead" . }}
|
||||
{{ partialCached "header" . }}
|
||||
{{ block "main" . }}
|
||||
{{ with .Content }}
|
||||
{{ . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ partialCached "footer" . }}
|
||||
{{ partialCached "custombodyend" . }}
|
|
@ -0,0 +1,14 @@
|
|||
{{ define "main" }}
|
||||
<main class="h-feed">
|
||||
{{ with .Title }}<h1>{{ . }}</h1>{{ end }}
|
||||
{{ if not .Params.nometa }}{{ partial "list_meta" . }}{{ end }}
|
||||
{{ with .Content }}{{ . }}{{ end }}
|
||||
{{ if ne (.Param "hideList") true }}
|
||||
{{ range .Paginator.Pages }}
|
||||
{{ .Render "summary" }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if (.Param "authorbox") }}{{ partialCached "authorbox" . }}{{ end }}
|
||||
</main>
|
||||
{{ partial "pagination" . }}
|
||||
{{ end }}
|
|
@ -0,0 +1,39 @@
|
|||
{{- $pctx := . -}}
|
||||
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
|
||||
{{- $pages := slice -}}
|
||||
{{- if eq $.Kind "taxonomyTerm" -}}
|
||||
{{- $pages = $pctx.Pages -}}
|
||||
{{- else -}}
|
||||
{{- $pages = $pctx.RegularPages -}}
|
||||
{{- end -}}
|
||||
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
||||
{{- $postSections := ($.Param "postSections" | default (slice "posts")) }}
|
||||
{{- $pages := ( where $pages "Type" "in" $postSections ) }}
|
||||
{{- if ge $limit 1 -}}
|
||||
{{- $pages = $pages | first $limit -}}
|
||||
{{- end -}}
|
||||
{
|
||||
"version": "https://jsonfeed.org/version/1",
|
||||
"title": "{{ .Site.Title }}",
|
||||
"description": "{{ .Site.Params.description }}",
|
||||
"home_page_url": "{{ .Permalink}}",
|
||||
"feed_url": "{{ .Permalink }}feed.json",
|
||||
"author": {
|
||||
"name": "{{ .Site.Author.name }}",
|
||||
"url": "{{ .Site.Author.link }}"
|
||||
},
|
||||
"items": [
|
||||
{{ range $index, $pages := $pages }}
|
||||
{{ if ge $index 1 }}, {{end}}{
|
||||
"id": "{{ .Permalink }}",
|
||||
"url": "{{ .Permalink }}",
|
||||
"title": {{ .Title | jsonify }},
|
||||
"content_html": {{ partialCached "cleanedContent.json" . .Permalink }},
|
||||
"summary": {{ .Summary | jsonify }},
|
||||
"date_published": {{ dateFormat "2006-01-02T15:04:05-07:00" .Date | jsonify }},
|
||||
"date_modified": {{ dateFormat "2006-01-02T15:04:05-07:00" .Lastmod | jsonify }},
|
||||
"tags": {{ .Params.Tags | jsonify }}
|
||||
}
|
||||
{{ end }}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
<article class="h-entry border-bottom">
|
||||
{{ range .Params.images }}
|
||||
<p><a href="{{ . | safeURL }}"><img src="{{ . | safeURL }}"></a></p>
|
||||
{{ end }}
|
||||
<p><a class="u-url" href="{{ .RelPermalink }}">{{ T "read_more" }}</a></p>
|
||||
</article>
|
|
@ -0,0 +1,37 @@
|
|||
{{- $pctx := . -}}
|
||||
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
|
||||
{{- $pages := slice -}}
|
||||
{{- if eq $.Kind "taxonomyTerm" -}}
|
||||
{{- $pages = $pctx.Pages -}}
|
||||
{{- else -}}
|
||||
{{- $pages = $pctx.RegularPages -}}
|
||||
{{- end -}}
|
||||
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
||||
{{- $postSections := ($.Param "postSections" | default (slice "posts")) }}
|
||||
{{- $pages := ( where $pages "Type" "in" $postSections ) }}
|
||||
{{- if ge $limit 1 -}}
|
||||
{{- $pages = $pages | first $limit -}}
|
||||
{{- end -}}
|
||||
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
||||
{{ with .Site.LanguageCode }}<language>{{.}}</language>{{end}}
|
||||
{{ with .Site.Copyright }}<copyright>{{.}}</copyright>{{end}}
|
||||
{{ if not .Date.IsZero }}<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||
{{ with .OutputFormats.Get "RSS" }}
|
||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||
{{ end }}
|
||||
{{ range $pages }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>{{ partialCached "cleanedContent.xml" . .Permalink }}</description>
|
||||
</item>
|
||||
{{ end }}
|
||||
</channel>
|
||||
</rss>
|
|
@ -0,0 +1,41 @@
|
|||
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
|
||||
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
|
||||
<channel>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
{{ with .OutputFormats.Get "PODCAST" }}{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}{{ end }}
|
||||
<description>{{ .Summary | truncate 4000 ""}}</description>
|
||||
<itunes:summary>{{ .Summary | truncate 4000 ""}}</itunes:summary>
|
||||
{{ with .Site.LanguageCode }}<language>{{.}}</language>{{end}}
|
||||
{{ with .Site.Copyright }}<copyright>{{.}}</copyright>{{end}}
|
||||
<lastBuildDate>{{ dateFormat "Mon, 2 Jan 2006 15:04:05 -0700" .Lastmod }}</lastBuildDate>
|
||||
<itunes:author>{{ .Site.Author.name }}</itunes:author>
|
||||
<itunes:type>episodic</itunes:type>
|
||||
<itunes:owner>
|
||||
<itunes:name>{{ .Site.Author.name }}</itunes:name>
|
||||
<itunes:email>{{ .Params.podcast.email }}</itunes:email>
|
||||
</itunes:owner>
|
||||
<itunes:image href="{{ .Params.podcast.image }}"></itunes:image>
|
||||
<image>
|
||||
<url>{{ .Params.podcast.image }}</url>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
</image>
|
||||
<itunes:category text="{{ .Params.podcast.category }}"></itunes:category>
|
||||
<itunes:explicit>{{ .Params.explicit | default "no" }}</itunes:explicit>
|
||||
{{ range .RegularPages }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<itunes:title>{{ .Title }}</itunes:title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} </pubDate>
|
||||
{{ if .Params.guid }}<guid isPermaLink="false">{{ .Params.guid }}</guid>{{ else }}<guid>{{ .Permalink }}</guid>{{ end }}
|
||||
<itunes:author>{{ .Site.Author.name }}</itunes:author>
|
||||
<description>{{ .Summary | plainify }}</description>
|
||||
<itunes:summary>{{ .Summary | plainify }}</itunes:summary>
|
||||
{{ "<content:encoded><![CDATA[" | safeHTML }}{{ ( htmlUnescape ( partialCached "cleanedContent.xml" . .Permalink ) ) | safeHTML }}{{"]]></content:encoded>" | safeHTML}}
|
||||
<enclosure url="{{ .Params.audio }}" {{ with .Params.audioSize }}length="{{ . }}"{{ end }} {{ with .Params.audioMime }}type="{{ . }}"{{ end }}/>
|
||||
</item>
|
||||
{{ end }}
|
||||
</channel>
|
||||
</rss>
|
|
@ -0,0 +1,27 @@
|
|||
{{ define "main" }}
|
||||
<main class="h-entry">
|
||||
<article>
|
||||
{{ with .Title }}
|
||||
<h1 class="p-name">{{ . }}</h1>
|
||||
{{ end }}
|
||||
{{ if not .Params.nometa }}
|
||||
{{ partial "post_meta" . }}
|
||||
{{ partial "post_actions" . }}
|
||||
{{ end }}
|
||||
{{ partial "oldcontentwarning" . }}
|
||||
<div class="e-content">
|
||||
{{ with .Params.audio }}
|
||||
<audio controls preload="metadata" class="full-width"><source src="{{ . }}"/></audio>
|
||||
{{ end }}
|
||||
{{ .Content }}
|
||||
{{ with .Params.externalUrl }}
|
||||
<p><a class="u-bookmark-of" href="{{ . }}" target="_blank" rel="noopener">{{ . }}</a></p>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ partial "post_tags" . }}
|
||||
</article>
|
||||
{{ if (.Param "authorbox") }}{{ partialCached "authorbox" . }}{{ end }}
|
||||
</main>
|
||||
{{ partial "related" . }}
|
||||
{{ partial "mentions" . }}
|
||||
{{ end }}
|
|
@ -0,0 +1,22 @@
|
|||
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
{{ range .Data.Pages }}{{ if not .Params.robotsdisallow }}
|
||||
<url>
|
||||
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
|
||||
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
|
||||
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
|
||||
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }}
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="{{ .Language.Lang }}"
|
||||
href="{{ .Permalink }}"
|
||||
/>{{ end }}
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="{{ .Language.Lang }}"
|
||||
href="{{ .Permalink }}"
|
||||
/>{{ end }}
|
||||
</url>
|
||||
{{ end }}{{ end }}
|
||||
</urlset>
|
|
@ -0,0 +1,8 @@
|
|||
<article class="h-entry border-bottom">
|
||||
{{ with .Title }}<h2 class="p-name">{{ . }}</h2>{{ end }}
|
||||
{{ if not .Params.nometa }}
|
||||
{{ partialCached "summary_meta" . .Permalink }}
|
||||
{{ end }}
|
||||
<p class="p-summary">{{ .Summary }}</p>
|
||||
<p><a class="u-url" href="{{ .RelPermalink }}">{{ T "read_more" }}</a></p>
|
||||
</article>
|
|
@ -0,0 +1,12 @@
|
|||
{{ define "main" }}
|
||||
<main class="h-feed">
|
||||
{{ with .Content }}{{ . }}{{ end }}
|
||||
{{ $postSections := ($.Param "postSections" | default (slice "posts")) }}
|
||||
{{ $paginator := .Paginate ( where .Site.RegularPages "Type" "in" $postSections ) }}
|
||||
{{ range $paginator.Pages }}
|
||||
{{ .Render "summary" }}
|
||||
{{ end }}
|
||||
{{ partial "pagination" . }}
|
||||
{{ if (.Param "authorbox") }}{{ partialCached "authorbox" . }}{{ end }}
|
||||
</main>
|
||||
{{ end }}
|
|
@ -0,0 +1,14 @@
|
|||
{{ with .Site.Author }}
|
||||
<div class="p-author h-card hide">
|
||||
{{ if .avatar }}
|
||||
<data class="u-photo" value="{{ .avatar | relURL }}" style="display: none;"></data>
|
||||
{{ end }}
|
||||
{{ if .name }}
|
||||
{{ if .link }}
|
||||
<a href="{{ .link }}" class="p-name u-url" rel="me">{{ .name }}</a>
|
||||
{{ else }}
|
||||
<span class="p-name">{{ .name }}</span>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
|
@ -0,0 +1 @@
|
|||
{{ (( htmlUnescape .Content | safeHTML ) | replaceRE "href=\"/([^\"]*)\"" ( printf "href=\"%s$1\"" ( "" | absURL ) ) ) | jsonify }}
|
|
@ -0,0 +1 @@
|
|||
{{ (( htmlUnescape .Content | safeHTML ) | replaceRE "href=\"/([^\"]*)\"" ( printf "href=\"%s$1\"" ( "" | absURL ) ) ) | html }}
|
|
@ -0,0 +1,13 @@
|
|||
<footer>
|
||||
{{ if .Site.Menus.footer }}
|
||||
<nav>
|
||||
{{ $first := true }}
|
||||
{{ range sort .Site.Menus.footer }}
|
||||
{{ if ne $first true }} • {{ end }}
|
||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{ $first = false }}
|
||||
{{ end }}
|
||||
</nav>
|
||||
{{ end }}
|
||||
<p>© {{ now.Format "2006" }} {{ .Site.Params.copyright | default .Site.Title }}</p>
|
||||
</footer>
|
|
@ -0,0 +1,7 @@
|
|||
<header>
|
||||
<h1>
|
||||
<a href="{{ "" | relLangURL }}" rel="home" title="{{ .Site.Title }}">{{ .Site.Title }}</a>
|
||||
</h1>
|
||||
{{ with .Site.Params.subtitle }}<p><i>{{ . }}</i></p>{{ end }}
|
||||
{{ partialCached "menu" . }}
|
||||
</header>
|
|
@ -0,0 +1,17 @@
|
|||
{{- if .Param "indieweb.enabled" }}
|
||||
{{- with .Param "indieweb.endpoints.webmention" }}
|
||||
<link rel="webmention" href="{{ . }}" />
|
||||
{{- end }}
|
||||
{{- with .Param "indieweb.endpoints.pingback" }}
|
||||
<link rel="pingback" href="{{ . }}" />
|
||||
{{- end }}
|
||||
{{- with .Param "indieweb.endpoints.auth_endpoint" }}
|
||||
<link rel="authorization_endpoint" href="{{ . }}" />
|
||||
{{- end }}
|
||||
{{- with .Param "indieweb.endpoints.token_endpoint" }}
|
||||
<link rel="token_endpoint" href="{{ . }}" />
|
||||
{{- end }}
|
||||
{{- with .Param "indieweb.endpoints.micropub" }}
|
||||
<link rel="micropub" href="{{ . }}" />
|
||||
{{- end }}
|
||||
{{- end }}
|
|
@ -0,0 +1,5 @@
|
|||
{{ if .IsTranslated }}
|
||||
<div class="fake-p">
|
||||
{{ i18n "translations" }}: {{ $delimiter := "" }}{{ range .Translations }}{{ $delimiter }}<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>{{ $delimiter = ", " }}{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
|
@ -0,0 +1,30 @@
|
|||
{{ if .Param "indieweb.enabled" }}
|
||||
{{ if not (.Param "indieweb.hidewmform") }}
|
||||
{{ if .Param "indieweb.endpoints.webmention" }}
|
||||
{{ $md5pl := md5 (replace .Permalink "/" "") }}
|
||||
{{ $mentions := index .Site.Data.mentions $md5pl }}
|
||||
{{ $dateFormat := ( .Site.Params.dateformat | default "January 02, 2006") }}
|
||||
<details class="fake-p">
|
||||
<summary><b>{{ T "interactions" }}</b></summary>
|
||||
{{ with $mentions }}
|
||||
<ul>
|
||||
{{ range sort . ".date" "asc" }}{{ $sourceUrl := urls.Parse .source }}
|
||||
<li><a href="{{ .source }}" target="_blank" rel="nofollow noopener noreferrer">{{ $sourceUrl.Host }}</a> <i>{{ dateFormat $dateFormat .date }}</i></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
<form method="post" action="{{ .Param "indieweb.endpoints.webmention" }}">
|
||||
<label>
|
||||
{{ T "wmform_label" }}
|
||||
<input class="full-width" type="url" name="source" placeholder="URL" style="margin-bottom: 5px;">
|
||||
</label>
|
||||
<input type="hidden" name="target" value="{{ .Permalink }}">
|
||||
<input class="full-width" type="submit" value="{{ T "wmform_btn" }}" style="margin-bottom: 5px;">
|
||||
</form>
|
||||
<form action="https://quill.p3k.io/?dontask=1&me=https://commentpara.de&reply={{ .Permalink }}">
|
||||
<button class="full-width" type="submit">{{ T "anon_comment" }}</button>
|
||||
</form>
|
||||
</details>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
|
@ -0,0 +1,6 @@
|
|||
{{ if .Site.Menus.main }}
|
||||
<nav>
|
||||
{{ $first := true }}
|
||||
{{ range sort .Site.Menus.main }}{{ if ne $first true }} • {{ end }}<a href="{{ .URL }}">{{ .Name }}</a>{{ $first = false }}{{ end }}
|
||||
</nav>
|
||||
{{ end }}
|
|
@ -0,0 +1,7 @@
|
|||
{{ if .Param "oldcontentwarning" }}
|
||||
{{ if .Date }}
|
||||
{{ if (.Date.AddDate 1 0 0).Before now }}
|
||||
<p class="border-top border-bottom"><b>{{ ":warning:" | emojify }} {{ T "oldcontent" }}</b></p>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
|
@ -0,0 +1,11 @@
|
|||
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
|
||||
<div class="fake-p flex">
|
||||
{{ with .Paginator.Prev }}
|
||||
<form action="{{ .URL }}"><button class="invert">{{ .PageNumber }}</button></form>
|
||||
{{ end }}
|
||||
<button class="invert" disabled>{{ .Paginator.PageNumber }}/{{ .Paginator.TotalPages }}</button>
|
||||
{{ with .Paginator.Next }}
|
||||
<form action="{{ .URL }}"><button class="invert">{{ .PageNumber }}</button></form>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
|
@ -0,0 +1,16 @@
|
|||
{{ if or (.Param "shareLink") (and ((.Param "subscribeBtn") (.Param "subscribeLink"))) (.Param "speak") }}
|
||||
<div class="fake-p flex">
|
||||
{{ if (.Param "shareLink") }}
|
||||
<form action="https://www.addtoany.com/share#url={{ .Permalink }}{{ with .Title }}&title={{ . }}{{ end }}" target="_blank" rel="nofollow noopener noreferrer"><button class="invert" type="submit">{{ T "share" }}</button></form>
|
||||
{{ end }}
|
||||
{{ if and ((.Param "subscribeBtn") (.Param "subscribeLink")) }}
|
||||
<form action="{{ .Param "subscribeLink" }}"><button class="invert" type="submit">{{ T "subscribe" }}</button></form>
|
||||
{{ end }}
|
||||
{{ if (.Param "speak") }}
|
||||
<button id="speakBtn" class="invert" style="display: none;"></button>
|
||||
{{ $speakScript := resources.Get "js/speak.js" | minify | fingerprint }}
|
||||
<script>const speakText = "{{ T "speak" }}";const stopSpeakText = "{{ T "stopspeak" }}";</script>
|
||||
<script defer src="{{ $speakScript.RelPermalink }}" integrity="{{ $speakScript.Data.Integrity }}"></script>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
|
@ -0,0 +1,20 @@
|
|||
<div class="fake-p">
|
||||
{{ if not .Date.IsZero }}
|
||||
<div><time class="dt-published" datetime="{{.Date.Format "2006-01-02T15:04:05Z07:00"}}">{{.Date.Format ( .Site.Params.dateformat | default "January 02, 2006")}}</time>{{ if not (eq .FirstSection.RelPermalink .RelPermalink) }} in <a href="{{ .FirstSection.RelPermalink }}">{{ .FirstSection.Title }}</a>{{ end }}</div>
|
||||
{{ end }}
|
||||
{{ if ne .Date .Lastmod }}
|
||||
<div><time class="dt-updated" datetime="{{.Lastmod.Format "2006-01-02T15:04:05Z07:00"}}">{{ T "meta_lastmod" }}: {{.Lastmod.Format ( .Site.Params.dateformat | default "January 02, 2006")}}</time></div>
|
||||
{{ end }}
|
||||
{{ with .Param "indieweb.reply" }}{{ if .link }}
|
||||
<div>{{ T "meta_reply_to" }}: <a class="u-in-reply-to" href="{{ .link }}" target="_blank" rel="noopener">{{ .title | default .link }}</a></div>
|
||||
{{ end }}{{ end }}
|
||||
{{ with .Param "indieweb.like" }}{{ if .link }}
|
||||
<div>{{ T "meta_like_of" }}: <a class="u-like-of" href="{{ .link }}" target="_blank" rel="noopener">{{ .title | default .link }}</a></div>
|
||||
{{ end }}{{ end }}
|
||||
{{ with .Param "syndicate" }}
|
||||
<div>{{ T "also_on" }}:{{ $delimiter := "" }}{{ range $index, $link := . }}{{ $delimiter }} <a class="u-syndication" href="{{ $link }}" target="_blank" rel="nofollow noopener noreferrer">{{ (urls.Parse $link).Host }}</a>{{ $delimiter = "," }}{{ end }}</div>
|
||||
{{ end }}
|
||||
{{ if .IsTranslated }}
|
||||
<div>{{ i18n "translations" }}: {{ $delimiter := "" }}{{ range .Translations }}{{ $delimiter }}<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>{{ $delimiter = ", " }}{{ end }}</div>
|
||||
{{ end }}
|
||||
</div>
|
|
@ -0,0 +1,14 @@
|
|||
{{ if or (.GetTerms "tags") (.GetTerms "series") }}
|
||||
<p>
|
||||
{{ with (.GetTerms "series") }}
|
||||
{{ range sort . "Pages" "desc" }}
|
||||
<a class="p-category" href="{{ .RelPermalink }}" rel="tag">{{ .Title }}</a><sup>{{ len .Pages }}</sup>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with (.GetTerms "tags") }}
|
||||
{{ range sort . "Pages" "desc" }}
|
||||
<a class="p-category" href="{{ .RelPermalink }}" rel="tag">{{ .Title }}</a><sup>{{ len .Pages }}</sup>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</p>
|
||||
{{ end }}
|
|
@ -0,0 +1,11 @@
|
|||
{{ $related := .Site.RegularPages.Related . | first 5 }}
|
||||
{{ with $related }}
|
||||
<details class="fake-p">
|
||||
<summary><b>{{ T "related" }}</b></summary>
|
||||
<ul>
|
||||
{{ range . }}
|
||||
<li><a href="{{ .RelPermalink }}">{{ with .Title }}{{ . }}{{ else }}{{ .Summary | truncate 60 }}{{ end }}</a> <i>{{.Date.Format ( .Site.Params.dateformat | default "January 02, 2006")}}</i></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</details>
|
||||
{{ end }}
|
|
@ -0,0 +1,6 @@
|
|||
{{ $styles := resources.Get "css/style.scss" | toCSS | minify | fingerprint }}
|
||||
{{ if .Site.Params.inlinecss }}
|
||||
<style>{{ $styles.Content | safeCSS }}</style>
|
||||
{{ else }}
|
||||
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Integrity }}">
|
||||
{{ end }}
|
|
@ -0,0 +1,21 @@
|
|||
<div class="fake-p">
|
||||
{{ if not .Date.IsZero }}
|
||||
<div><time class="dt-published" datetime="{{.Date.Format "2006-01-02T15:04:05Z07:00"}}">{{.Date.Format ( .Site.Params.dateformat | default "January 02, 2006")}}</time>{{ if not (eq .FirstSection.RelPermalink .RelPermalink) }} in <a href="{{ .FirstSection.RelPermalink }}">{{ .FirstSection.Title }}</a>{{ end }}</div>
|
||||
{{ end }}
|
||||
{{ if ne .Date .Lastmod }}
|
||||
<div><time class="dt-updated" datetime="{{.Lastmod.Format "2006-01-02T15:04:05Z07:00"}}">{{ T "meta_lastmod" }}: {{.Lastmod.Format ( .Site.Params.dateformat | default "January 02, 2006")}}</time></div>
|
||||
{{ end }}
|
||||
{{ with .Param "indieweb.reply" }}
|
||||
{{ if .link }}
|
||||
<div>{{ T "meta_reply_to" }}: <a class="u-in-reply-to" href="{{ .link }}" target="_blank" rel="noopener">{{ .title | default .link }}</a></div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with .Param "indieweb.like" }}
|
||||
{{ if .link }}
|
||||
<div>{{ T "meta_like_of" }}: <a class="u-like-of" href="{{ .link }}" target="_blank" rel="noopener">{{ .title | default .link }}</a></div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if .IsTranslated }}
|
||||
<div>{{ i18n "translations" }}: {{ $delimiter := "" }}{{ range .Translations }}{{ $delimiter }}<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>{{ $delimiter = ", " }}{{ end }}</div>
|
||||
{{ end }}
|
||||
</div>
|
|
@ -0,0 +1,14 @@
|
|||
{{ define "main" }}
|
||||
<main class="h-feed">
|
||||
{{ with .Title }}<h1>{{ . }}</h1>{{ end }}
|
||||
{{ if not .Params.nometa }}{{ partial "list_meta" . }}{{ end }}
|
||||
{{ with .Content }}{{ . }}{{ end }}
|
||||
{{ $photoSections := (.Site.Param "photoSections" | default (slice "posts")) }}
|
||||
{{ $paginator := .Paginate ( where ( where .Site.RegularPages "Type" "in" $photoSections ) "Params.images" "!=" nil ) 5 }}
|
||||
{{ range $paginator.Pages }}
|
||||
{{ .Render "photosummary" }}
|
||||
{{ end }}
|
||||
{{ if (.Param "authorbox") }}{{ partialCached "authorbox" . }}{{ end }}
|
||||
</main>
|
||||
{{ partial "pagination" . }}
|
||||
{{ end }}
|
|
@ -0,0 +1,4 @@
|
|||
User-agent: *
|
||||
{{- range where .Site.RegularPages "Params.robotsdisallow" true }}
|
||||
Disallow: {{ .RelPermalink }}{{end}}
|
||||
Sitemap: {{ "sitemap.xml" | absLangURL }}
|
|
@ -0,0 +1,12 @@
|
|||
{{ define "main" }}
|
||||
<main>
|
||||
{{ with .Title }}<h1>{{ . }}</h1>{{ end }}
|
||||
{{ if not .Params.nometa }}{{ partial "list_meta" . }}{{ end }}
|
||||
<p>
|
||||
{{ range (.Paginate ( .Pages.ByTitle ) 1000).Pages }}
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a><sup>{{ len .Pages }}</sup>
|
||||
{{ end }}
|
||||
</p>
|
||||
</main>
|
||||
{{ partial "pagination" . }}
|
||||
{{ end }}
|
|
@ -0,0 +1,11 @@
|
|||
name = "Indiego"
|
||||
license = "Unlicense"
|
||||
licenselink = "https://git.jlel.se/jlelse/Indiego/raw/branch/master/LICENSE.md"
|
||||
description = "jlelse's personal Hugo theme"
|
||||
homepage = "https://git.jlel.se/jlelse/Indiego"
|
||||
tags = []
|
||||
features = []
|
||||
|
||||
[author]
|
||||
name = "Jan-Lukas Else"
|
||||
homepage = "https://jlelse.dev"
|
Reference in New Issue