Hello whiny.lol
This commit is contained in:
17
layouts/_partials/card.html
Normal file
17
layouts/_partials/card.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<article class="card">
|
||||
{{ with .Resources.GetMatch "cover.*" }}
|
||||
<img src="{{ .RelPermalink }}" alt="{{ $.Title }}" width="1350" height="700">
|
||||
{{ end }}
|
||||
|
||||
<div class="card-info">
|
||||
<h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
|
||||
|
||||
{{ if .Date }}
|
||||
<p>{{ if .Draft }}Draft • {{ end }}<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 2, 2006" }}</time></p>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.period }}
|
||||
<p>{{ . }}</p>
|
||||
{{ end }}
|
||||
</div>
|
||||
</article>
|
||||
46
layouts/_partials/dialog.html
Normal file
46
layouts/_partials/dialog.html
Normal file
@@ -0,0 +1,46 @@
|
||||
<dialog class="block" id="dialog" aria-labelledby="dialog-title">
|
||||
{{ with .Site.Params.version.changelog }}
|
||||
{{ with $.Site.GetPage . }}
|
||||
<h2 class="block-title" id="dialog-title">{{ .Title }}</h2>
|
||||
|
||||
<div class="block-content prose">
|
||||
{{ .Summary }}
|
||||
|
||||
<p><a href="{{ .RelPermalink }}">Read the full changelog</a></p>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<div class="block-content options">
|
||||
<ul class="row">
|
||||
<li>
|
||||
<button id="close" class="link badge">Close</button>
|
||||
</li>
|
||||
<li>
|
||||
<button id="hide" class="link badge">Hide until next update</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
<script>
|
||||
const dialog = document.getElementById('dialog');
|
||||
const hide = document.getElementById('hide');
|
||||
const close = document.getElementById('close');
|
||||
const currentVersion = "{{ .Site.Params.version.update }}";
|
||||
|
||||
if (localStorage.getItem('siteVersion') !== currentVersion) {
|
||||
dialog.showModal();
|
||||
}
|
||||
|
||||
function hideDialog() {
|
||||
dialog.close();
|
||||
localStorage.setItem('siteVersion', currentVersion);
|
||||
}
|
||||
|
||||
hide.addEventListener('click', hideDialog);
|
||||
|
||||
close.addEventListener('click', () => {
|
||||
dialog.close();
|
||||
});
|
||||
</script>
|
||||
18
layouts/_partials/footer.html
Executable file
18
layouts/_partials/footer.html
Executable file
@@ -0,0 +1,18 @@
|
||||
|
||||
<footer>
|
||||
<div class="footer-inner width-page">
|
||||
<div class="footer-text prose">
|
||||
{{ .Site.Copyright | $.Page.RenderString (dict "markup" "goldmark" "display" "block") }}
|
||||
|
||||
<p>Licensed under <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a>.</p>
|
||||
</div>
|
||||
|
||||
<ul class="row">
|
||||
{{ range site.Menus.footer }}
|
||||
<li>
|
||||
<a href="{{ .URL }}" {{ if strings.HasPrefix .URL "http" }}target="_blank"{{ end }}>{{ .Name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</footer>
|
||||
27
layouts/_partials/head.html
Executable file
27
layouts/_partials/head.html
Executable file
@@ -0,0 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ site.Language.LanguageCode }}" dir="{{ or site.Language.LanguageDirection `ltr` }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
{{ $title := print .Title " - " .Site.Title }}<title>{{ $title }}</title>
|
||||
{{ $bundle := slice (resources.Get "css/fonts.css") (resources.Get "css/styles.css") | resources.Concat "css/bundle.css" }}
|
||||
<link rel="stylesheet" href="{{ $bundle.RelPermalink }}" crossorigin="anonymous">
|
||||
{{ $js := resources.Get "js/menu.js" }}<script src="{{ $js.RelPermalink }}"></script>
|
||||
{{ if eq hugo.Environment "production" }}
|
||||
<script data-goatcounter="https://analytics.whiny.lol/count" async src="//analytics.whiny.lol/count.js"></script>
|
||||
{{ end }}
|
||||
<meta name="darkreader-lock"> <!-- Exclude site from Dark Reader browser extension -->
|
||||
{{ if or (eq hugo.Environment "staging") (eq hugo.Environment "development") }}
|
||||
<link rel="icon" href="/dev/favicon.ico" sizes="32x32">
|
||||
<link rel="icon" href="/dev/favicon.svg" type="image/svg+xml">
|
||||
<link rel="apple-touch-icon" href="/dev/apple-touch-icon.png">
|
||||
{{ else }}
|
||||
<link rel="icon" href="/favicon.ico" sizes="32x32">
|
||||
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
|
||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
||||
<meta name="description" content="{{ .Description | default .Site.Params.description }}">
|
||||
<meta name="author" content="{{ .Site.Params.author }}">
|
||||
{{ partial "opengraph.html" . }}
|
||||
{{ partial "twitter_cards.html" . }}
|
||||
{{ end }}
|
||||
</head>
|
||||
29
layouts/_partials/header.html
Executable file
29
layouts/_partials/header.html
Executable file
@@ -0,0 +1,29 @@
|
||||
<header>
|
||||
<nav class="main-navigation width-page">
|
||||
<a href="/" class="site-title">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2" viewBox="0 0 786 308"><path d="m111.817 133.627 22.731 112.124h60.824l28.261-162.81h-47.614l-12.288 110.28-23.039-110.28H82.634l-22.732 110.28-12.288-110.28H0l27.954 162.81h61.131zM282.306 0H233.77v245.751h48.536V136.084c3.686-5.836 13.209-15.359 28.568-15.359 16.589 0 21.504 11.059 21.504 22.732v102.294h48.228V135.47c0-29.49-13.516-56.523-50.379-56.523-21.81 0-37.477 7.987-47.921 19.66zM399.652 245.751h48.536V82.941h-48.536zm49.764-237.15h-50.993v51.301h50.993zM615.912 245.751V135.47c0-29.49-13.516-56.523-50.379-56.523-25.189 0-42.084 10.445-52.222 24.883l-3.686-20.889h-43.313l2.764 46.078v116.732h48.536V136.084c3.686-5.836 13.209-15.359 28.569-15.359 16.588 0 21.503 11.059 21.503 22.732v102.294zM701.618 186.77 670.899 82.941h-52.836L675.2 237.149l-26.111 70.039h57.751l20.889-70.039 57.444-154.208h-52.836z" style="fill:currentColor; fill-rule:nonzero"/></svg>
|
||||
</a>
|
||||
|
||||
<ul class="row">
|
||||
{{ range site.Menus.main }}
|
||||
<li>
|
||||
<a href="{{ .URL }}" {{ if strings.HasPrefix .URL "http" }}target="_blank"{{ end }}>{{ .Name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
<button id="menu-button" class="link" aria-label="Open mobile navigation" aria-expanded="false" aria-controls="mobile-navigation" onclick="mobileMenu()">Menu</button>
|
||||
</nav>
|
||||
|
||||
<nav id="mobile-navigation" class="mobile-navigation nav-closed">
|
||||
{{ with site.Menus.main }}
|
||||
<ul class="row vertical width-page">
|
||||
{{ range . }}
|
||||
<li>
|
||||
<a href="{{ .URL }}" {{ if strings.HasPrefix .URL "http" }}target="_blank"{{ end }}>{{ .Name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</nav>
|
||||
</header>
|
||||
38
layouts/_partials/pagination-controls.html
Normal file
38
layouts/_partials/pagination-controls.html
Normal file
@@ -0,0 +1,38 @@
|
||||
{{ $paginator := .Paginator }}
|
||||
{{ if gt $paginator.TotalPages 1 }}
|
||||
<nav class="pagination" role="navigation" aria-label="pagination">
|
||||
<ul class="row centered">
|
||||
{{ if $paginator.HasPrev }}
|
||||
<li>
|
||||
<a href="{{ $paginator.Prev.URL }}" class="link" aria-label="Go to previous page">
|
||||
Previous
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ range $paginator.Pagers }}
|
||||
{{ if eq . $paginator }}
|
||||
<li>
|
||||
<span class="link current-page" aria-label="Page {{ .PageNumber }}" aria-current="page">
|
||||
{{ .PageNumber }}
|
||||
</span>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li>
|
||||
<a href="{{ .URL }}" class="link" aria-label="Go to page {{ .PageNumber }}">
|
||||
{{ .PageNumber }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $paginator.HasNext }}
|
||||
<li>
|
||||
<a href="{{ $paginator.Next.URL }}" class="link" aria-label="Go to next page">
|
||||
Next
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user