Move theme to project & remove styles

This commit is contained in:
Ondřej 2022-10-20 19:39:49 +02:00
parent 5e5af35481
commit a3d16e18c9
84 changed files with 1739 additions and 461 deletions

5
archetypes/micro.md Normal file
View file

@ -0,0 +1,5 @@
---
title: "{{ replace .TranslationBaseName "-" " " | humanize }}"
date: {{ .Date }}
---

61
assets/js/contact.js Normal file
View file

@ -0,0 +1,61 @@
/**
* @file
* A JavaScript file for the contact form.
*/
(function ($) {
'use strict';
// Contact form.
$('.contact-form').each(function (e) {
var $contact_form = $(e);
var $contact_button = $contact_form.find('.form-submit');
var contact_action = '/php/contact.php';
// Display the hidden form.
$contact_form.removeClass('hidden');
// Wait for a mouse to move, indicating they are human.
$('body').on('mousemove', function () {
// Unlock the form.
$contact_form.attr('action', contact_action);
$contact_button.first().removeAttribute('disabled');
});
// Wait for a touch move event, indicating that they are human.
$('body').on('touchmove', function () {
// Unlock the form.
$contact_form.attr('action', contact_action);
$contact_button.first().removeAttribute('disabled');
});
// A tab or enter key pressed can also indicate they are human.
$('body').on('keydown', function (e) {
if ((e.keyCode === 9) || (e.keyCode === 13)) {
// Unlock the form.
$contact_form.attr('action', contact_action);
$contact_button.first().removeAttribute('disabled');
}
});
// Mark the form as submitted.
$contact_button.on('click', function () {
$contact_form.addClass('js-submitted');
});
// Display messages.
if (location.search.substring(1) !== '') {
switch (location.search.substring(1)) {
case 'submitted':
$('.contact-submitted').removeClass('hidden');
break;
case 'error':
$('.contact-error').removeClass('hidden');
break;
}
}
});
})(u);

View file

@ -0,0 +1,31 @@
/* eslint-disable no-undef */
(function () {
'use strict';
const cookiebanner = document.querySelector('.cookieconsent');
const cookieconsent = localStorage.getItem('cookieconsent');
if (cookiebanner && !cookieconsent) {
cookiebanner.classList.remove('hidden');
cookiebanner.classList.add('js-cookieconsent-open');
}
const cookie_buttons = Array.prototype.slice.call(
document.querySelectorAll('button[data-consent]')
);
cookie_buttons.forEach(function (button) {
button.addEventListener('click', function () {
if (button.getAttribute('data-consent') === 'true') {
localStorage.setItem('cookieconsent', 'accept');
}
else {
localStorage.setItem('cookieconsent', 'decline');
}
cookiebanner.classList.remove('js-cookieconsent-open');
cookiebanner.classList.add('hidden');
});
});
})();

View file

@ -0,0 +1,61 @@
/**
* @file
* A JavaScript file for the contact form.
*/
(function ($) {
'use strict';
// Contact form.
$('.contact-form').each(function () {
var $contact_form = $(this);
var $contact_button = $contact_form.find('.form-submit');
var contact_action = '/php/contact.php';
// Display the hidden form.
$contact_form.removeClass('hidden');
// Wait for a mouse to move, indicating they are human.
$('body').mousemove(function () {
// Unlock the form.
$contact_form.attr('action', contact_action);
$contact_button.attr('disabled', false);
});
// Wait for a touch move event, indicating that they are human.
$('body').on('touchmove', function () {
// Unlock the form.
$contact_form.attr('action', contact_action);
$contact_button.attr('disabled', false);
});
// A tab or enter key pressed can also indicate they are human.
$('body').keydown(function (e) {
if ((e.keyCode === 9) || (e.keyCode === 13)) {
// Unlock the form.
$contact_form.attr('action', contact_action);
$contact_button.attr('disabled', false);
}
});
// Mark the form as submitted.
$contact_button.click(function () {
$contact_form.addClass('js-submitted');
});
// Display messages.
if (location.search.substring(1) !== '') {
switch (location.search.substring(1)) {
case 'submitted':
$('.contact-submitted').removeClass('hidden');
break;
case 'error':
$('.contact-error').removeClass('hidden');
break;
}
}
});
})(jQuery);

View file

@ -0,0 +1,27 @@
/**
* @file
* A JavaScript file for the mobile menu.
*/
(function ($) {
'use strict';
// Activate the mobil menu for small screens.
if (window.matchMedia && $('.mobile-nav').length) {
var mq = window.matchMedia('(max-width: 999px)');
if (mq.matches) {
// Toggle the mobile nav sheet.
$('.mobile-nav__cover, .mobile-nav__toggle').click(function (e) {
e.preventDefault();
$('body').scrollTop(0).toggleClass('js-nav-open');
});
// Close the nav sheet after click (needed for anchor links).
$('.mobile-nav__sheet').find('a').click(function () {
$('body').removeClass('js-nav-open');
});
}
}
})(jQuery);

View file

@ -0,0 +1,13 @@
/**
* @file
* A JavaScript file for the theme.
*/
(function ($) {
'use strict';
// Add a js class to the html-tag when JavsScript is active.
$('html').removeClass('nojs').addClass('js');
})(jQuery);

