Initial AD port

This commit is contained in:
2021-04-26 18:26:42 +01:00
parent 6911ce346b
commit 7e7773258a
408 changed files with 17799 additions and 172 deletions

View File

@@ -0,0 +1,55 @@
{{/*
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
This file is part of After Dark.
After Dark is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
After Dark is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/}}
{{ define "header" }}
{{ partial "masthead.html" . }}
{{ end }}
{{ define "main" }}
<header>
<h1>{{ .Title }}</h1>
{{ if .Description }}
<blockquote itemprop="description">{{ .Description }}</blockquote>
{{ end }}
</header>
<table>
<legend>Extras are companion software packages you may find valuable to augment your workflow. Unlike <a href="/module/">Modules</a> and <a href="/shortcode/">Shortcodes</a> extras are ancillary to your website.</legend>
<thead>
<tr>
<th scope="col">{{ .Title | singularize }}</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
<nav>
{{ range .Paginator.Pages }}
<tr>
<td><a href="{{ .RelPermalink }}">{{ .Title }}</a></td>
<td>{{ .Description }}</td>
</tr>
{{ end }}
</nav>
</tbody>
</table>
{{ end }}
{{ define "footer" }}
<p>{{ partial "pagination.html" . }}</p>
<small class="muted">
{{ partial "copyright-notice.html" . }}
</small>
{{ end }}

View File

@@ -0,0 +1,54 @@
{{/*
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
This file is part of After Dark.
After Dark is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
After Dark is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/}}
{{ define "title" -}}
{{ .Title }} | {{ .Site.Title }}
{{- end }}
{{ define "header" }}
{{ partial "masthead.html" . }}
{{ end }}
{{ define "main" }}
<header>
<h1>{{ .Title }}</h1>
{{ if .Description }}
<blockquote itemprop="description">{{ .Description }}</blockquote>
{{ end }}
</header>
{{ .Content }}
<footer>
<hr>
<p>
Published
{{ with .Params.categories }}
in <span itemprop="articleSection">{{ delimit (apply (apply (sort .) "partial" "category-link.html" ".") "chomp" ".") ", " " and " }}</span>
{{ end }}
{{ with .Params.features }}
using {{ delimit (apply (apply (sort .) "partial" "feature-link.html" ".") "chomp" ".") ", " " and " }}.
{{ else }}
using basic features.
{{ end }}
</p>
{{ partial "post/related-content.html" . }}
</footer>
{{ end }}
{{ define "footer" }}
<small class="muted">
{{ partial "copyright-notice.html" . }}
</small>
{{ end }}

View File

@@ -0,0 +1,97 @@
{{/*
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
This file is part of After Dark.
After Dark is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
After Dark is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/}}
{{ define "header" }}
{{ partial "masthead.html" . }}
{{ end }}
{{ define "main" }}
<header>
<h1>{{ .Title }}</h1>
{{ if .Description }}
<blockquote itemprop="description">{{ .Description }}</blockquote>
{{ end }}
</header>
{{ .Content }}
<style>
dl {
display: grid;
grid-template-columns: repeat(1, 1fr 2fr);
grid-gap: 1rem;
}
dt {
text-align: right;
}
dd {
margin-inline-start: unset;
margin-bottom: 2rem;
}
.hack article:first-of-type h2 {
margin-top: 30px;
}
.hack h2 {
position: sticky;
top: 20px;
padding: 5px;
background-color: #1976d215;
margin: -20px 0 30px;
}
.hack h2:before {
content: ">> ";
}
.hack h2:after {
content: " <<";
}
@media screen and (min-width: 30em) {
dl {
grid-template-columns: repeat(2, 1fr 2fr);
}
.hack h2 {
text-align: center;
}
}
</style>
{{ $scratch := newScratch }}
{{ range .Paginator.Pages }}
{{ $scratch.Add "categories" .Params.categories | first 1 }}
{{ end }}
{{ $categories := $scratch.Get "categories" | uniq }}
<nav class="alert alert-info">
<b>Category:</b>
{{ range $categories }}
<a href="#{{ . | anchorize }}">{{ . | title }}</a>
{{ end }}
</nav>
{{ range $categories }}
<article>
<h2 id="{{ . | anchorize }}">{{ . | title }}</h2>
<dl>
{{ range where $.Paginator.Pages "Params.categories" "intersect" (slice .) }}
<dt><a href="{{ .RelPermalink }}">{{ .Title }}</a>
<dd>{{ .Description }}
{{ end }}
</dl>
</article>
{{ end }}
{{ end }}
{{ define "footer" }}
<p>{{ partial "pagination.html" . }}</p>
<small class="muted">
{{ partial "copyright-notice.html" . }}
</small>
{{ end }}

View File

@@ -0,0 +1,54 @@
{{/*
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
This file is part of After Dark.
After Dark is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
After Dark is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/}}
{{ define "title" -}}
{{ .Title }} | {{ .Site.Title }}
{{- end }}
{{ define "header" }}
{{ partial "masthead.html" . }}
{{ end }}
{{ define "main" }}
<header>
<h1 itemprop="name">{{ .Title }}</h1>
{{ if .Description }}
<blockquote itemprop="description">{{ .Description }}</blockquote>
{{ end }}
</header>
{{ .Content }}
<footer>
<hr>
<p>
{{ .Section | title }}
{{ with .Params.categories }}
in {{ delimit (apply (apply (sort .) "partial" "feature/category-link.html" ".") "chomp" ".") ", " " and " }}
{{ end }}
{{ with .Params.features }}
using {{ delimit (apply (apply (sort .) "partial" "feature-link.html" ".") "chomp" ".") ", " " and " }}.
{{ else }}
using basic features.
{{ end }}
</p>
{{ partial "post/related-content.html" . }}
</footer>
{{ end }}
{{ define "footer" }}
<small class="muted">
{{ partial "copyright-notice.html" . }}
</small>
{{ end }}

View File

@@ -0,0 +1,119 @@
{{/*
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
This file is part of After Dark.
After Dark is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
After Dark is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/}}
{{ define "title" -}}
Hugo Dark Theme Site Generator | {{ .Params.title }}
{{- end }}
{{ define "header" }}
{{ partial "masthead.html" . }}
{{ end }}
{{ define "main" }}
{{ with resources.Get "css/conditional/layout/landing.css" | minify }}
<style>{{ .Content | safeCSS }}</style>
{{ end }}
<header>
<h1>{{ .Title }}<sup class="muted">v{{ .Site.Data.npm.latest.version }}</sup></h1>
<h2 class="muted">Hugo Dark Theme Site Generator</h2>
</header>
<section class="grid logo">
<a class="cell -12of12" rel="author" target="_self" href="https://habd.as/code/after-dark/">
<svg class="shaded animated" viewBox="0 0 46 45" width="92" height="90" xmlns="http://www.w3.org/2000/svg">
<title>After Dark</title>
<path d="M.708 45L23 .416 45.292 45H.708zM35 38L23 19 11 38h24z" fill="#000"/>
</svg>
</a>
</section>
<section class="grid tagline">
<div class="cell -12of12">
<p>{{ .Description }}</p>
</div>
</section>
<section class="install cta">
{{ .Content }}
</section>
<section class="hero">
{{ partial "components/figure.html" (dict "alt" "After Dark screenshots" "src" "/images/minimal-mac_2400x1800-fs8.png" "lqipsrc" "/images/minimal-mac_800x600-fs8.png") }}
</section>
{{ range .Params.spotlight }}
<section id="feature-{{ .name }}" class="{{ if eq .name "workflow" }}capabilities{{ else }}feature{{ end }}">
{{ with .icon }}
{{ (resources.Get (printf "svg/vendor/bytesize-icons/%s.svg" .)).Content | safeHTML }}
{{ end }}
<h2{{ if eq .beta true }} style="margin-bottom:0.2rem"{{ end }}>{{ .title | title }}</h2>
{{ if eq .beta true }}
<small><i style="color:lime">(Now in Beta!)</i></small>
{{ end }}
{{ if eq .name "workflow" }}
<table>
<caption>{{ .description | markdownify }}</caption>
<tr>
<th scope="col" width="25%">Features</th>
<th scope="col" width="25%">Modules</th>
<th scope="col" width="25%">Shortcodes</th>
<th scope="col" width="25%">Extras</th>
</tr>
<tr>
<td><a href="./feature/">40</a></td>
<td><a href="./module/">4</a></td>
<td><a href="./shortcode/">27+</a></td>
<td><a href="./extra/">2</a></td>
</tr>
</table>
{{ else }}
<p>{{ .description | markdownify }}</p>
<ul>{{ range .link }}
<li><a href="{{ .href }}"{{ with .target }} target="{{ . }}"{{ end }}{{ with .rel }} rel="{{ . }}"{{ end }}>{{ .text }}</a>
{{ end }}</ul>
{{ end }}
</section>
{{ end }}
<footer>
<section class="grid cta">
<a target="_self" class="cell -2of12" itemtype="significantLink" rel="prefetch noreferrer" href="https://t.me/afterdarkupdates">
<svg id="updates" aria-lebelledby="updates-label" class="i-bell" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
<path d="M8 17 C8 12 9 6 16 6 23 6 24 12 24 17 24 22 27 25 27 25 L5 25 C5 25 8 22 8 17 Z M20 25 C20 25 20 29 16 29 12 29 12 25 12 25 M16 3 L16 6" />
</svg>
<small role="tooltip" id="updates-label">Updates</small>
</a>
<a target="_self" class="cell -2of12" itemtype="significantLink" rel="prefetch" href="https://git.habd.as/comfusion/after-dark/">
<svg id="source" aria-labelledby="source-label" class="i-code" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
<path d="M10 9 L3 17 10 25 M22 9 L29 17 22 25 M18 7 L14 27" />
</svg>
<small role="tooltip" id="source-label">Source</small>
</a>
<a target="_blank" class="cell -2of12" itemtype="significantLink" rel="noopener noreferrer nofollow" href="irc://chat.freenode.net:6667/after-dark">
<svg id="chat" aria-labelledby="chat-label" class="i-message" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
<path d="M2 4 L30 4 30 22 16 22 8 29 8 22 2 22 Z" />
</svg>
<small role="tooltip" id="chat-label">Chat</small>
</a>
<a target="_self" class="cell -2of12" itemtype="significantLink" rel="prefetch" href="https://git.habd.as/comfusion/after-dark/releases">
<svg id="download" aria-labelledby="download-label" class="i-download" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
<path d="M9 22 C0 23 1 12 9 13 6 2 23 2 22 10 32 7 32 23 23 22 M11 26 L16 30 21 26 M16 16 L16 30" />
</svg>
<small role="tooltip" id="download-label">Download</small>
</a>
</section>
</footer>
{{ end }}
{{ define "footer" }}
<small class="muted">
{{ partial "copyright-notice.html" . }}
</small>
{{ end }}

View File

@@ -0,0 +1,60 @@
{{/*
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
This file is part of After Dark.
After Dark is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
After Dark is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/}}
{{ define "header" }}
{{ partial "masthead.html" . }}
{{ end }}
{{ define "main" }}
<header>
<h1>{{ .Title }}</h1>
{{ if .Description }}
<blockquote itemprop="description">{{ .Description }}</blockquote>
{{ end }}
</header>
<style>
.hack table th, .hack table td { vertical-align: middle; }
.hack table td img { margin-bottom: -7px; }
</style>
{{ .Content }}
<table>
<thead>
<tr>
<th scope="col">{{ .Title | singularize }}</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
<nav>
{{ $patinator := .Paginate (where .Pages ".Params.slug" "!=" nil) }}
{{ range $patinator.Pages }}
<tr>
<td><a href="{{ .RelPermalink }}">{{ .Title }}</a></td>
<td>{{ .Params.summary }}</td>
</tr>
{{ end }}
</nav>
</tbody>
</table>
{{ end }}
{{ define "footer" }}
<p>{{ partial "pagination.html" . }}</p>
<small class="muted">
{{ partial "copyright-notice.html" . }}
</small>
{{ end }}

View File

@@ -0,0 +1,64 @@
{{/*
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
This file is part of After Dark.
After Dark is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
After Dark is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/}}
{{ define "title" -}}
{{ .Title }} | {{ .Site.Title }}
{{- end }}
{{ define "header" }}
{{ partial "masthead.html" . }}
{{ end }}
{{ define "main" }}
<header>
<h1>{{ .Title }}</h1>
{{ if .Description }}
<blockquote itemprop="description">{{ .Description }}</blockquote>
{{ end }}
</header>
{{ .Content }}
<footer>
<hr>
<p>
Published
{{ with .Params.categories }}
in <span itemprop="articleSection">{{ delimit (apply (apply (sort .) "partial" "category-link.html" ".") "chomp" ".") ", " " and " }}</span>
{{ end }}
{{ with .Params.features }}
using {{ delimit (apply (apply (sort .) "partial" "feature-link.html" ".") "chomp" ".") ", " " and " }}.
{{ else }}
using basic features.
{{ end }}
</p>
{{ partial "post/related-content.html" . }}
</footer>
{{ end }}
{{ define "footer" }}
<hr>
<small class="muted">
{{ partial "copyright-notice.html" . }}
</small>
{{ if in .Page.RelPermalink "toxic-swamp" }}
{{ if eq .Params.slug "toxic-swamp" }}
{{ $config_generator := resources.Get "/js/config-generator.js" }}
<script src="{{ $config_generator.Permalink }}" integrity="{{ ($config_generator | resources.Fingerprint "sha512").Data.Integrity }}"></script>
{{ else if in .Page.RelPermalink "configuration" }}
{{ $configuration := resources.Get "/js/configuration.js" }}
<script src="{{ $configuration.Permalink }}" integrity="{{ ($configuration | resources.Fingerprint "sha512").Data.Integrity }}"></script>
{{ end }}
{{ end }}
{{ end }}

View File

@@ -0,0 +1,20 @@
{{/*
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
This file is part of After Dark.
After Dark is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
After Dark is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ -}}
<a href="{{ "/" | relURL }}categories/{{ . | urlize }}/">{{ . | title }}</a>

View File

@@ -0,0 +1,20 @@
{{/*
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
This file is part of After Dark.
After Dark is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
After Dark is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ -}}
<dd><code>{{ . -}}</code>

View File

@@ -0,0 +1,20 @@
{{/*
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
This file is part of After Dark.
After Dark is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
After Dark is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ -}}
<a href="{{ "/" | relURL }}feature/{{ . | urlize }}/">{{ . | title }}</a>

View File

@@ -0,0 +1,20 @@
{{/*
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
This file is part of After Dark.
After Dark is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
After Dark is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ -}}
<a href="{{ "/feature" | relURL }}/#{{ . | urlize }}">{{ . | title }}</a>

View File

@@ -0,0 +1,20 @@
{{/*
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
This file is part of After Dark.
After Dark is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
After Dark is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ -}}
<link rel="icon" sizes="128x128" href="/favicon.png">

View File

@@ -0,0 +1,49 @@
{{/*
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
This file is part of After Dark.
After Dark is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
After Dark is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ -}}
{{ $is_section_menu_enabled := ne .Site.Params.show_menu false }}
{{ range $name, $entries := .Site.Menus }}
{{ if or (ne $name "main") (and (eq $name "main") $is_section_menu_enabled) }}
{{ with $.Site.Params.layout.menu }}
{{ $settings := (index . $name) | default dict }}
{{ partial "components/navmenu.html" (dict "name" $name "entries" $entries "settings" $settings "page" $)}}
{{ else }}
{{ partial "components/navmenu.html" (dict "name" $name "entries" $entries "settings" dict "page" $)}}
{{ end }}
{{ end }}
{{ end }}
<nav itemscope itemtype="https://schema.org/SiteNavigationElement">
<meta itemprop="name" content="Translation Menu">
{{ if ne .Page .Site.Home }}
{{ if .IsTranslated }}
{{ range .Translations }}
<a itemprop="url" href="{{ .Permalink }}">
{{ .Language.LanguageName }}
<svg aria-hidden="true" class="i-flag" viewBox="0 0 32 32" width="14" height="14" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"><path d="M6 2 L6 30 M6 6 L26 6 20 12 26 18 6 18" /></svg>
</a>
{{ end }}
{{ else if .Site.IsMultiLingual }}
{{ $current_lang := .Page.Lang }}
{{ range where .Site.Home.AllTranslations "Lang" "!=" $current_lang }}
{{ .Language.LanguageName }}
<svg aria-hidden="true" class="i-flag" viewBox="0 0 32 32" width="14" height="14" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"><path d="M6 2 L6 30 M6 6 L26 6 20 12 26 18 6 18" /></svg>
{{ end }}
{{ end }}
{{ end }}
</nav>

View File

@@ -0,0 +1,20 @@
{{/*
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
This file is part of After Dark.
After Dark is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
After Dark is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ -}}
<a href="{{ "/" | relURL }}module/{{ . | urlize }}/">{{ . | title }}</a>

View File

@@ -0,0 +1,20 @@
{{/*
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
This file is part of After Dark.
After Dark is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
After Dark is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ -}}
<a href="{{ "/" | relURL }}shortcode/{{ . | urlize }}/">{{ . | title }}</a>

View File

@@ -0,0 +1,56 @@
{{/*
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
This file is part of After Dark.
After Dark is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
After Dark is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/}}
{{ define "header" }}
{{ partial "masthead.html" . }}
{{ end }}
{{ define "main" }}
<header>
<h1>{{ .Title }}</h1>
{{ if .Description }}
<blockquote itemprop="description">{{ .Description }}</blockquote>
{{ end }}
</header>
<table>
<caption>Add lazy-loaded images, alerts, blockquotes and design great-looking web forms directly from within your content. Dozens of examples provided below:</caption>
<thead>
<tr>
<th scope="col">{{ .Title | singularize }}</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
<nav>
{{ range .Paginator.Pages }}
<tr>
<td><a href="{{ .RelPermalink }}">{{ .Title }}</a></td>
<td>{{ .Description }}</td>
</tr>
{{ end }}
</nav>
</tbody>
</table>
<p>In addition to the above you may {{ partial "components/external.html" (dict "href" "https://gohugo.io/content-management/shortcodes/#use-hugo-s-built-in-shortcodes" "body" "Use Hugo's Built-in Shortcodes") }} as well.</p>
{{ end }}
{{ define "footer" }}
<p>{{ partial "pagination.html" . }}</p>
<small class="muted">
{{ partial "copyright-notice.html" . }}
</small>
{{ end }}

View File

@@ -0,0 +1,68 @@
{{/*
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
This file is part of After Dark.
After Dark is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
After Dark is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/}}
{{ define "title" -}}
{{ .Title }} | {{ .Site.Title }}
{{- end }}
{{ define "header" }}
{{ partial "masthead.html" . }}
{{ end }}
{{ define "main" }}
<header>
<h1>{{ .Title }}</h1>
{{ if .Description }}
<blockquote itemprop="description">{{ .Description }}</blockquote>
{{ end }}
</header>
<style>
dt, dd { display: inline; margin-left: 0; }
</style>
{{ with .Params.html_attributes }}
<div><dt><b>HTML attributes:</b> {{ delimit (apply (apply (sort .) "partial" "definition-data.html" ".") "chomp" ".") ", " }}</div>
{{ else }}
<div><dt><b>HTML attributes:</b> <dd>None available</div>
{{ end }}
</table>
{{ with .Params.custom_attributes }}
<div><dt><b>Custom attributes:</b> {{ delimit (apply (apply (sort .) "partial" "definition-data.html" ".") "chomp" ".") ", " }}</div>
{{ else }}
<div><dt><b>Custom attributes:</b> <dd>None available</div>
{{ end }}
{{ .Content }}
<footer>
<hr>
<p>
Published
{{ with .Params.categories }}
in <span itemprop="articleSection">{{ delimit (apply (apply (sort .) "partial" "category-link.html" ".") "chomp" ".") ", " " and " }}</span>
{{ end }}
{{ with .Params.snippets_used }}
using {{ delimit (apply (apply (sort .) "partial" "shortcode-link.html" ".") "chomp" ".") ", " " and " }} shortcodes.
{{ else }}
and used alone.
{{ end }}
</p>
{{ partial "post/related-content.html" . }}
</footer>
{{ end }}
{{ define "footer" }}
<small class="muted">
{{ partial "copyright-notice.html" . }}
</small>
{{ end }}

View File

@@ -0,0 +1,41 @@
{{/*
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
This file is part of After Dark.
After Dark is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
After Dark is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ -}}
<!-- {{/*
Named attributes: "type", "file"
Positional params: 0 {file}
With base64-encoded inline image in markdown:
![Theme screenshots](data:image/png;base64,{{< include type="image" file="themes/after-dark/images/docs/minimal-mac.png" >}})
Combined with highlight shortcode for syntax highlighting:
{{< highlight shell "linenos=inline" >}}
{{< include "themes/after-dark/bin/install" >}}
{{< /highlight >}}
*/}} -->
{{- $type := .Get "type" }}
{{- $file := .Get "file" }}
{{- if and .IsNamedParams }}
{{- if eq $type "image" }}{{ readFile $file | base64Encode }}{{ end -}}
{{- if eq $type "source" }}{{ readFile $file | safeHTML }}{{ end -}}
{{ else }}
{{- readFile (.Get 0) | safeHTML -}}
{{ end -}}