6
assets/js/lib/alpine.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,27 @@
/**!
* FlexSearch.js v0.7.2 (Compact)
* Copyright 2018-2021 Nextapps GmbH
* Author: Thomas Wilkerling
* Licence: Apache-2.0
* https://github.com/nextapps-de/flexsearch
*/
(function(self){'use strict';var t;function v(a){return"undefined"!==typeof a?a:!0}function w(a){const b=Array(a);for(let c=0;c<a;c++)b[c]=z();return b}function z(){return Object.create(null)}function aa(a,b){return b.length-a.length}function C(a){return"string"===typeof a}function D(a){return"object"===typeof a};function E(a,b){var c=ba;if(a&&(b&&(a=F(a,b)),this.H&&(a=F(a,this.H)),this.I&&1<a.length&&(a=F(a,this.I)),c||""===c)){a=a.split(c);if(this.filter){b=this.filter;c=a.length;const e=[];for(let d=0,f=0;d<c;d++){const g=a[d];g&&!b[g]&&(e[f++]=g)}a=e}return a}return a}const ba=/[\p{Z}\p{S}\p{P}\p{C}]+/u,ca=/[\u0300-\u036f]/g;
function H(a,b){const c=Object.keys(a),e=c.length,d=[];let f="",g=0;for(let h=0,k,m;h<e;h++)k=c[h],(m=a[k])?(d[g++]=I(b?"(?!\\b)"+k+"(\\b|_)":k),d[g++]=m):f+=(f?"|":"")+k;f&&(d[g++]=I(b?"(?!\\b)("+f+")(\\b|_)":"("+f+")"),d[g]="");return d}function F(a,b){for(let c=0,e=b.length;c<e&&(a=a.replace(b[c],b[c+1]),a);c+=2);return a}function I(a){return new RegExp(a,"g")}function J(a){let b="",c="";for(let e=0,d=a.length,f;e<d;e++)(f=a[e])!==c&&(b+=c=f);return b};var da={encode:K,B:!1,C:""};function K(a){return E.call(this,a.toLowerCase(),!1)};const ea={},L={};function fa(a){M(a,"add");M(a,"append");M(a,"search");M(a,"update");M(a,"remove")}function M(a,b){a[b+"Async"]=function(){const c=this,e=arguments;var d=e[e.length-1];let f;"function"===typeof d&&(f=d,delete e[e.length-1]);d=new Promise(function(g){setTimeout(function(){c.async=!0;const h=c[b].apply(c,e);c.async=!1;g(h)})});return f?(d.then(f),this):d}};function ha(a,b,c,e){const d=a.length;let f=[],g,h,k=0;e&&(e=[]);for(let m=d-1;0<=m;m--){const n=a[m],u=n.length,q=z();let r=!g;for(let l=0;l<u;l++){const p=n[l],y=p.length;if(y)for(let B=0,A,x;B<y;B++)if(x=p[B],g){if(g[x]){if(!m)if(c)c--;else if(f[k++]=x,k===b)return f;if(m||e)q[x]=1;r=!0}if(e&&(h[x]=(A=h[x])?++A:A=1,A<d)){const G=e[A-2]||(e[A-2]=[]);G[G.length]=x}}else q[x]=1}if(e)g||(h=q);else if(!r)return[];g=q}if(e)for(let m=e.length-1,n,u;0<=m;m--){n=e[m];u=n.length;for(let q=0,r;q<u;q++)if(r=
n[q],!g[r]){if(c)c--;else if(f[k++]=r,k===b)return f;g[r]=1}}return f}function ja(a,b){const c=z(),e=z(),d=[];for(let f=0;f<a.length;f++)c[a[f]]=1;for(let f=0,g;f<b.length;f++){g=b[f];for(let h=0,k;h<g.length;h++)k=g[h],c[k]&&!e[k]&&(e[k]=1,d[d.length]=k)}return d};const ka={memory:{charset:"latin:extra",A:3,m:4,D:!1},performance:{A:3,m:3,s:!1,context:{depth:2,A:1}},match:{charset:"latin:extra",C:"reverse"},score:{charset:"latin:advanced",A:20,m:3,context:{depth:3,A:9}},"default":{}};function O(a,b){if(!(this instanceof O))return new O(a);var c;let e;a?(C(a)?a=ka[a]:(c=a.preset)&&(a=Object.assign({},c[c],a)),c=a.charset,e=a.lang,C(c)&&(-1===c.indexOf(":")&&(c+=":default"),c=L[c]),C(e)&&(e=ea[e])):a={};let d,f,g=a.context||{};this.encode=a.encode||c&&c.encode||K;this.register=b||z();this.A=d=a.resolution||9;this.C=b=c&&c.C||a.tokenize||"strict";this.depth="strict"===b&&g.depth;this.l=v(g.bidirectional);this.s=f=v(a.optimize);this.D=v(a.fastupdate);this.m=a.minlength||1;this.G=
a.boost;this.h=f?w(d):z();this.F=d=g.resolution||1;this.o=f?w(d):z();this.B=c&&c.B||a.rtl;this.H=(b=a.matcher||e&&e.H)&&H(b,!1);this.I=(b=a.stemmer||e&&e.I)&&H(b,!0);if(a=b=a.filter||e&&e.filter){a=b;c=z();for(let h=0,k=a.length;h<k;h++)c[a[h]]=1;a=c}this.filter=a}t=O.prototype;t.append=function(a,b){return this.add(a,b,!0)};
t.add=function(a,b,c,e){if(b&&(a||0===a)){if(!e&&!c&&this.register[a])return this.update(a,b);b=this.encode(b);if(e=b.length){const m=z(),n=z(),u=this.depth,q=this.A;for(let r=0;r<e;r++){let l=b[this.B?e-1-r:r];var d=l.length;if(l&&d>=this.m&&(u||!n[l])){var f=P(q,e,r),g="";switch(this.C){case "full":if(3<d){for(f=0;f<d;f++)for(var h=d;h>f;h--)if(h-f>=this.m){var k=P(q,e,r,d,f);g=l.substring(f,h);Q(this,n,g,k,a,c)}break}case "reverse":if(2<d){for(h=d-1;0<h;h--)g=l[h]+g,g.length>=this.m&&Q(this,n,
g,P(q,e,r,d,h),a,c);g=""}case "forward":if(1<d){for(h=0;h<d;h++)g+=l[h],g.length>=this.m&&Q(this,n,g,f,a,c);break}default:if(this.G&&(f=Math.min(f/this.G(b,l,r)|0,q-1)),Q(this,n,l,f,a,c),u&&1<e&&r<e-1)for(d=z(),g=this.F,f=l,h=Math.min(u+1,e-r),d[f]=1,k=1;k<h;k++)if((l=b[this.B?e-1-r-k:r+k])&&l.length>=this.m&&!d[l]){d[l]=1;const p=this.l&&l>f;Q(this,m,p?f:l,P(g+(e/2>g?0:1),e,r,h-1,k-1),a,c,p?l:f)}}}}this.D||(this.register[a]=1)}}return this};
function P(a,b,c,e,d){return c&&1<a?b+(e||0)<=a?c+(d||0):(a-1)/(b+(e||0))*(c+(d||0))+1|0:0}function Q(a,b,c,e,d,f,g){let h=g?a.o:a.h;if(!b[c]||g&&!b[c][g])a.s&&(h=h[e]),g?(b=b[c]||(b[c]=z()),b[g]=1,h=h[g]||(h[g]=z())):b[c]=1,h=h[c]||(h[c]=[]),a.s||(h=h[e]||(h[e]=[])),f&&-1!==h.indexOf(d)||(h[h.length]=d,a.D&&(a=a.register[d]||(a.register[d]=[]),a[a.length]=h))}
t.search=function(a,b,c){c||(!b&&D(a)?(c=a,a=c.query):D(b)&&(c=b));let e=[],d;let f,g=0;if(c){b=c.limit;g=c.offset||0;var h=c.context;f=c.suggest}if(a&&(a=this.encode(a),d=a.length,1<d)){c=z();var k=[];for(let n=0,u=0,q;n<d;n++)if((q=a[n])&&q.length>=this.m&&!c[q])if(this.s||f||this.h[q])k[u++]=q,c[q]=1;else return e;a=k;d=a.length}if(!d)return e;b||(b=100);h=this.depth&&1<d&&!1!==h;c=0;let m;h?(m=a[0],c=1):1<d&&a.sort(aa);for(let n,u;c<d;c++){u=a[c];h?(n=la(this,e,f,b,g,2===d,u,m),f&&!1===n&&e.length||
(m=u)):n=la(this,e,f,b,g,1===d,u);if(n)return n;if(f&&c===d-1){k=e.length;if(!k){if(h){h=0;c=-1;continue}return e}if(1===k)return ma(e[0],b,g)}}return ha(e,b,g,f)};
function la(a,b,c,e,d,f,g,h){let k=[],m=h?a.o:a.h;a.s||(m=na(m,g,h,a.l));if(m){let n=0;const u=Math.min(m.length,h?a.F:a.A);for(let q=0,r=0,l,p;q<u;q++)if(l=m[q])if(a.s&&(l=na(l,g,h,a.l)),d&&l&&f&&(p=l.length,p<=d?(d-=p,l=null):(l=l.slice(d),d=0)),l&&(k[n++]=l,f&&(r+=l.length,r>=e)))break;if(n){if(f)return ma(k,e,0);b[b.length]=k;return}}return!c&&k}function ma(a,b,c){a=1===a.length?a[0]:[].concat.apply([],a);return c||a.length>b?a.slice(c,c+b):a}
function na(a,b,c,e){c?(e=e&&b>c,a=(a=a[e?b:c])&&a[e?c:b]):a=a[b];return a}t.contain=function(a){return!!this.register[a]};t.update=function(a,b){return this.remove(a).add(a,b)};t.remove=function(a,b){const c=this.register[a];if(c){if(this.D)for(let e=0,d;e<c.length;e++)d=c[e],d.splice(d.indexOf(a),1);else R(this.h,a,this.A,this.s),this.depth&&R(this.o,a,this.F,this.s);b||delete this.register[a]}return this};
function R(a,b,c,e,d){let f=0;if(a.constructor===Array)if(d)b=a.indexOf(b),-1!==b?1<a.length&&(a.splice(b,1),f++):f++;else{d=Math.min(a.length,c);for(let g=0,h;g<d;g++)if(h=a[g])f=R(h,b,c,e,d),e||f||delete a[g]}else for(let g in a)(f=R(a[g],b,c,e,d))||delete a[g];return f}fa(O.prototype);function T(a){if(!(this instanceof T))return new T(a);var b=a.document||a.doc||a,c;this.F=[];this.h=[];this.o=[];this.register=z();this.key=(c=b.key||b.id)&&U(c,this.o)||"id";this.D=v(a.fastupdate);this.l=(c=b.store)&&!0!==c&&[];this.store=c&&z();this.async=!1;c=z();let e=b.index||b.field||b;C(e)&&(e=[e]);for(let d=0,f,g;d<e.length;d++)f=e[d],C(f)||(g=f,f=f.field),g=D(g)?Object.assign({},a,g):a,this.G||(c[f]=new O(g,this.register)),this.F[d]=U(f,this.o),this.h[d]=f;if(this.l)for(a=b.store,C(a)&&(a=
[a]),b=0;b<a.length;b++)this.l[b]=U(a[b],this.o);this.index=c}function U(a,b){const c=a.split(":");let e=0;for(let d=0;d<c.length;d++)a=c[d],0<=a.indexOf("[]")&&(a=a.substring(0,a.length-2))&&(b[e]=!0),a&&(c[e++]=a);e<c.length&&(c.length=e);return 1<e?c:c[0]}function oa(a,b){if(C(b))a=a[b];else for(let c=0;a&&c<b.length;c++)a=a[b[c]];return a}
function V(a,b,c,e,d){a=a[d];if(e===c.length-1)b[d]=a;else if(a)if(a.constructor===Array)for(b=b[d]=Array(a.length),d=0;d<a.length;d++)V(a,b,c,e,d);else b=b[d]||(b[d]=z()),d=c[++e],V(a,b,c,e,d)}function W(a,b,c,e,d,f,g,h){if(a=a[g])if(e===b.length-1){if(a.constructor===Array){if(c[e]){for(b=0;b<a.length;b++)d.add(f,a[b],!0,!0);return}a=a.join(" ")}d.add(f,a,h,!0)}else if(a.constructor===Array)for(g=0;g<a.length;g++)W(a,b,c,e,d,f,g,h);else g=b[++e],W(a,b,c,e,d,f,g,h)}t=T.prototype;
t.add=function(a,b,c){D(a)&&(b=a,a=oa(b,this.key));if(b&&(a||0===a)){if(!c&&this.register[a])return this.update(a,b);for(let e=0,d,f;e<this.h.length;e++)f=this.h[e],d=this.F[e],C(d)&&(d=[d]),W(b,d,this.o,0,this.index[f],a,d[0],c);if(this.store&&(!c||!this.store[a])){let e;if(this.l){e=z();for(let d=0,f;d<this.l.length;d++)f=this.l[d],C(f)?e[f]=b[f]:V(b,e,f,0,f[0])}this.store[a]=e||b}}return this};t.append=function(a,b){return this.add(a,b,!0)};t.update=function(a,b){return this.remove(a).add(a,b)};
t.remove=function(a){D(a)&&(a=oa(a,this.key));if(this.register[a]){for(let b=0;b<this.h.length&&(this.index[this.h[b]].remove(a,!this.G),!this.D);b++);this.store&&delete this.store[a];delete this.register[a]}return this};
t.search=function(a,b,c,e){c||(!b&&D(a)?(c=a,a=c.query):D(b)&&(c=b,b=0));let d=[],f=[],g,h,k,m,n,u,q=0;if(c)if(c.constructor===Array)k=c,c=null;else{k=(g=c.pluck)||c.index||c.field;m=!1;h=this.store&&c.enrich;n="and"===c.bool;b=c.limit||100;u=c.offset||0;if(m&&(C(m)&&(m=[m]),!a)){for(let l=0,p;l<m.length;l++)if(p=pa.call(this,m[l],b,u,h))d[d.length]=p,q++;return q?d:[]}C(k)&&(k=[k])}k||(k=this.h);n=n&&(1<k.length||m&&1<m.length);const r=!e&&(this.G||this.async)&&[];for(let l=0,p,y,B;l<k.length;l++){let A;
y=k[l];C(y)||(A=y,y=y.field);if(r)r[l]=this.index[y].searchAsync(a,b,A||c);else{e?p=e[l]:p=this.index[y].search(a,b,A||c);B=p&&p.length;if(m&&B){const x=[];let G=0;n&&(x[0]=[p]);for(let S=0,ia,N;S<m.length;S++)if(ia=m[S],B=(N=this.J[ia])&&N.length)G++,x[x.length]=n?[N]:N;G&&(p=n?ha(x,b||100,u||0):ja(p,x),B=p.length)}if(B)f[q]=y,d[q++]=p;else if(n)return[]}}if(r){const l=this;return new Promise(function(p){Promise.all(r).then(function(y){p(l.search(a,b,c,y))})})}if(!q)return[];if(g&&(!h||!this.store))return d[0];
for(let l=0,p;l<f.length;l++){p=d[l];p.length&&h&&(p=qa.call(this,p));if(g)return p;d[l]={field:f[l],result:p}}return d};function pa(a,b,c,e){let d=this.J[a],f=d&&d.length-c;if(f&&0<f){if(f>b||c)d=d.slice(c,c+b);e&&(d=qa.call(this,d));return{tag:a,result:d}}}function qa(a){const b=Array(a.length);for(let c=0,e;c<a.length;c++)e=a[c],b[c]={id:e,doc:this.store[e]};return b}t.contain=function(a){return!!this.register[a]};t.get=function(a){return this.store[a]};t.set=function(a,b){this.store[a]=b;return this};
fa(T.prototype);var sa={encode:ra,B:!1,C:""};const ta=[I("[\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5]"),"a",I("[\u00e8\u00e9\u00ea\u00eb]"),"e",I("[\u00ec\u00ed\u00ee\u00ef]"),"i",I("[\u00f2\u00f3\u00f4\u00f5\u00f6\u0151]"),"o",I("[\u00f9\u00fa\u00fb\u00fc\u0171]"),"u",I("[\u00fd\u0177\u00ff]"),"y",I("\u00f1"),"n",I("[\u00e7c]"),"k",I("\u00df"),"s",I(" & ")," and "];function ra(a){var b=a;b.normalize&&(b=b.normalize("NFD").replace(ca,""));return E.call(this,b.toLowerCase(),!a.normalize&&ta)};var va={encode:ua,B:!1,C:"strict"};const wa=/[^a-z0-9]+/,xa={b:"p",v:"f",w:"f",z:"s",x:"s","\u00df":"s",d:"t",n:"m",c:"k",g:"k",j:"k",q:"k",i:"e",y:"e",u:"o"};function ua(a){a=ra.call(this,a).join(" ");const b=[];if(a){const c=a.split(wa),e=c.length;for(let d=0,f,g=0;d<e;d++)if((a=c[d])&&(!this.filter||!this.filter[a])){f=a[0];let h=xa[f]||f,k=h;for(let m=1;m<a.length;m++){f=a[m];const n=xa[f]||f;n&&n!==k&&(h+=n,k=n)}b[g++]=h}}return b};var za={encode:ya,B:!1,C:""};const Aa=[I("ae"),"a",I("oe"),"o",I("sh"),"s",I("th"),"t",I("ph"),"f",I("pf"),"f",I("(?![aeo])h(?![aeo])"),"",I("(?!^[aeo])h(?!^[aeo])"),""];function ya(a,b){a&&(a=ua.call(this,a).join(" "),2<a.length&&(a=F(a,Aa)),b||(1<a.length&&(a=J(a)),a&&(a=a.split(" "))));return a};var Ca={encode:Ba,B:!1,C:""};const Da=I("(?!\\b)[aeo]");function Ba(a){a&&(a=ya.call(this,a,!0),1<a.length&&(a=a.replace(Da,"")),1<a.length&&(a=J(a)),a&&(a=a.split(" ")));return a};L["latin:default"]=da;L["latin:simple"]=sa;L["latin:balance"]=va;L["latin:advanced"]=za;L["latin:extra"]=Ca;const X=self;let Y;const Z={Index:O,Document:T,Worker:null,registerCharset:function(a,b){L[a]=b},registerLanguage:function(a,b){ea[a]=b}};(Y=X.define)&&Y.amd?Y([],function(){return Z}):X.exports?X.exports=Z:X.FlexSearch=Z;}(this));

2
assets/js/lib/jquery.min.js vendored Normal file

File diff suppressed because one or more lines are too long

2
assets/js/lib/jquery.slim.min.js vendored Normal file

File diff suppressed because one or more lines are too long

3
assets/js/lib/js.cookie.min.js vendored Normal file
View file

@ -0,0 +1,3 @@
/*! js-cookie v2.2.1 | MIT */
!function(a){var b;if("function"==typeof define&&define.amd&&(define(a),b=!0),"object"==typeof exports&&(module.exports=a(),b=!0),!b){var c=window.Cookies,d=window.Cookies=a();d.noConflict=function(){return window.Cookies=c,d}}}(function(){function a(){for(var a=0,b={};a<arguments.length;a++){var c=arguments[a];for(var d in c)b[d]=c[d]}return b}function b(a){return a.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}function c(d){function e(){}function f(b,c,f){if("undefined"!=typeof document){f=a({path:"/"},e.defaults,f),"number"==typeof f.expires&&(f.expires=new Date(1*new Date+864e5*f.expires)),f.expires=f.expires?f.expires.toUTCString():"";try{var g=JSON.stringify(c);/^[\{\[]/.test(g)&&(c=g)}catch(j){}c=d.write?d.write(c,b):encodeURIComponent(c+"").replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),b=encodeURIComponent(b+"").replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var h="";for(var i in f)f[i]&&(h+="; "+i,!0!==f[i]&&(h+="="+f[i].split(";")[0]));return document.cookie=b+"="+c+h}}function g(a,c){if("undefined"!=typeof document){for(var e={},f=document.cookie?document.cookie.split("; "):[],g=0;g<f.length;g++){var h=f[g].split("="),i=h.slice(1).join("=");c||'"'!==i.charAt(0)||(i=i.slice(1,-1));try{var j=b(h[0]);if(i=(d.read||d)(i,j)||b(i),c)try{i=JSON.parse(i)}catch(k){}if(e[j]=i,a===j)break}catch(k){}}return a?e[a]:e}}return e.set=f,e.get=function(a){return g(a,!1)},e.getJSON=function(a){return g(a,!0)},e.remove=function(b,c){f(b,"",a(c,{expires:-1}))},e.defaults={},e.withConverter=c,e}return c(function(){})});

2
assets/js/lib/list.min.js vendored Normal file

File diff suppressed because one or more lines are too long

15
assets/js/lib/lozad.min.js vendored Normal file
View file

@ -0,0 +1,15 @@
/*! lozad.js - v1.16.0 - 2020-09-10
* https://github.com/ApoorvSaxena/lozad.js
* Copyright (c) 2020 Apoorv Saxena; Licensed MIT */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.lozad=e()}(this,function(){"use strict";
/**
* Detect IE browser
* @const {boolean}
* @private
*/var g="undefined"!=typeof document&&document.documentMode,v=function(t){return window&&window[t]},h=["data-iesrc","data-alt","data-src","data-srcset","data-background-image","data-toggle-class"],p={rootMargin:"0px",threshold:0,enableAutoReload:!1,load:function(t){if("picture"===t.nodeName.toLowerCase()){var e=t.querySelector("img"),r=!1;null===e&&(e=document.createElement("img"),r=!0),g&&t.getAttribute("data-iesrc")&&(e.src=t.getAttribute("data-iesrc")),t.getAttribute("data-alt")&&(e.alt=t.getAttribute("data-alt")),r&&t.append(e)}if("video"===t.nodeName.toLowerCase()&&!t.getAttribute("data-src")&&t.children){for(var a=t.children,o=void 0,i=0;i<=a.length-1;i++)(o=a[i].getAttribute("data-src"))&&(a[i].src=o);t.load()}t.getAttribute("data-poster")&&(t.poster=t.getAttribute("data-poster")),t.getAttribute("data-src")&&(t.src=t.getAttribute("data-src")),t.getAttribute("data-srcset")&&t.setAttribute("srcset",t.getAttribute("data-srcset"));var n=",";if(t.getAttribute("data-background-delimiter")&&(n=t.getAttribute("data-background-delimiter")),t.getAttribute("data-background-image"))t.style.backgroundImage="url('"+t.getAttribute("data-background-image").split(n).join("'),url('")+"')";else if(t.getAttribute("data-background-image-set")){var d=t.getAttribute("data-background-image-set").split(n),u=d[0].substr(0,d[0].indexOf(" "))||d[0];// Substring before ... 1x
u=-1===u.indexOf("url(")?"url("+u+")":u,1===d.length?t.style.backgroundImage=u:t.setAttribute("style",(t.getAttribute("style")||"")+"background-image: "+u+"; background-image: -webkit-image-set("+d+"); background-image: image-set("+d+")")}t.getAttribute("data-toggle-class")&&t.classList.toggle(t.getAttribute("data-toggle-class"))},loaded:function(){}};
/**
*
* @param {string} type
*
*/function k(t){t.setAttribute("data-loaded",!0)}var y=function(t){return"true"===t.getAttribute("data-loaded")},w=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:document;return t instanceof Element?[t]:t instanceof NodeList?t:e.querySelectorAll(t)};return function(){var r,a,e,o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:".lozad",t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=Object.assign({},p,t),n=i.root,d=i.rootMargin,u=i.threshold,g=i.enableAutoReload,s=i.load,c=i.loaded,l=void 0,b=void 0;v("IntersectionObserver")&&(l=new IntersectionObserver((r=s,a=c,function(t,e){t.forEach(function(t){(0<t.intersectionRatio||t.isIntersecting)&&(e.unobserve(t.target),y(t.target)||(r(t.target),k(t.target),a(t.target)))})}),{root:n,rootMargin:d,threshold:u})),v("MutationObserver")&&g&&(b=new MutationObserver((e=s,function(t){t.forEach(function(t){y(t.target)&&"attributes"===t.type&&-1<h.indexOf(t.attributeName)&&e(t.target)})})));for(var f,m=w(o,n),A=0;A<m.length;A++)(f=m[A]).getAttribute("data-placeholder-background")&&(f.style.background=f.getAttribute("data-placeholder-background"));return{observe:function(){for(var t=w(o,n),e=0;e<t.length;e++)y(t[e])||(l?(b&&g&&b.observe(t[e],{subtree:!0,attributes:!0,attributeFilter:h}),l.observe(t[e])):(s(t[e]),k(t[e]),c(t[e])))},triggerLoad:function(t){y(t)||(s(t),k(t),c(t))},observer:l,mutationObserver:b}}});

3
assets/js/lib/umbrella.min.js vendored Normal file

File diff suppressed because one or more lines are too long

10
assets/js/lozadinit.js Normal file
View file

@ -0,0 +1,10 @@
(function () {
'use strict';
// Lazy load images with lozad.js.
const observer = window.lozad();
observer.observe();
})();

21
assets/js/mobile.js Normal file
View file

@ -0,0 +1,21 @@
/**
* @file
* A JavaScript file for the mobile menu.
*/
(function ($) {
'use strict';
// Toggle the mobile nav sheet.
$('.mobile-nav__cover, .mobile-nav__toggle').handle('click', function () {
$('body').scroll().toggleClass('js-nav-open');
});
// Close the nav sheet after click (needed for anchor links).
$('.mobile-nav__sheet').find('a').on('click', function () {
$('body').removeClass('js-nav-open');
});
})(u);

13
assets/js/script-early.js Normal file
View file

@ -0,0 +1,13 @@
/**
* @file
* A JavaScript file for the theme. Runs first, before jQuery etc. have loaded.
*/
(function () {
'use strict';
// Add a js class to the html-tag when JavsScript is active.
document.querySelector('html').classList.replace('nojs', 'js');
})();

12
assets/js/script.js Normal file
View file

@ -0,0 +1,12 @@
/**
* @file
* A JavaScript file for the theme.
*/
(function () {
'use strict';
// Place your code here.
})();

90
assets/js/search.js Normal file
View file

@ -0,0 +1,90 @@
/* eslint-disable no-undef, guard-for-in */
/**
* @file
* A JavaScript file for flexsearch.
*/
import * as params from '@params';
(function () {
'use strict';
const index = new FlexSearch.Document({
document: {
id: 'id',
index: ['title','tags','content','date'],
store: ['title','summary','date','permalink']
},
tokenize: 'forward'
});
function showResults(items) {
const template = document.querySelector('template').content;
const fragment = document.createDocumentFragment();
const results = document.querySelector('.search-results');
results.textContent = '';
for (const id in items) {
const item = items[id];
const result = template.cloneNode(true);
const a = result.querySelector('a');
const time = result.querySelector('time');
const content = result.querySelector('.content');
a.innerHTML = item.title;
a.href = item.permalink;
time.innerText = item.date;
content.innerHTML = item.summary;
fragment.appendChild(result);
}
results.appendChild(fragment);
}
function doSearch() {
const query = document.querySelector('.search-text').value.trim();
const results = index.search({
query: query,
enrich: true,
limit: params.searchLimit
});
const items = {};
results.forEach(function (result) {
result.result.forEach(function (r) {
items[r.id] = r.doc;
});
});
showResults(items);
}
function enableUI() {
const searchform = document.querySelector('.search-form');
searchform.addEventListener('submit', function (e) {
e.preventDefault();
doSearch();
});
searchform.addEventListener('input', function () {
doSearch();
});
document.querySelector('.search-loading').classList.add('hidden');
document.querySelector('.search-input').classList.remove('hidden');
document.querySelector('.search-text').focus();
}
function buildIndex() {
document.querySelector('.search-loading').classList.remove('hidden');
fetch('/searchindex.json')
.then(function (response) {
return response.json();
})
.then(function (data) {
data.forEach(function (item) {
index.add(item);
});
});
}
buildIndex();
enableUI();
})();

33
assets/js/tracking.js Normal file
View file

@ -0,0 +1,33 @@
/* eslint-disable no-undef */
/**
* @file
* A JavaScript file for analytic tracking.
*/
import * as params from '@params';
const cookiebanner = params.cookieConsent;
const cookieconsent = localStorage.getItem('cookieconsent');
const idSite = params.piwikSiteID;
const matomoTrackingApiUrl = 'https://' + params.piwikTrackerUrl + '/matomo.php';
const googleAnalytics = params.GoogleAnalytics;
if (idSite) {
let _paq = window._paq = window._paq || [];
if (cookiebanner) {
_paq.push(['requireConsent']);
}
_paq.push(['setTrackerUrl', matomoTrackingApiUrl]);
_paq.push(['setSiteId', idSite]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
if (cookiebanner && cookieconsent === 'accept') {
_paq.push(['setConsentGiven']);
}
}
if (googleAnalytics && cookiebanner && cookieconsent === 'decline') {
window['ga-disable-' + googleAnalytics] = true;
}

View file

@ -1,147 +0,0 @@
// stylelint-disable value-keyword-case, scss/dollar-variable-colon-space-after, max-line-length
// Variables
// Set variables for this site before a library sets its !default value.
// Font faces, stacks and sizes.
// Font styling and line heights are controlled by the several variables that
// used by mixins like `type-layout()`, `margin-top()`, and `margin-bottom()`.
// These variable and mixins are documented on the [Typey
// homepage](https://github.com/jptaranto/typey).
// The font size set on the root html element.
$base-font-size: 18px;
// The base line height determines the basic unit of vertical rhythm.
$base-line-height: $base-font-size * 1.5;
// The font sizes in our type hierarchy as tee shirt sizes.
$font-size: (
xxl: 36px,
xl: 28px,
l: 22px,
m: $base-font-size,
s: 16px,
xs: 14px,
);
// Typey allows you to alter font weights site-wide with this map.
$font-weight: (
bold: bold,
medium: 500,
normal: normal,
light: 300,
lighter: lighter,
);
// The following font family declarations use widely available fonts.
// A user's web browser will look at the comma-separated list and will
// attempt to use each font in turn until it finds one that is available
// on the user's computer. The final "generic" font (sans-serif, serif or
// monospace) hints at what type of font to use if the web browser doesn't
// find any of the fonts in the list.
// Serif font stacks.
$times-new-roman: 'Times New Roman', Times, Georgia, 'DejaVu Serif', serif;
$times: Times, 'Times New Roman', Georgia, 'DejaVu Serif', serif;
$georgia: Georgia, 'Times New Roman', 'DejaVu Serif', serif;
$garamond: 'Garamond Premier Pro', Garamond, Charter, 'Times New Roman', serif;
// Sans-serif font stacks.
$verdana: Verdana, Tahoma, 'DejaVu Sans', sans-serif;
$tahoma: Tahoma, Verdana, 'DejaVu Sans', sans-serif;
$helvetica: Helvetica, Arial, 'Nimbus Sans L', sans-serif;
$arial: Arial, Helvetica, 'Nimbus Sans L', sans-serif;
$impact: Impact, 'Arial Narrow', Helvetica, sans-serif;
$lucida: 'Lucida Grande', 'Lucida Sans Unicode', Lucida, Verdana, sans-serif;
$futura: Futura, 'Century Gothic', AppleGothic, sans-serif;
// System-ui font stack.
$system-ui: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
// Monospace font stacks.
// For an explanation of why "sans-serif" is at the end of this list, see
// http://meyerweb.com/eric/thoughts/2010/02/12/fixed-monospace-sizing/
// $menlo: Menlo, 'DejaVu Sans Mono', 'Ubuntu Mono', Courier, 'Courier New', monospace, sans-serif;
$menlo: Menlo, 'Ubuntu Mono', 'DejaVu Sans Mono', 'Courier New', Courier, monospace, sans-serif;
// The font faces you specify in the $typefaces map can be used in the
// typeface() mixin.
$tf: BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; ;
$typefaces: (
body: (
font-family: $tf,
),
headings: (
font-family: $tf,
),
monospace: (
font-family: $menlo,
),
compact: (
font-family: $tf,
weight: bold,
case: uppercase,
// We could also specify the following property:
// letter-spacing: .5px,
),
); // stylelint-disable indentation
// Output a horizontal grid to help with debugging typography.
$typey-debug: false;
$with-wireframes: false;
// The length unit in which to output font size and margin values.
// Supported values: px, em, rem.
$base-unit: 'rem';
// px fallbacks for rem units are needed for IE 8 and earlier.
$rem-fallback: false;
// We have separate print file.
$auto-print-sizing: false;
// Breakpoints
// Use the `respond-to()` mixin to use named breakpoints.
$breakpoints: (
'xxxs': 333px,
'xxs': 444px,
'xs': 555px,
's': 666px,
'm': 777px,
'l': 888px,
'xl': 999px,
'xxl': 1111px,
'xxxl': 1222px
) !default;
// Layout
// The max content width.
$max-content-width: 1000px;
// The max line width for readability.
$max-line-width: 70ch;
// The default left/right gutter/padding.
$zen-gutters: calc(5px + 1.5625vw);
$zen-gutters-reverse: calc(0px - (5px + 1.5625vw));
// Border radius.
$s-radius: 3px;
$m-radius: .3rem;
$l-radius: 1rem;
// Miscellaneous variables
// `$indent-amount` controls the amount lists, blockquotes and comments are indented.
$indent-amount: 2 * $base-font-size;
// `$include-rtl` controls whether RTL styles are output.
$include-rtl: false;

View file

@ -1,51 +0,0 @@
// Links
//
// Hyperlinks are used to allow the user to navigate to other resources or to
// download a resource.
//
// The order of link states are based on Eric Meyer's article:
// http://meyerweb.com/eric/thoughts/2007/06/11/who-ordered-the-link-states
//
// :visited - A link that has already been visited.
// :hover - A link that is being hovered over.
// :focus - A link that has been given keyboard focus.
// :active - A link that is being actively clicked.
a,
%link {
color: $link;
// sass-lint:disable no-vendor-prefixes
// Remove gaps in links underline in iOS 8+ and Safari 8+.
-webkit-text-decoration-skip: objects;
overflow-wrap: break-word;
word-wrap: break-word;
-ms-word-break: break-all;
/* This is the dangerous one in WebKit, as it breaks things wherever */
word-break: break-all;
/* Instead use this non-standard one: */
word-break: break-word;
/* Adds a hyphen where the word breaks, if supported (No Blink) */
-ms-hyphens: auto;
-moz-hyphens: auto;
-webkit-hyphens: auto;
hyphens: auto;
}
// Any element can receive focus, but only links can be visited, so we can
// safely lower this selector's specificity. This also ensures visited links
// with additional styles won't have their styles overridden.
:visited {
color: $link-visited;
}
a:hover,
a:focus {
color: $link-hover;
}
a:active {
color: $link-active;
}

0
assets/sass/mobile.scss Normal file
View file

0
assets/sass/print.scss Normal file
View file

0
assets/sass/styles.scss Normal file
View file

View file

@ -1,6 +1,5 @@
baseurl: "https://nolog.cz/"
title: "NoLog.cz"
theme: "zen"
language: "cz-cs"

107
i18n/en.toml Normal file
View file

@ -0,0 +1,107 @@
[menu_title]
other = "Main menu"
[menu_home]
other = "Home"
[menu_mobile]
other = "Menu"
[pager_next]
other = "Next"
[pager_prev]
other = "Prev"
[taxo_tags]
other = "Tags"
[last_mod]
other = "Updated:"
[created]
other = "Created:"
[search_placeholder]
other = "Enter the terms you wish to search for."
[search_title]
other = "Search"
[search_loading]
other = "Loading search index…"
[string_at]
other = "at"
[string_by]
other = "by"
[string_follow]
other = "follow"
[string_in]
other = "in"
[string_on]
other = "on"
[string_recent_content]
other = "Recent content"
[string_see_also]
other = "See also"
[js_required]
other = "You must have Javascript enabled to use this function."
[contact_submitted]
other = "Your message was sent."
[contact_error]
other = "There was an error sending the message."
[contact_name]
other = "Name"
[contact_name_placeholder]
other = "Your name"
[contact_mail]
other = "E-mail address"
[contact_mail_placeholder]
other = "Your e-mail address"
[contact_subject]
other = "Subject"
[contact_subject_placeholder]
other = "A short subject"
[contact_message]
other = "Message"
[contact_message_placeholder]
other = "The messages goes here…"
[contact_submit]
other = "Send message"
[contact_honeypot]
other = "Skip if you are a human"
[lang_select_title]
other = "Language selector"
[cookieconsent_message]
other = "This website uses cookies. Some are necessary for the website to function. Tracking and analytics cookies are optional."
[cookieconsent_accept]
other = "Accept all"
[cookieconsent_decline]
other = "Only necessary"
[privacy_policy]
other = "Privacy policy"

0
layouts/404.html Normal file
View file

View file

@ -0,0 +1,7 @@
<h{{ .Level }} id="{{ .Anchor | safeURL }}" class="anchor-header">{{ .Text | safeHTML }} <a class="anchor-link" href="#{{ .Anchor | safeURL }}" aria-label="{{ .Text | safeHTML }}">
<svg xmlns="http://www.w3.org/2000/svg" class="anchor-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
<path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" />
<path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" />
</svg>
</a></h{{ .Level }}>

View file

@ -0,0 +1 @@
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener noreferrer"{{ end }}>{{ .Text | safeHTML }}</a>

View file

@ -0,0 +1,45 @@
<!DOCTYPE html>
<html class="nojs" lang="{{ site.LanguageCode | default site.Language.Lang }}" dir="{{ site.Language.LanguageDirection | default "ltr" }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>{{ block "title" . }}{{ .Title }} {{ site.Title }}{{ end }}</title>
{{ partial "meta.html" . }}
{{ partialCached "styles.html" . }}
{{- block "head" . }}{{ end }}
{{ partial "meta_json_ld.html" . }}
{{ partial "scripts.html" . }}
{{ partialCached "tracking.html" . }}
</head>
<body class="{{ if .IsPage }}single-page{{ else }}list-page{{ end }}{{ if .IsHome }} front{{ end }}{{ with $.Param "bodyclass" }} {{ . }}{{ end }}">
<div class="page layout__page{{ if $.Param "sidebar" }} layout__sidebar-second{{ end }}">
<header class="header layout__header">
{{ if $.Param "logo" | default true }}<a href="{{ "/" | relLangURL }}" title="Home" rel="home" class="header__logo"><img src="{{ with $.Param "logopath" }}{{ . | relURL }}{{ else }}{{ "/images/logo.png" | relURL }}{{ end }}"{{ with $.Param "logowidth" }} width="{{ . }}"{{ end }} alt="Home" class="header__logo-image"></a>{{ end }}
<h1 class="header__site-name">
<a href="{{ "/" | relLangURL }}" title="Home" class="header__site-link" rel="home"><span>{{ site.Title }}</span></a>
</h1>
<div class="region header__region">
{{ if site.IsMultiLingual }}{{ partial "language-selector.html" . }}{{ end -}}
{{ if $.Param "menuinheader" }}{{ partial "menu.html" . }}{{ end -}}
</div>
</header>
{{ if not ($.Param "menuinheader") }}{{ partial "menu.html" . }}{{ end -}}
{{ block "main" . }}{{ end }}
{{ if $.Param "sidebar" }}{{ partial "sidebar.html" . }}{{ end -}}
<footer class="footer layout__footer">
{{ if $.Param "feedlinks" }}{{ partial "feedlinks.html" . }}{{ end -}}
<p>{{ with $.Param "copyright" }}{{ . | markdownify }}{{ else }}<span>© {{ site.Title }}</span>{{ end }}</p>
{{ with $.Param "footer" }}<p>{{ . | markdownify }}</p>{{ end }}
{{ if $.Param "poweredby" }}<p>Powered by <a href="https://gohugo.io/">Hugo</a> and the <a href="https://github.com/frjo/hugo-theme-zen">Zen theme</a>.</p>{{ end }}
</footer>
{{ if $.Param "cookieconsent" }}{{ partial "cookieconsent.html" . }}{{ end -}}
</div>
{{ if $.Param "mobilemenu" }}{{ partial "mobilemenu.html" . }}{{ end -}}
</body>
</html>

View file

@ -0,0 +1,9 @@
<article class="full-view{{ with .Section }} full-view--{{ . | urlize }}{{ end }}">
<header>
<h1 class="title {{ if $.Param "submitted" | default false }}title-submitted{{ end }}"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h1>
{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . }}{{ end -}}
</header>
<div class="content">
{{ .Content }}
</div>
</article>

1
layouts/_default/li.html Normal file
View file

@ -0,0 +1 @@
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a> <time class="created-date" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format ($.Param "dateformat" | default "2 January, 2006") }}</time></li>

View file

@ -0,0 +1,18 @@
{{ define "main" -}}
<main class="main layout__main">
<h1 class="title">{{ .Title }}</h1>
{{ with .Content }}
<div class="content">
{{ . }}
</div>
{{ end }}
{{ $paginator := .Paginate (.Pages) -}}
{{ range $paginator.Pages -}}
{{ .Render "summary"}}
{{ end -}}
{{ partial "pagination.html" . }}
</main>
{{ end }}

View file

@ -0,0 +1,54 @@
{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := $pctx.RegularPages -}}
{{- $limit := site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}
{{- end -}}
{{ $length := (len $pages) -}}
{
"version": "https://jsonfeed.org/version/1.1",
"title": "{{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{ . }} {{ i18n "string_on" }} {{ end }}{{ site.Title }}{{ end }}",
"description": "{{ i18n "string_recent_content" }} {{ if ne .Title site.Title }}{{ with .Title }}{{ i18n "string_in" }} {{ . }} {{ end }}{{ end }}{{ i18n "string_on" }} {{ site.Title }}",
"home_page_url": "{{ site.BaseURL }}",
{{ with .OutputFormats.Get "JSON" -}}
"feed_url": "{{ .Permalink }}",
{{ end -}}
{{ with site.LanguageCode -}}
"language": "{{ . }}",
{{ end -}}
{{ with $.Param "icon" -}}
"icon": "{{ . | absURL }}",
{{ end -}}
{{ with $.Param "favicon" -}}
"favicon": "{{ . | absURL }}",
{{ end -}}
{{ with site.Author.name -}}
"authors": [
{
"name": "{{ . }}"{{ with site.Author.url }},
"url": "{{ . }}"{{ end }}{{ with site.Author.avatar }},
"avatar": "{{ . | absURL }}"{{ end }}
}
],
{{ end -}}
"items": [
{{ range $index, $element := $pages -}}
{
"title": {{ .Title | jsonify }},
"date_published": "{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}",
"date_modified": "{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}",
"id": "{{ .Permalink }}",
"url": "{{ .Permalink }}",
{{ with .Params.author -}}
"authors": [
{
"name": "{{ . }}"
}
],
{{ end -}}
"content_html": {{ .Content | jsonify }}
}{{ if ne (add $index 1) $length }},{{ end }}
{{ end -}}
]
}

46
layouts/_default/rss.xml Normal file
View file

@ -0,0 +1,46 @@
{{- $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 "<?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 }}{{ . }} {{ i18n "string_on" }} {{ end }}{{ site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>{{ i18n "string_recent_content" }} {{ if ne .Title site.Title }}{{ with .Title }}{{ i18n "string_in" }} {{ . }} {{ end }}{{ end }}{{ i18n "string_on" }} {{ site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>
{{ with site.LanguageCode -}}
<language>{{ . }}</language>
{{ end -}}
{{ with site.Author.email -}}
<managingEditor>{{ . }}{{ with site.Author.name }} ({{ . }}){{end}}</managingEditor>
{{ end -}}
{{ with site.Author.email -}}
<webMaster>{{ . }}{{ with site.Author.name }} ({{ . }}){{end}}</webMaster>
{{ 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>
{{ with site.Author.email -}}
<author>{{ . }}{{ with site.Author.name }} ({{ . }}){{end}}</author>
{{ end -}}
<guid>{{ .Permalink }}</guid>
<description>{{ .Content | html }}</description>
</item>
{{ end }}
</channel>
</rss>

View file

@ -0,0 +1,20 @@
{{ define "main" -}}
<main class="main layout__main">
<article class="single-view{{ with .Section }} single-view--{{ . | urlize }}{{ end }}">
<header>
<h1 class="title {{ if $.Param "submitted" | default false }}title-submitted{{ end }}">{{ .Title }}</h1>
{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . }}{{ end -}}
{{ if .Params.tags }}{{ partial "tags.html" . }}{{ end -}}
</header>
<div class="content">
{{ .Content }}
</div>
<div class="content content--bottom">
{{ if $.Param "relatedposts" | default false }}{{ partial "related.html" . }}{{ end -}}
{{ if ne .Lastmod .Date }}{{ partial "dates.html" . }}{{ end -}}
</div>
</article>
</main>
{{ end }}

View file

@ -0,0 +1,9 @@
<article class="list-view{{ with .Section }} list-view--{{ . | urlize }}{{ end }}">
<header>
<h2 class="title {{ if $.Param "submitted" | default false }}title-submitted{{ end }}"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . -}}{{ end }}
</header>
<div class="content">
{{ .Summary }}
</div>
</article>

View file

@ -0,0 +1,5 @@
{{- $.Scratch.Add "searchindex" slice -}}
{{- range $index, $element := where site.RegularPages "Params.exclude_search" nil -}}
{{- $.Scratch.Add "searchindex" (dict "id" $index "title" $element.Title "permalink" $element.RelPermalink "tags" (delimit ($element.Params.tags | default "") " ") "content" $element.Plain "summary" $element.Summary "date" ($element.Date.Format ($.Param "dateformat" | default "2 January, 2006"))) -}}
{{- end -}}
{{- $.Scratch.Get "searchindex" | jsonify -}}

19
layouts/index.html Normal file
View file

@ -0,0 +1,19 @@
{{ define "title" }}{{ site.Title }}{{ end }}
{{ define "main" -}}
<main class="main layout__main">
<article class="single-view{{ with .Section }} single-view--{{ . | urlize }}{{ end }}">
<div class="content">
{{ .Content }}
</div>
</article>
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
{{ $paginator := .Paginate $pages -}}
{{ range $paginator.Pages -}}
{{ .Render "summary"}}
{{ end -}}
{{ partial "pagination.html" . }}
</main>
{{ end }}

19
layouts/micro/list.html Normal file
View file

@ -0,0 +1,19 @@
{{ define "main" -}}
<main class="main layout__main">
<h1 class="title">Micro posts</h1>
<p class="micro__follow"><a href="https://micro.blog/{{ with $.Param "microusername" }}{{ . }}{{ end }}">{{ i18n "string_follow" }} @{{ with $.Param "microusername" }}{{ . }}{{ end }}</a></p>
{{ with .Content }}
<div class="content">
{{ . }}
</div>
{{ end }}
{{ $paginator := .Paginate (.Pages) -}}
{{ range $paginator.Pages -}}
{{ .Render "summary"}}
{{ end -}}
{{ partial "pagination.html" . }}
</main>
{{ end }}

View file

@ -0,0 +1,35 @@
{{ $list := .Pages -}}
{{ $length := (len $list) -}}
{
"version" : "https://jsonfeed.org/version/1",
"title" : "Micro posts {{ i18n "string_on" }} {{ site.Title }}",
"description": "Micro blog {{ i18n "string_by" }} {{ with site.Author.name }}{{ . }}{{end}}, {{ i18n "string_follow" }} @{{ with $.Param "microusername" }}{{ . }}{{ end }} {{ i18n "string_at" }} https://micro.blog/{{ with $.Param "microusername" }}{{ . }}{{ end }}",
"home_page_url" : "{{ site.BaseURL }}",
{{ with .OutputFormats.Get "JSON" -}}
"feed_url" : "{{ .Permalink }}",
{{ end -}}
{{ with $.Param "icon" -}}
"icon" : "{{ . | absURL }}",
{{ end -}}
{{ with $.Param "favicon" -}}
"favicon" : "{{ . | absURL }}",
{{ end -}}
{{ with site.Author.name -}}
"author" : {
"name" : "{{ . }}"{{ with site.Author.url }},
"url": "{{ . }}"{{ end }}{{ with site.Author.avatar }},
"avatar": "{{ . | absURL }}"{{ end }}
},
{{ end -}}
"items" : [
{{ range $index, $element := $list -}}
{
"date_published" : "{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}",
"date_modified" : "{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}",
"id" : "{{ .Permalink }}",
"url" : "{{ .Permalink }}",
"content_html" : {{ .Content | jsonify }}
}{{ if ne (add $index 1) $length }},{{ end }}
{{ end -}}
]
}

34
layouts/micro/rss.xml Normal file
View file

@ -0,0 +1,34 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Micro posts {{ i18n "string_on" }} {{ site.Title }}</title>
<link>{{ .Permalink }}</link>
<description>Micro blog {{ i18n "string_by" }} {{ with site.Author.name }}{{ . }}{{end}}, {{ i18n "string_follow" }} @{{ with $.Param "microusername" }}{{ . }}{{ end }} {{ i18n "string_at" }} https://micro.blog/{{ with $.Param "microusername" }}{{ . }}{{ end }}</description>
<generator>Hugo -- gohugo.io</generator>
{{ with site.LanguageCode -}}
<language>{{ . }}</language>
{{ end -}}
{{ with site.Author.email -}}
<managingEditor>{{ . }}{{ with site.Author.name }} ({{ . }}){{end}}</managingEditor>
{{ end -}}
{{ with site.Author.email -}}
<webMaster>{{ . }}{{ with site.Author.name }} ({{ . }}){{end}}</webMaster>
{{ 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>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
<guid>{{ .Permalink }}</guid>
<description>{{ .Content | html }}</description>
</item>
{{ end }}
</channel>
</rss>

15
layouts/micro/single.html Normal file
View file

@ -0,0 +1,15 @@
{{ define "main" -}}
<main class="main layout__main">
<article class="single-view{{ with .Section }} single-view--{{ . | urlize }}{{ end }}">
<header>
<h1 class="hidden">{{ .Title }}</h1>
<p>
{{ partial "author-date" . }}
</p>
</header>
<div class="content">
{{ .Content }}
</div>
</article>
</main>
{{ end }}

View file

@ -0,0 +1,11 @@
<article class="list-view{{ with .Section }} list-view--{{ . | urlize }}{{ end }}">
<header>
<h2 class="hidden">{{ .Title }}</h2>
<p><a href="{{ .RelPermalink }}">
{{ partial "author-date" . }}
</a></p>
</header>
<div class="content">
{{ .Content }}
</div>
</article>

View file

@ -0,0 +1,3 @@
{{ with $.Param "author" }}<span class="author" itemprop="author">{{ . }}</span>{{ end -}}
{{ if and .Date ($.Param "author") }} - {{ end -}}
{{ with .Date }}<time class="created-date" datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}">{{ .Format ($.Param "dateformat" | default "2 January, 2006") }}</time>{{ end }}

View file

@ -0,0 +1,10 @@
<div class="cookieconsent layout__cookieconsent hidden">
<div class="cookieconsent__message">
{{ i18n "cookieconsent_message" }}
{{ with site.Params.privacyPolicyUrl }}<a href="{{ . }}">{{ i18n "privacy_policy" }}</a>{{ end }}
</div>
<div class="cookieconsent__actions">
<button class="button button--small button--cookieconsent button--decline" type="button" data-consent="false">{{ i18n "cookieconsent_decline" }}</button>
<button class="button button--small button--cookieconsent button--accept" type="button" data-consent="true">{{ i18n "cookieconsent_accept" }}</button>
</div>
</div>

View file

@ -0,0 +1,4 @@
<p class="content-dates">
{{ i18n "last_mod" }} {{ .Lastmod.Format ($.Param "dateformat" | default "2 January, 2006") }}<br>
{{ i18n "created" }} {{ .Date.Format ($.Param "dateformat" | default "2 January, 2006") }}
</p>

View file

@ -0,0 +1,8 @@
{{ $list := .AlternativeOutputFormats -}}
{{ $length := (len $list) -}}
{{ if $list -}}
<p>{{ i18n "string_follow" | title }}{{ with .Section }} {{ . }}{{ end }}: {{ range $index, $element := $list -}}
<a rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">{{ .Name }}</a>{{ if ne (add $index 1) $length }} | {{ end }}
{{- end -}}
</p>
{{ end -}}

View file

@ -0,0 +1,20 @@
<h2 class="visually-hidden">{{ i18n "lang_select_title" }}</h2>
<nav class="language-selector layout__language-selector">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" class="language-icon" width="24" height="24" viewBox="0 0 961 1113">
<path d="M848 3a17654 17654 0 00-349 118l-39 13-6 2-171-60-173-62c-2 0-2 6-2 118v119l-50 16-53 19c-5 3-5-19-5 343 0 335 0 336 2 339l6 5a92499 92499 0 00459-150l12-4 10 3 467 148 4 2V302l-45-15-45-14-1-132c0-124-1-132-2-134-4-7-9-8-19-5zm-4 145l-1 117-178-57-178-57L843 30l1 118zM458 481l-1 319-216 72-216 72V305l215-72 217-72 1 320zm262-131c17 4 30 9 30 9 1 0 20 67 42 149l57 203 15 56-64-19a2060 2060 0 01-24-84 2094 2094 0 00-130-40l-15 33-14 34-64-18 22-55 55-136 46-112c10-24 13-30 14-30l31 10z"/>
<path d="M257 360l-35 9c-23 7-25 7-34 7a72 72 0 01-20-3c-1 1 2 11 5 18 4 8 13 17 23 21 6 3 7 3 18 3 19 0 37-6 52-17 12-8 16-18 15-29-2-11-8-13-24-9zM335 413l-35 16c-13 7-23 12-28 13l-38 12a1636 1636 0 01-106 32c-19 3-17 2-17 9l2 8c2 4 9 10 14 12 12 6 42 3 51-6 2-2 3-3 3-7v-6l31-10 40-11a515 515 0 0148-13l-48 96c-10 19-23 40-45 71l-52 71-55 64-7 8h4c7 0 17-2 20-4a929 929 0 00149-179l23 17c26 20 30 23 51 35 25 14 39 21 56 27 8 2 12 3 13 1 1-4-6-30-9-33l-26-12-47-20-40-17-16-7 10-17c22-35 34-56 53-95l20-40 1-10v-11h-3l-17 6zM716 451l-23 56-23 55 86 26a4814 4814 0 00-40-137zM680 972a460 460 0 0026 44 422 422 0 01-319 66 517 517 0 01-175-66c-7-3-14-2-17 4-2 3-2 9 0 12s24 16 46 27a536 536 0 00222 53c36 1 39 0 68-4a480 480 0 00181-65l8-5 12 21 13 19 7-19 17-48 10-32-99-7z"/>
</svg>
<ul class="navbar">
{{ if .IsTranslated -}}
{{ range .Translations }}
<li><a rel="alternate" href="{{ .RelPermalink }}" hreflang="{{ .Language.Params.LanguageCode | default .Lang }}" lang="{{ .Language.Params.LanguageCode | default .Lang }}">{{ .Language.LanguageName }}</a></li>
{{ end -}}
{{ else -}}
{{ range site.Languages -}}
{{ if ne site.Language.Lang .Lang }}
<li><a rel="alternate" href="{{ .Lang | relURL }}" hreflang="{{ .Params.LanguageCode | default .Lang }}" lang="{{ .Params.LanguageCode | default .Lang }}">{{ .LanguageName }}</a></li>
{{ end -}}
{{ end -}}
{{ end -}}
</ul>
</nav>

View file

@ -0,0 +1,26 @@
<nav class="main-menu layout__navigation">
<h2 class="visually-hidden">{{ i18n "menu_title" }}</h2>
<ul class="navbar">
{{ if site.Menus.main -}}
{{ $currentPage := . -}}
{{ range site.Menus.main -}}
<li><a href="{{ .URL | relLangURL }}"{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} class="active" aria-current="page"{{ end }}>{{ .Name }}</a></li>
{{ end -}}
{{ else -}}
{{ $currentSection := .Section -}}
{{ $currentID := "" -}}
{{ with .File }}{{ $currentID = .UniqueID }}{{ end -}}
{{ with site.Home }}<li><a href="{{ .RelPermalink }}"{{ if eq $currentID .File.UniqueID }} class="active" aria-current="page"{{ end }}>{{ i18n "menu_home" }}</a></li>{{ end }}
{{ range where site.RegularPages "Section" "" -}}
<li><a href="{{ .RelPermalink }}"{{ if eq $currentID .File.UniqueID }} class="active" aria-current="page"{{ end }}>{{ .Title }}</a></li>
{{ end -}}
{{ range site.Sections -}}
<li><a href="{{ .RelPermalink }}"{{ if eq $currentSection .Section }} class="active" aria-current="page"{{ end }}>{{ .Title }}</a></li>
{{ end -}}
{{ end -}}
</ul>
</nav>

View file

@ -0,0 +1,30 @@
{{ range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" {{ printf "type=%q" .MediaType.Type | safeHTMLAttr }} title="{{ .Name }}" href="{{ .Permalink | safeURL }}">
{{ end -}}
<meta name="description" content="{{ with (.Description | default (replaceRE "\n" " " (.Plain | truncate 170))) }}{{ . }}{{ end }}">
<meta name="created" {{ printf "content=%q" (.Date.Format "2006-01-02T15:04:05-0700") | safeHTMLAttr }}>
<meta name="modified" {{ printf "content=%q" (.Lastmod.Format "2006-01-02T15:04:05-0700") | safeHTMLAttr }}>
{{ with $.Param "author" }}<meta name="author" content="{{ . }}">{{ end }}
{{ with $.Param "contact" }}<meta name="contact" content="{{ . }}">{{ end }}
<meta property="og:site_name" content="{{ site.Title }}">
<meta property="og:title" content="{{ .Title }}">
<meta property="og:url" content="{{ .Permalink }}">
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}">
{{ with $.Param "image" }}<meta property="og:image" content="{{ . | absURL }}">{{ end }}
{{ hugo.Generator }}
<meta name="msapplication-TileColor" content="{{ $.Param "themecolor" | default "#ffffff" }}">
<meta name="theme-color" content="{{ $.Param "themecolor" | default "#ffffff" }}">
{{ with site.Params.piwikTrackerUrl }}<link rel="dns-prefetch" href="https://{{ . }}">{{ end }}
{{ with $.Param "microusername" }}<link rel="me" href="https://micro.blog/{{ . }}">{{ end }}
<link rel="canonical" href="{{ .Permalink }}">
{{ if .IsTranslated -}}
{{ range .Translations }}
<link rel="alternate" hreflang="{{ .Language.Params.LanguageCode | default .Lang }}" href="{{ .RelPermalink }}">
{{ end -}}
{{ end -}}
<link rel="apple-touch-icon" href="{{ "apple-touch-icon.png" | relURL }}">
{{ if $.Param "realfavicongenerator" -}}
<link rel="icon" type="image/png" sizes="32x32" href="{{ "favicon-32x32.png" | relURL }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon-16x16.png" | relURL }}">
<link rel="manifest" href="{{ "site.webmanifest" | relURL }}">
{{ end -}}

View file

@ -0,0 +1,47 @@
<script type="application/ld+json">
{
"@context": "https://schema.org",
{{ if .IsPage -}}
"@type": {{ if or (eq .Section "blog") (eq .Section "post") }}"BlogPosting"{{ else }}"WebPage"{{ end }},
"headline": {{ .Title }},
"datePublished": {{ .Date.Format "2006-01-02T15:04:05Z07:00" }},
"dateModified": {{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }},
"url" : {{ .Permalink }},
"description": {{ with (.Description | default (replaceRE "\n" " " (.Plain | truncate 170))) }}{{ . }}{{ end }},
{{ with .Params.tags -}}
"keywords": {{ . }},
{{ end -}}
{{ else -}}
"@type": "WebPage",
"url" : {{ .Permalink }},
"name": {{ .Title }},
{{ with $.Param "description" -}}
"description": {{ . }},
{{ end -}}
{{ end -}}
{{ with $.Param "image" -}}
"image" : {{ . | absURL }},
{{ end -}}
{{ with $.Param "author" -}}
"author": {
"@type": "Person",
"name": {{ . }}
},
{{ end -}}
"mainEntityOfPage": {
"@type": "WebPage",
"@id": {{ site.BaseURL }}
},
"publisher": {
"@type": "Organization",
"name": {{ site.Title }},
{{ with $.Param "icon" -}}
"logo" : {
"@type": "ImageObject",
"url": {{ . | absURL }}
},
{{ end -}}
"url": {{ site.BaseURL }}
}
}
</script>

View file

@ -0,0 +1,35 @@
<div class="mobile-nav" dir="ltr">
<div class="mobile-nav__cover"></div>
<a href="#navigation" class="mobile-nav__toggle" aria-haspopup="true" role="button">{{ i18n "menu_mobile" }}</a>
<div class="mobile-nav__sheet">
<div class="mobile-nav__region">
{{ if site.IsMultiLingual }}{{ partial "language-selector.html" . }}{{ end }}
</div>
<nav class="mobile-nav__main-menu">
<h2 class="visually-hidden">{{ i18n "menu_title" }}</h2>
<ul class="mobile-nav__navbar">
{{ if site.Menus.main -}}
{{ $currentPage := . -}}
{{ range site.Menus.main -}}
<li><a href="{{ .URL | relLangURL }}"{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} class="active" aria-current="page"{{ end }}>{{ .Name }}</a></li>
{{ end -}}
{{ else -}}
{{ $currentSection := .Section -}}
{{ $currentID := "" -}}
{{ with .File }}{{ $currentID = .UniqueID }}{{ end -}}
{{ with site.Home }}<li><a href="{{ .RelPermalink }}"{{ if eq $currentID .File.UniqueID }} class="active" aria-current="page"{{ end }}>{{ i18n "menu_home" }}</a></li>{{ end }}
{{ range where site.RegularPages "Section" "" -}}
<li><a href="{{ .RelPermalink }}"{{ if eq $currentID .File.UniqueID }} class="active" aria-current="page"{{ end }}>{{ .Title }}</a></li>
{{ end -}}
{{ range site.Sections -}}
<li><a href="{{ .RelPermalink }}"{{ if eq $currentSection .Section }} class="active" aria-current="page"{{ end }}>{{ .Title }}</a></li>
{{ end -}}
{{ end -}}
</ul>
</nav>
</div>
</div>

View file

@ -0,0 +1,11 @@
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) -}}
<nav class="pager">
{{ if .Paginator.HasPrev -}}
<a href="{{ .Paginator.Prev.URL }}" rel="prev" class="pager-item pager-prev">{{ i18n "pager_prev" }}</a>
{{ end -}}
{{ if .Paginator.HasNext -}}
<a href="{{ .Paginator.Next.URL }}" rel="next" class="pager-item pager-next">{{ i18n "pager_next" }}</a>
{{ end -}}
</nav>
{{ end -}}

View file

@ -0,0 +1,12 @@
{{ $src := (.Params.podcast.mp3 | absURL) -}}
{{ if site.Params.Podcast.cdn -}}
{{ $src = path.Join site.Params.Podcast.cdn (.Params.podcast.mp3 | relURL) -}}
{{ end -}}
<figure class="podcast">
<audio controls preload="{{ site.Params.Podcast.preload | default "metadata" }}"><source src="{{ $src }}" type="audio/mpeg"></audio>
<figcaption><a href="{{ $src }}">{{ .Title }}</a></figcaption>
</figure>
{{ with .Params.podcast.image }}
{{ $resource := resources.Get .src }}{{ $size := "250x" }}{{ with .width }}{{ $size = (add (string .) "x") }}{{ end }}{{ $image := $resource.Resize $size -}}
<figure class="image {{ .class | default "right" }}"><img src="{{ $image.RelPermalink }}" width="{{ .width | default "250" }}" alt="{{ .alt }}"></figure>
{{ end -}}

View file

@ -0,0 +1,11 @@
<aside class="related layout__related">
{{ $related := site.RegularPages.Related . | first 3 -}}
{{ with $related -}}
<h2>{{ i18n "string_see_also" }}</h2>
<ul>
{{ range . -}}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end -}}
</ul>
{{ end -}}
</aside>

View file

@ -0,0 +1,45 @@
{{ $early := resources.Get "js/script-early.js" | minify | fingerprint -}}
<script src="{{ $early.RelPermalink }}"></script>
{{ if $.Param "alpine" -}}
{{ $alpine := resources.Get "js/lib/alpine.min.js" | fingerprint -}}
<script defer src="{{ $alpine.RelPermalink }}"></script>
{{ end -}}
{{ if $.Param "jquery" -}}
{{ $jquery := resources.Get "js/lib/jquery.slim.min.js" | fingerprint -}}
<script defer src="{{ $jquery.RelPermalink }}"></script>
{{ end -}}
{{ $umbrella := resources.Get "js/lib/umbrella.min.js" | fingerprint -}}
<script defer src="{{ $umbrella.RelPermalink }}"></script>
{{ if $.Param "mobilemenu" -}}
{{ $mobilemenu := resources.Get "js/mobile.js" | minify | fingerprint -}}
<script defer src="{{ $mobilemenu.RelPermalink }}"></script>
{{ end -}}
{{ if $.Param "cookieconsent" -}}
{{ $cookieconsent := resources.Get "js/cookieconsent.js" | minify | fingerprint -}}
<script defer src="{{ $cookieconsent.RelPermalink }}"></script>
{{ end -}}
{{ if $.Param "lazyload" -}}
{{ $lozadmin := resources.Get "js/lib/lozad.min.js" | fingerprint -}}
<script defer src="{{ $lozadmin.RelPermalink }}"></script>
{{ $lozad := resources.Get "js/lozadinit.js" | fingerprint -}}
<script defer src="{{ $lozad.RelPermalink }}"></script>
{{ end -}}
{{ if $.Param "listsort" -}}
{{ $listmin := resources.Get "js/lib/list.min.js" | fingerprint -}}
<script defer src="{{ $listmin.RelPermalink }}"></script>
{{ $listsort := resources.Get "js/listsort.js" | fingerprint -}}
<script defer src="{{ $listsort.RelPermalink }}"></script>
{{ end -}}
{{ if .HasShortcode "contact" -}}
{{ $contact := resources.Get "js/contact.js" | minify | fingerprint -}}
<script defer src="{{ $contact.RelPermalink }}"></script>
{{ end -}}
{{ if .HasShortcode "search" -}}
{{ $flexsearch := resources.Get "js/lib/flexsearch.compact.js" | fingerprint -}}
<script defer src="{{ $flexsearch.RelPermalink }}"></script>
{{ $search_opts := dict "minify" true "params" (dict "searchLimit" (site.Params.searchLimit | default 20)) -}}
{{ $search := resources.Get "js/search.js" | js.Build $search_opts | fingerprint -}}
<script defer src="{{ $search.RelPermalink }}"></script>
{{ end -}}
{{ $script := resources.Get "js/script.js" | minify | fingerprint -}}
<script defer src="{{ $script.RelPermalink }}"></script>

View file

@ -0,0 +1,15 @@
{{ $currentSection := .Section -}}
{{ $currentID := "" -}}
{{ with .File }}{{ $currentID = .UniqueID }}{{ end -}}
<aside class="sidebar layout__second-sidebar">
{{ range site.Sections -}}
<section>
<h4 class="menu"><a href="{{ .RelPermalink }}"{{ if eq $currentSection .Section }} class="active" aria-current="page"{{ end }}>{{ .Title }}</a></h4>
<ul class="menu">
{{ range .Pages -}}
<li><a href="{{ .RelPermalink }}"{{ if eq $currentID .File.UniqueID }} class="active" aria-current="page"{{ end }}>{{ .Title }}</a></li>
{{ end -}}
</ul>
</section>
{{ end -}}
</aside>

View file

@ -0,0 +1,19 @@
{{ $main_options := (dict "targetPath" "css/styles.css" "outputStyle" "compressed" "enableSourceMap" false "includePaths" (slice "assets/sass/lib/typey/stylesheets")) -}}
{{ if eq hugo.Environment "development" -}}
{{ $main_options = merge $main_options (dict "outputStyle" "nested" "enableSourceMap" true) -}}
{{ end -}}
{{ $mobile_options := merge $main_options (dict "targetPath" "css/mobile.css") -}}
{{ $print_options := merge $main_options (dict "targetPath" "css/print.css") -}}
{{ $main_style := resources.Get "sass/styles.scss" | toCSS $main_options -}}
{{ $mobile_style := resources.Get "sass/mobile.scss" | toCSS $mobile_options -}}
{{ $print_style := resources.Get "sass/print.scss" | toCSS $print_options -}}
{{ if ne hugo.Environment "development" -}}
{{ $main_style = $main_style | fingerprint -}}
{{ $mobile_style = $mobile_style | fingerprint -}}
{{ $print_style = $print_style | fingerprint -}}
{{ end -}}
{{ if $.Param "mobilemenu" -}}
<link rel="stylesheet" href="{{ $mobile_style.RelPermalink }}" media="screen">
{{ end -}}
<link rel="stylesheet" href="{{ $main_style.RelPermalink }}">
<link rel="stylesheet" href="{{ $print_style.RelPermalink }}" media="print">

View file

@ -0,0 +1,3 @@
<div class="submitted">
{{ partial "author-date" . }}
</div>

View file

@ -0,0 +1,8 @@
<div class="tags">
{{ i18n "taxo_tags" }}:
<ul>
{{ range (.GetTerms "tags") -}}
<li><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></li>
{{ end -}}
</ul>
</div>

View file

@ -0,0 +1,23 @@
{{ $opts := dict
"minify" true
"params" (dict
"cookieConsent" site.Params.cookieConsent
"piwikTrackerUrl" site.Params.piwikTrackerUrl
"piwikSiteID" site.Params.piwikSiteID
"plausibleSiteID" site.Params.plausibleSiteID
"GoogleAnalytics" site.GoogleAnalytics) -}}
{{ if and site.Params.piwikTrackerUrl site.Params.piwikSiteID -}}
{{ $script := resources.Get "js/tracking.js" | js.Build $opts | fingerprint -}}
<script src="{{ $script.RelPermalink }}"></script>
<script defer src="https://{{ site.Params.piwikTrackerUrl }}/matomo.js"></script>
{{ end -}}
{{ if site.Params.plausibleSiteID -}}
<script async defer data-domain="{{ site.Params.plausibleSiteID }}" src="{{ site.Params.plausibleTrackerURL | default "https://plausible.io/js/plausible.js" }}"></script>
{{ end -}}
{{ if site.GoogleAnalytics -}}
{{ $script := resources.Get "js/tracking.js" | js.Build $opts | fingerprint -}}
<script src="{{ $script.RelPermalink }}"></script>
{{ template "_internal/google_analytics.html" . }}
{{ end -}}

10
layouts/podcast/full.html Normal file
View file

@ -0,0 +1,10 @@
<article class="full-view{{ with .Section }} full-view--{{ . | urlize }}{{ end }}">
<header>
<h1 class="title {{ if $.Param "submitted" | default false }}title-submitted{{ end }}"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h1>
{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . }}{{ end -}}
</header>
{{ partial "podcast.html" . -}}
<div class="content">
{{ .Content }}
</div>
</article>

66
layouts/podcast/rss.xml Normal file
View file

@ -0,0 +1,66 @@
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
<rss version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>{{ site.Params.Podcast.Title | default site.Title }}</title>
<link>{{ .Permalink }}</link>
<description>{{ site.Params.Podcast.Description | default site.Params.Description }}</description>
<generator>Hugo -- gohugo.io</generator>
<language>{{ site.Params.Podcast.Lang | default site.LanguageCode }}</language>
{{ with site.Author.email -}}
<managingEditor>{{ . }}{{ with site.Author.name }} ({{ . }}){{end}}</managingEditor>
{{ end -}}
{{ with site.Author.email -}}
<webMaster>{{ . }}{{ with site.Author.name }} ({{ . }}){{end}}</webMaster>
{{ 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 site.Params.Podcast.Image }}{{ $image := resources.Get . }}<itunes:image href="{{ $image.Permalink }}" />{{ end }}
{{ with site.Params.Podcast.Category -}}
<itunes:category {{ if .name }}text="{{ .name }}"{{end}}>
{{ range .subcategories }}<itunes:category text="{{ . }}" />{{ end }}
</itunes:category>
{{ end -}}
{{ with site.Params.Podcast.Owner -}}
<itunes:owner>
{{ with .name }}<itunes:name>{{ . }}</itunes:name>{{ end }}
{{ with .email }}<itunes:email>{{ . }}</itunes:email>{{ end }}
</itunes:owner>
{{ end -}}
{{ with site.Params.Podcast.Description }}<itunes:summary>{{ . }}</itunes:summary>{{ end }}
{{ with site.Params.Podcast.Author }}<itunes:author>{{ . }}</itunes:author>{{ end }}
{{ with site.Params.Podcast.Type }}<itunes:type>{{ . }}</itunes:type>{{ end }}
{{ with site.Params.Podcast.Block }}<itunes:block>{{ . }}</itunes:block>{{ end }}
{{ with site.Params.Podcast.Complete }}<itunes:complete>{{ . }}</itunes:complete>{{ end }}
{{ with site.Params.Podcast.NewFeed }}<itunes:new-feed-url>{{ . }}</itunes:new-feed-url>{{ end }}
<itunes:explicit>{{ if site.Params.Podcast.Explicit }}true{{ else }}false{{ end }}</itunes:explicit>
{{ range .Pages }}
<item>
<title>{{ .Title }}</title>
<itunes:title>{{ .Title }}</itunes:title>
<link>{{ .Permalink }}</link>
<guid>{{ .Permalink }}</guid>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with site.Author.email -}}
<author>{{ . }}{{ with site.Author.name }} ({{ . }}){{ end }}</author>
{{ end -}}
<description>{{ .Content | html }}</description>
{{ if site.Params.Podcast.local | default true -}}
{{ with .Params.podcast.mp3 }}{{ $file_stat := os.Stat (path.Join "/static" (. | relURL)) }}<enclosure url="{{ if site.Params.Podcast.cdn }}{{ path.Join site.Params.Podcast.cdn (. | relURL) }}{{ else }}{{ . | absURL }}{{ end }}" length="{{ $file_stat.Size }}" type="audio/mpeg" />{{ end }}
{{ else -}}
{{ with .Params.podcast.mp3 }}<enclosure url="{{ if site.Params.Podcast.cdn }}{{ path.Join site.Params.Podcast.cdn (. | relURL) }}{{ else }}{{ . | absURL }}{{ end }}" type="audio/mpeg" />{{ end }}
{{ end -}}
{{ with .Params.podcast.duration }}<itunes:duration>{{ . }}</itunes:duration>{{ end }}
{{ with .Params.podcast.image.src }}{{ $image := resources.Get . }}<itunes:image href="{{ $image.Permalink }}" />{{ end }}
{{ with .Params.podcast.episode }}<itunes:episode>{{ . }}</itunes:episode>{{ end }}
{{ with .Params.podcast.episodeType }}<itunes:episodeType>{{ . }}</itunes:episodeType>{{ end }}
{{ with .Params.podcast.season }}<itunes:season>{{ . }}</itunes:season>{{ end }}
{{ with .Params.podcast.block }}<itunes:block>{{ . }}</itunes:block>{{ end }}
<itunes:explicit>{{ if .Params.podcast.explicit }}true{{ else }}false{{ end }}</itunes:explicit>
</item>
{{ end }}
</channel>
</rss>

View file

@ -0,0 +1,15 @@
{{ define "main" -}}
<main class="main layout__main">
<article class="single-view{{ with .Section }} single-view--{{ . | urlize }}{{ end }}">
<header>
<h1 class="title {{ if $.Param "submitted" | default false }}title-submitted{{ end }}">{{ .Title }}</h1>
{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . }}{{ end -}}
{{ if .Params.tags }}{{ partial "tags.html" . }}{{ end -}}
</header>
{{ partial "podcast.html" . -}}
<div class="content">
{{ .Content }}
</div>
</article>
</main>
{{ end }}

View file

@ -0,0 +1,6 @@
<figure {{ with .Get "class" }}class="{{ . }}"{{ end }}>
<audio controls preload="{{ .Get "preload" | default "metadata" }}">
{{ with .Get "src" }}<source src="{{ . | relURL }}" type="audio/mpeg">{{ end }}
</audio>
{{ with .Get "caption" }}<figcaption>{{ . }}</figcaption>{{ end }}
</figure>

View file

@ -0,0 +1,5 @@
{{ $class := .Get "class" -}}
{{ $newtab := .Get "newtab" | default false -}}
{{ $src := .Get "src" -}}
{{ $text := .Get "text" -}}
<a class="button{{ with $class }} {{ . }}{{ end }}" href="{{ $src }}"{{ if $newtab }} target="_blank" rel="noopener noreferrer"{{ end }}>{{ $text }}</a>

View file

@ -0,0 +1 @@
<div class="clearfix"></div>

View file

@ -0,0 +1,16 @@
<p class="error message js-hidden">{{ i18n "js_required" }}</p>
<p class="contact-submitted status message hidden">{{ i18n "contact_submitted" }}</p>
<p class="contact-error error message hidden">{{ i18n "contact_error" }}</p>
<form class="contact-form hidden" action="#" method="post" accept-charset="UTF-8">
<label for="edit-name">{{ i18n "contact_name" }}</label>
<input type="text" id="edit-name" name="name" placeholder="{{ i18n "contact_name_placeholder" }}" tabindex="1" required autofocus><span></span>
<label for="edit-mail">{{ i18n "contact_mail" }}</label>
<input type="email" id="edit-mail" name="email" placeholder="{{ i18n "contact_mail_placeholder" }}" tabindex="2" required><span></span>
<input type="text" id="edit-url" class="hidden" name="url" placeholder="{{ i18n "contact_honeypot" }}">
<label for="edit-subject">{{ i18n "contact_subject" }}</label>
<input type="text" id="edit-subject" name="subject" placeholder="{{ i18n "contact_subject_placeholder" }}" tabindex="3" required><span></span>
<label for="edit-message">{{ i18n "contact_message" }}</label>
<textarea id="edit-message" name="message" rows="5" placeholder="{{ i18n "contact_message_placeholder" }}" tabindex="4" required></textarea><span></span>
<button type="submit" name="submit" class="form-submit" disabled>{{ i18n "contact_submit" }}</button>
</form>

View file

@ -0,0 +1,6 @@
{{ $class := .Get "class" -}}
{{ $summary := .Get "summary" -}}
<details{{ with $class }} class="{{ . }}"{{ end }}>
{{ with $summary }}<summary>{{ . }}</summary>{{ end }}
{{ .Inner | $.Page.RenderString (dict "display" "block") }}
</details>

View file

@ -0,0 +1,76 @@
{{ $alt := .Get "alt" -}}
{{ $attr := .Get "attr" -}}
{{ $attrlink := .Get "attrlink" -}}
{{ $caption := .Get "caption" -}}
{{ $class := .Get "class" -}}
{{ $height := .Get "height" -}}
{{ $link := .Get "link" -}}
{{ $size := .Get "size" -}}
{{ $src := .Get "src" -}}
{{ $srcset := .Get "srcset" -}}
{{ $srcsetw := (slice) }}
{{ $title := .Get "title" -}}
{{ $width := .Get "width" -}}
{{ $maxwidth := site.Params.imageMaxWidth -}}
{{ $realwidth := 0 -}}
{{ $realheight := 0 -}}
{{ if and $src (fileExists (path.Join "/assets" $src)) -}}
{{ $original := resources.Get $src -}}
{{ if $size -}}
{{ $image := $original.Resize $size -}}
{{ $src = $image.RelPermalink -}}
{{ $width = $image.Width -}}
{{ $height = $image.Height -}}
{{ else -}}
{{ $src = $original.RelPermalink -}}
{{ $realwidth = $original.Width -}}
{{ $realheight = $original.Height -}}
{{ end -}}
{{ if $srcset -}}
{{ range $set := split $srcset " " -}}
{{ $image := $original.Resize (printf "%sx" $set) -}}
{{ $srcsetw = $srcsetw | append (printf "%s %sw" $image.RelPermalink $set) }}
{{ end }}
{{ $width = "" -}}
{{ $height = "" -}}
{{ end -}}
{{ else if and $src (fileExists (path.Join "/static" $src)) -}}
{{ with (imageConfig (path.Join "/static" $src)) -}}
{{ $realwidth = .Width -}}
{{ $realheight = .Height -}}
{{ end -}}
{{ end -}}
{{ if and $width $height -}}
{{ $width = int $width -}}
{{ $height = int $height -}}
{{ else if $width -}}
{{ $width = int $width -}}
{{ $height = $realheight -}}
{{ if and ($realwidth) (lt ($width) ($realwidth)) -}}
{{ $height = (mul ($realheight) (div (add ($width) 0.0) ($realwidth))) -}}
{{ $height = (math.Round $height) -}}
{{ end -}}
{{ else if $height -}}
{{ $width = $realwidth -}}
{{ $height = int $height -}}
{{ if and ($realheight) (lt ($height) ($realheight)) -}}
{{ $width = (mul ($realwidth) (div (add ($height) 0.0) ($realheight))) -}}
{{ $width = (math.Round $width) -}}
{{ end -}}
{{ else if and ($maxwidth) (lt ($maxwidth) ($realwidth)) -}}
{{ $width = ($maxwidth) -}}
{{ $height = (mul ($realheight) (div (add ($width) 0.0) ($realwidth))) -}}
{{ $height = (math.Round $height) -}}
{{ end -}}
<figure class="image{{ with $class }} {{ . }}{{ end }}">
{{ with $link }}<a href="{{ . }}">{{ end -}}
<img src="{{ $src }}"{{ with $srcsetw }} srcset="{{ delimit . ", " }}"{{ end }}{{ with $alt }} alt="{{ . }}"{{ end }}{{ with $width }} width="{{ . }}"{{ end }}{{ with $height }} height="{{ . }}"{{ end }}>
{{- if $link }}</a>{{ end }}
{{ if or $title $caption $attr -}}
<figcaption>
{{ with $title }}<h4>{{ . }}</h4>{{ end -}}
{{- $caption | markdownify }}{{ if and $caption $attr }} {{ end -}}
{{ with $attrlink }}<a href="{{ . }}">{{ end }}{{ $attr | markdownify }}{{ if $attrlink }}</a>{{ end -}}
</figcaption>
{{ end -}}
</figure>

View file

@ -0,0 +1,12 @@
{{ $class := .Get "class" -}}
{{ $newtab := .Get "newtab" | default false -}}
{{ $src := .Get "src" -}}
{{ $text := .Get "text" -}}
{{ if and $src (fileExists (path.Join "/assets" $src)) -}}
{{ $original := resources.Get $src -}}
{{ $src = $original.RelPermalink -}}
{{ end -}}
{{ if not $text -}}
{{ $text = path.Base $src -}}
{{ end -}}
<a class="file{{ with $class }} {{ . }}{{ end }}" href="{{ $src }}"{{ if $newtab }} target="_blank" rel="noopener noreferrer"{{ end }}>{{ $text }}</a>

View file

@ -0,0 +1,63 @@
{{ $alt := .Get "alt" -}}
{{ $class := .Get "class" -}}
{{ $height := .Get "height" -}}
{{ $link := .Get "link" -}}
{{ $size := .Get "size" -}}
{{ $src := .Get "src" -}}
{{ $srcset := .Get "srcset" -}}
{{ $srcsetw := (slice) }}
{{ $width := .Get "width" -}}
{{ $maxwidth := site.Params.imageMaxWidth -}}
{{ $realwidth := 0 -}}
{{ $realheight := 0 -}}
{{ if and $src (fileExists (path.Join "/assets" $src)) -}}
{{ $original := resources.Get $src -}}
{{ if $size -}}
{{ $image := $original.Resize $size -}}
{{ $src = $image.RelPermalink -}}
{{ $width = $image.Width -}}
{{ $height = $image.Height -}}
{{ else -}}
{{ $src = $original.RelPermalink -}}
{{ $realwidth = $original.Width -}}
{{ $realheight = $original.Height -}}
{{ end -}}
{{ if $srcset -}}
{{ range $set := split $srcset " " -}}
{{ $image := $original.Resize (printf "%sx" $set) -}}
{{ $srcsetw = $srcsetw | append (printf "%s %sw" $image.RelPermalink $set) }}
{{ end }}
{{ $width = "" -}}
{{ $height = "" -}}
{{ end -}}
{{ else if and $src (fileExists (path.Join "/static" $src)) -}}
{{ with (imageConfig (path.Join "/static" $src)) -}}
{{ $realwidth = .Width -}}
{{ $realheight = .Height -}}
{{ end -}}
{{ end -}}
{{ if and $width $height -}}
{{ $width = int $width -}}
{{ $height = int $height -}}
{{ else if $width -}}
{{ $width = int $width -}}
{{ $height = $realheight -}}
{{ if and ($realwidth) (lt ($width) ($realwidth)) -}}
{{ $height = (mul ($realheight) (div (add ($width) 0.0) ($realwidth))) -}}
{{ $height = (math.Round $height) -}}
{{ end -}}
{{ else if $height -}}
{{ $width = $realwidth -}}
{{ $height = int $height -}}
{{ if and ($realheight) (lt ($height) ($realheight)) -}}
{{ $width = (mul ($realwidth) (div (add ($height) 0.0) ($realheight))) -}}
{{ $width = (math.Round $width) -}}
{{ end -}}
{{ else if and ($maxwidth) (lt ($maxwidth) ($realwidth)) -}}
{{ $width = ($maxwidth) -}}
{{ $height = (mul ($realheight) (div (add ($width) 0.0) ($realwidth))) -}}
{{ $height = (math.Round $height) -}}
{{ end -}}
{{ with $link }}<a class="image-link" href="{{ . }}">{{ end -}}
<img class="image{{ with $class }} {{ . }}{{ end }}" src="{{ $src }}"{{ with $srcsetw }} srcset="{{ delimit . ", " }}"{{ end }}{{ with $alt }} alt="{{ . }}"{{ end }}{{ with $width }} width="{{ . }}"{{ end }}{{ with $height }} height="{{ . }}"{{ end }}>
{{- if $link }}</a>{{ end }}

View file

@ -0,0 +1 @@
{{ with site.GetPage (.Get 0) }}<a href="{{ .RelPermalink }}">{{ .Title }}</a>{{ end }}

View file

@ -0,0 +1,22 @@
<p class="error message js-hidden">{{ i18n "js_required" }}</p>
<p class="search-loading status message hidden">{{ i18n "search_loading" }}</p>
<div class="search-input hidden">
<form id="search-form" class="search-form" action="#" method="post" accept-charset="UTF-8" role="search">
<label for="query" class="visually-hidden">{{ i18n "search_title" }}</label>
<input type="search" id="query" name="query" class="search-text" placeholder="{{ i18n "search_placeholder" }}" maxlength="128">
<button type="submit" name="submit" class="form-submit" >{{ i18n "search_title" }}</button>
</form>
</div>
<div class="search-results"></div>
<template>
<article class="search-result list-view">
<header>
<h2 class="title title-submitted"><a href="#">Title here</a></h2>
<div class="submitted"><time class="created-date">Date here</time></div>
</header>
<div class="content">Summary here</div>
</article>
</template>

View file

@ -1,32 +1,16 @@
<link rel="stylesheet" href="/css/services.css">
<style>
.footer-content {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr 1fr;
gap: 0px 0px;
grid-template-areas:
"link icon"
"link icon";
grid-area: footer-content;
}
.icon { grid-area: icon; }
.link { grid-area: link; }
</style>
<div class="mainer">
<div class="cards">
<ul>
<li class="card">
<div class="img"><img src="/images/nitter.png" alt=""></div>
<div class="text">
<h2><a href="https://nitter.cz">nitter.cz</a></h2>
<p>Alternativní rozhraní pro Twitter, které nesbírá osobní údaje a nevyžaduje přihlášení.</p>
<small>
<!-- <div class="footer-content">
<div class="mainer">
<div class="cards">
<ul>
<li class="card">
<div class="img"><img src="/images/nitter.png" alt="" /></div>
<div class="text">
<h2><a href="https://nitter.cz">nitter.cz</a></h2>
<p>
Alternativní rozhraní pro Twitter, které nesbírá osobní údaje a
nevyžaduje přihlášení.
</p>
<small>
<!-- <div class="footer-content">
<div class="icon">
<div style="float: right">
<a href="https://status.nolog.cz">
@ -37,66 +21,77 @@
</div>
<div class="link"><a href="service/nitter">Více info...</a></div>
</div> -->
</small>
</div>
</li>
<li class="card">
<div class="img"><img src="/images/cryptpad.png" alt=""></div>
<div class="text">
<h2><a href="https://cryptpad.cz">cryptpad.cz</a></h2>
<p>End-to-end šifrovaná sada nástrojů pro spolupráci a sdílení souborů. Tabulky, dokumenty, formuláře a další.</p>
<small><a href="#detail"></a></small>
</div>
</li>
<li class="card">
<div class="img"><img src="/images/upload.png" alt=""></div>
<div class="text">
<h2><a href="https://upload.nolog.cz">upload.nolog.cz</a></h2>
<p>End-to-end šifrované nahrávání a sdílení souborů do velikosti 2GB.</p>
<small><a href="#detail"></a></small>
</div>
</li>
<li class="card">
<div class="img"><img src="/images/nolog-link.png" alt=""></div>
<div class="text">
<h2><a href="https://nolog.link">nolog.link</a></h2>
<p>Zkracovač odkazů bez sledování uživatelů.</p>
<small><a href="#detail"></a></small>
</div>
</li>
<li class="card">
<div class="img"><img src="/images/decide.png" alt=""></div>
<div class="text">
<h2><a href="https://decide.nolog.cz">decide.nolog.cz</a></h2>
<p>Alternativa k Doodle pro vytváření anket a hledání termínů.</p>
<small><a href="#detail"></a></small>
</div>
</li>
<li class="card">
<div class="img"><img src="/images/paste.png" alt=""></div>
<div class="text">
<h2><a href="https://paste.nolog.cz">paste.nolog.cz</a></h2>
<p>Rychlé šifrované sdílení textu s možností "autodestrukce" po přečtení.</p>
<small><a href="#detail"></a></small>
</div>
</li>
<li class="card">
<div class="img"><img src="/images/bbb.png" alt=""></div>
<div class="text">
<h2><a href="https://call.nolog.cz">call.nolog.cz</a></h2>
<p>Videokonferenční a vzdělávací systém bez sledování uživatelů.</p>
<small><a href="#detail"></a></small>
</div>
</li>
<li class="card">
<div class="img"><img src="/images/bridge.png" alt=""></div>
<div class="text">
<h2><a href="https://bridge.nolog.cz">bridge.nolog.cz</a></h2>
<p>Přeposílání příspěvků mezi decentralizovanou sociální sítí <a href="https://joinmastodon.org/">Mastodon</a> a Twitterem.</p>
<small><a href="#detail"></a></small>
</div>
</li>
<!-- <li class="card">
</small>
</div>
</li>
<li class="card">
<div class="img"><img src="/images/cryptpad.png" alt="" /></div>
<div class="text">
<h2><a href="https://cryptpad.cz">cryptpad.cz</a></h2>
<p>
End-to-end šifrovaná sada nástrojů pro spolupráci a sdílení souborů.
Tabulky, dokumenty, formuláře a další.
</p>
<small><a href="#detail"></a></small>
</div>
</li>
<li class="card">
<div class="img"><img src="/images/upload.png" alt="" /></div>
<div class="text">
<h2><a href="https://upload.nolog.cz">upload.nolog.cz</a></h2>
<p>
End-to-end šifrované nahrávání a sdílení souborů do velikosti 2GB.
</p>
<small><a href="#detail"></a></small>
</div>
</li>
<li class="card">
<div class="img"><img src="/images/nolog-link.png" alt="" /></div>
<div class="text">
<h2><a href="https://nolog.link">nolog.link</a></h2>
<p>Zkracovač odkazů bez sledování uživatelů.</p>
<small><a href="#detail"></a></small>
</div>
</li>
<li class="card">
<div class="img"><img src="/images/decide.png" alt="" /></div>
<div class="text">
<h2><a href="https://decide.nolog.cz">decide.nolog.cz</a></h2>
<p>Alternativa k Doodle pro vytváření anket a hledání termínů.</p>
<small><a href="#detail"></a></small>
</div>
</li>
<li class="card">
<div class="img"><img src="/images/paste.png" alt="" /></div>
<div class="text">
<h2><a href="https://paste.nolog.cz">paste.nolog.cz</a></h2>
<p>
Rychlé šifrované sdílení textu s možností "autodestrukce" po
přečtení.
</p>
<small><a href="#detail"></a></small>
</div>
</li>
<li class="card">
<div class="img"><img src="/images/bbb.png" alt="" /></div>
<div class="text">
<h2><a href="https://call.nolog.cz">call.nolog.cz</a></h2>
<p>Videokonferenční a vzdělávací systém bez sledování uživatelů.</p>
<small><a href="#detail"></a></small>
</div>
</li>
<li class="card">
<div class="img"><img src="/images/bridge.png" alt="" /></div>
<div class="text">
<h2><a href="https://bridge.nolog.cz">bridge.nolog.cz</a></h2>
<p>
Přeposílání příspěvků mezi decentralizovanou sociální sítí
<a href="https://joinmastodon.org/">Mastodon</a> a Twitterem.
</p>
<small><a href="#detail"></a></small>
</div>
</li>
<!-- <li class="card">
<div class="img"><img src="/images/wiki.png" alt=""></div>
<div class="text">
<h2><a href="https://">wiki.nolog.cz</a></h2>
@ -104,31 +99,42 @@
<small><a href="#detail"></a></small>
</div>
</li> -->
<li class="card">
<div class="img"><img src="/images/nolog-media.png" alt=""></div>
<div class="text">
<h2><a href="https://nolog.media">nolog.media</a></h2>
<p>Sdílení a přehrávání videí, alternativa k YouTube apod. Prozatím ve fázi testování.</p>
<small><a href="#detail"></a></small>
</div>
</li>
<li class="card">
<div class="img"><img src="/images/pad.png" alt=""></div>
<div class="text">
<h2><a href="https://pad.nolog.cz">pad.nolog.cz</a></h2>
<p>Vytváření a úpravy textových souborů ve skupině. Pro citlivý obsah doporučujeme přechod na <a href="https://cryptpad.cz">CryptPad</a>.</p>
<small><a href="#detail"></a></small>
</div>
</li>
<li class="card">
<div class="img" style="clip-path: unset;"><img style="object-fit: contain;" src="/images/nolog_red.svg" alt=""></div>
<div class="text">
<h2><a href="/service/custom">Něco dalšího?</a></h2>
<p>Potřebujete fórum, e-maily, úložiště nebo webhosting pro vaší organizaci, skupinu či třeba kolektiv?</p>
<small><a href="/service/custom">Čtěte dál...</a></small>
</div>
</li>
<!-- <li class="card">
<li class="card">
<div class="img"><img src="/images/nolog-media.png" alt="" /></div>
<div class="text">
<h2><a href="https://nolog.media">nolog.media</a></h2>
<p>
Sdílení a přehrávání videí, alternativa k YouTube apod. Prozatím ve
fázi testování.
</p>
<small><a href="#detail"></a></small>
</div>
</li>
<li class="card">
<div class="img"><img src="/images/pad.png" alt="" /></div>
<div class="text">
<h2><a href="https://pad.nolog.cz">pad.nolog.cz</a></h2>
<p>
Vytváření a úpravy textových souborů ve skupině. Pro citlivý obsah
doporučujeme přechod na <a href="https://cryptpad.cz">CryptPad</a>.
</p>
<small><a href="#detail"></a></small>
</div>
</li>
<li class="card">
<div class="img" style="clip-path: unset">
<img style="object-fit: contain" src="/images/nolog_red.svg" alt="" />
</div>
<div class="text">
<h2><a href="/service/custom">Něco dalšího?</a></h2>
<p>
Potřebujete fórum, e-maily, úložiště nebo webhosting pro vaší
organizaci, skupinu či třeba kolektiv?
</p>
<small><a href="/service/custom">Čtěte dál...</a></small>
</div>
</li>
<!-- <li class="card">
<div class="img"><img src="/images/chat_bg.jpg" alt=""></div>
<div class="text">
<h2><a href="https://nolog.chat">nolog.chat</a></h2>
@ -136,7 +142,6 @@
<small><a href="#detail"></a></small>
</div>
</li> -->
</ul>
</div>
</div>
</ul>
</div>
</div>

View file

@ -0,0 +1,40 @@
{{ $alt := .Get "alt" -}}
{{ $caption := .Get "caption" -}}
{{ $class := .Get "class" -}}
{{ $height := .Get "height" -}}
{{ $inline := .Get "inline" | default false -}}
{{ $link := .Get "link" -}}
{{ $src := .Get "src" -}}
{{ $width := .Get "width" -}}
{{ if and $src (fileExists (path.Join "/assets" $src)) -}}
{{ $original := resources.Get $src -}}
{{ if $inline -}}
{{ $src = $original.Content -}}
{{ else -}}
{{ $src = $original.RelPermalink -}}
{{ end -}}
{{ else if and $src $inline (fileExists (path.Join "/static" $src)) -}}
{{ $src = readFile (path.Join "/static" $src) -}}
{{ end -}}
{{ if and $width $height -}}
{{ $width = int $width -}}
{{ $height = int $height -}}
{{ else if $width -}}
{{ $width = int $width -}}
{{ else if $height -}}
{{ $height = int $height -}}
{{ end -}}
{{ if $caption }}<figure class="image image--svg{{ with $class }} {{ . }}{{ end }}">{{ end -}}
{{ with $link }}<a class="image-link" href="{{ . }}">{{ end -}}
{{ if $inline -}}
<div class="image image--svg{{ with $class }} {{ . }}{{ end }}">{{ $src | safeHTML }}</div>
{{ else -}}
<img class="image image--svg{{ with $class }} {{ . }}{{ end }}" src="{{ $src }}"{{ with $alt }} alt="{{ . }}"{{ end }}{{ with $width }} width="{{ . }}"{{ end }}{{ with $height }} height="{{ . }}"{{ end }}>
{{ end -}}
{{- if $link }}</a>{{ end }}
{{ if $caption -}}
<figcaption>
{{ $caption | markdownify -}}
</figcaption>
</figure>
{{ end -}}

View file

@ -0,0 +1,6 @@
<figure {{ with .Get "class" }}class="{{ . }}"{{ end }}>
<video controls preload="{{ .Get "preload" | default "metadata" }}" {{ with .Get "width" }}width="{{ . }}"{{ end }} {{ with .Get "autoplay" }}autoplay="{{ . }}"{{ end }} {{ with .Get "loop" }}loop="{{ . }}"{{ end }}>
{{ with .Get "src" }}<source src="{{ . | relURL }}" type="video/mp4">{{ end }}
</video>
{{ with .Get "caption" }}<figcaption>{{ . }}</figcaption>{{ end }}
</figure>

View file

@ -0,0 +1,3 @@
{{ $display := "inline" -}}
{{ if eq (.Get 1) "block" }}{{ $display = "block" }}{{ end -}}
<div class="{{ .Get 0 }}">{{ if eq (.Get 1) "nomarkdown" }}{{ .Inner }}{{ else }}{{ .Inner | $.Page.RenderString (dict "display" $display) }}{{ end }}</div>

8
podcast.md Normal file
View file

@ -0,0 +1,8 @@
---
title: "{{ replace .TranslationBaseName "-" " " | humanize }}"
date: {{ .Date }}
podcast:
mp3:
duration:
---

38
scripts/set_up_new_site.sh Executable file
View file

@ -0,0 +1,38 @@
#!/usr/bin/env bash
# shell script hardening
set -euo pipefail
# This script copies the scss and layout files I think most people
# would like to override. It also copies the example config file.
# (Run chmod 700 on this file to make it executable)
if [[ ! "$0" =~ "themes/zen/scripts/set_up_new_site.sh" ]]; then
echo "Error: This script must be run from the project root directory."
echo "Usage: ./theme/zen/set_up_new_site.sh"
exit 1
fi
mkdir -p "assets/sass"
mkdir -p "layouts"
copy_files=("themes/zen/assets/sass/_colors.scss:assets/sass/_colors.scss"
"themes/zen/assets/sass/_extra.scss:assets/sass/_extra.scss"
"themes/zen/assets/sass/_fonts.scss:assets/sass/_fonts.scss"
"themes/zen/assets/sass/_custom.scss:assets/sass/_custom.scss"
"themes/zen/assets/sass/_zen.scss:assets/sass/_zen.scss"
"themes/zen/layouts/index.html:layouts/index.html"
"themes/zen/exampleSite/config.yaml:config.yaml")
for files in "${copy_files[@]}" ; do
if [[ ! -f "${files##*:}" ]]; then
cp "${files%%:*}" "${files##*:}"
echo "Copied: ${files##*:}"
else
echo "Already exist so not overwritten: ${files##*:}"
fi
done
if [[ -f "config.toml" && -f "config.yaml" ]]; then
mv config.toml config.toml.old
fi

View file

@ -1,143 +0,0 @@
article > .content ul > li::before, aside ul > li::before {
font-size: 0.88888889rem;
padding-right: 0.75rem;
display: table-cell;
content: unset;
}
.main h2, .main h3, .main h4, .main h5, .main h6, .main ul, .main ol, .main dl, .main p {
max-width: 90ch;
}
article > .content ul > li, aside ul > li {
display: flex;
}
.mainer {
max-width: 60rem;
margin: 0 auto;
padding: 1rem;
display: flex;
}
.mainer * {
margin: 0;
padding: 0;
box-sizing: border-box;
color: inherit;
max-width: -moz-available; /* WebKit-based browsers will ignore this. */
max-width: -webkit-fill-available; /* Mozilla-based browsers will ignore this. */
max-width: fill-available;
}
h1 {
margin-bottom: 1rem;
}
.card h2 a {
text-decoration: none;
}
.cards > ul {
list-style: none;
display: grid !important;
}
.card + .card {
margin-top: 1.5rem;
}
@supports (display: grid) {
.cards > ul {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
grid-column-gap: 1.5rem;
grid-row-gap:1.5rem;
}
.card + .card {
margin-top: 0;
}
}
.card {
border: 1px solid;
border-radius: 0.25rem;
display: flex;
flex-direction: column;
position: relative;
}
.card .text {
padding: 1rem;
flex: 1 0 auto;
display: flex;
flex-direction: column;
}
.card p {
max-width: 60ch;
}
.card .img {
height: 6.5rem;
clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 1rem));
}
.card .img img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: top;
/* filter: grayscale(100%); */
}
.card a {
text-decoration: none;
outline: none;
}
.h2 a::after {
content: '';
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
}
.card a:focus {
outline: none;
text-decoration: underline;
}
/* .card:focus-within, .card:hover {
box-shadow: 0 0 0 0.05rem;
} */
.card:focus-within a:focus {
text-decoration: none;
}
.card small {
display: block;
text-decoration: underline;
}
.card .text > * + * {
margin-top: 0.75rem;
}
.card .text > :last-child {
margin-top: auto;
padding-top: 0.75rem;
}
.card a {
outline: none;
text-decoration: none;
}

@ -1 +0,0 @@
Subproject commit 73635d834b47ffc25d8ed9ecef6641adb8c34f8e