mostly ported the Minimal Mistakes theme to work with eleventy. The sort posts by year isn't working, nor do I yet have a version of pagintion working for general posts

This commit is contained in:
Robert McGovern 2023-01-25 21:55:28 +00:00
parent 148fa78c0c
commit 8d89c2d453
77 changed files with 2397 additions and 346 deletions

View File

@ -1,3 +1,5 @@
const siteURL = "https://tarasis.net";
const fs = require("fs-extra");
const sass = require("sass");
const { promisify } = require("util");
@ -14,6 +16,9 @@ const description = require("eleventy-plugin-description");
const pluginRss = require("@11ty/eleventy-plugin-rss");
const UpgradeHelper = require("@11ty/eleventy-upgrade-help");
const xmlFiltersPlugin = require("eleventy-xml-plugin");
const yaml = require("js-yaml");
const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
const inspect = require("node:util").inspect;
@ -25,6 +30,9 @@ const indexify = (url) => url.replace(/(\/[^.]*)$/, "$1index.html");
module.exports = function (eleventyConfig) {
let pathPrefix = "/";
eleventyConfig.addDataExtension("yaml", contents => yaml.load(contents));
eleventyConfig.addDataExtension("yml", contents => yaml.load(contents));
eleventyConfig.addPlugin(pluginRss);
//Blog excerpts
eleventyConfig.addPlugin(description);
@ -39,7 +47,32 @@ module.exports = function (eleventyConfig) {
});
// TODO https://www.npmjs.com/package/eleventy-plugin-meta-generator
// Eleventy Syntax Highlighting (https://www.11ty.dev/docs/plugins/syntaxhighlight/)
eleventyConfig.addPlugin(require("@11ty/eleventy-plugin-syntaxhighlight"));
// eleventyConfig.addPlugin(require("@11ty/eleventy-plugin-syntaxhighlight"));
eleventyConfig.addPlugin(syntaxHighlight, {
alwaysWrapLineHighlights: true,
// Change which Eleventy template formats use syntax highlighters
// templateFormats: ["*"], // default
// Use only a subset of template types (11ty.js added in v4.0.0)
// templateFormats: ["liquid", "njk", "md", "11ty.js"],
// init callback lets you customize Prism
// init: function({ Prism }) {
// Prism.languages.myCustomLanguage = /* */;
// },
// Added in 3.1.1, add HTML attributes to the <pre> or <code> tags
preAttributes: {
tabindex: 0,
// Added in 4.1.0 you can use callback functions too
"data-language": function({ language, content, options }) {
return language;
}
},
codeAttributes: {},
});
eleventyConfig.addPlugin(xmlFiltersPlugin);
@ -74,13 +107,22 @@ module.exports = function (eleventyConfig) {
// return collectionApi.getFilteredByGlob("./src/_posts/**/*.md");
// });
eleventyConfig.addCollection("drafts", (collection) =>
collection
.getFilteredByGlob("./src/_drafts/**/*")
.sort((a, b) => a.data.weight - b.data.weight)
) ;
eleventyConfig.addCollection("tags", (collection) => {
let tags = new Set();
collection.getAll().forEach((item) => {
if ("tags" in item.data) {
for (const tag of item.data.tags) {
tags.add(tag);
if (item.data.tags != undefined) {
for (const tag of item.data.tags) {
tags.add(tag);
}
}
}
});
@ -88,6 +130,22 @@ module.exports = function (eleventyConfig) {
return [...tags];
});
eleventyConfig.addCollection("categories", (collection) => {
let categories = new Set();
collection.getAll().forEach((item) => {
if ("category" in item.data) {
if (item.data.category != undefined) {
for (const category of item.data.category) {
categories.add(category);
}
}
}
});
return [...categories];
});
// Filters
// eleventyConfig.addFilter("markdownify", (str) => {
@ -123,7 +181,6 @@ module.exports = function (eleventyConfig) {
require("moment")(date).format(format)
);
// eleventyConfig.addFilter("absolute_url", relativeURL);
eleventyConfig.addLiquidFilter("toUTCString", (date) => {
const utc = date.toUTCString();
return moment.utc(utc).format("MMMM Do YYYY");
@ -131,8 +188,6 @@ module.exports = function (eleventyConfig) {
eleventyConfig.addFilter("number_of_words", numberOfWords);
// eleventyConfig.addFilter("absolute_url", relativeUrl);
// eleventyConfig.addShortcode("where_exp", function (item, exp) {
// console.log(exp);
// return eval(exp);
@ -146,6 +201,8 @@ module.exports = function (eleventyConfig) {
return inspect(obj, {sorted: true});
});
eleventyConfig.addFilter('group_by', groupBy)
eleventyConfig.addLayoutAlias(
"archive-taxonomy",
"layouts/archive-taxonomy.html"
@ -164,6 +221,7 @@ module.exports = function (eleventyConfig) {
eleventyConfig.addLayoutAlias("tag", "layouts/tag.html");
eleventyConfig.addLayoutAlias("tags", "layouts/tags.html");
eleventyConfig.addLayoutAlias("gallery", "layouts/gallery");
eleventyConfig.addLayoutAlias("drafts", "layouts/drafts");
// Passthrough copy
// don't use .gitignore (allows compiling sass to css into a monitored folder WITHOUT committing it to repo)
@ -303,13 +361,16 @@ module.exports = function (eleventyConfig) {
// );
eleventyConfig.addFilter("relative_url", relativeURLALT);
eleventyConfig.addFilter("absolute_url", relativeURLALT);
eleventyConfig.addFilter("absolute_url", absoluteUrl);
return {
templateFormats: ["html", "liquid", "md", "njk"],
pathPrefix,
environment: "production",
// absolute_url: "https://tarasis.net/",
passthroughFileCopy: true,
dir: {
@ -412,3 +473,32 @@ function relativeURLALT(url, pathPrefix = undefined) {
}`;
return relativePath;
}
function absoluteUrl(url) {
if (url !== undefined) {
return siteURL + url
} else {
return siteURL
}
}
function groupBy(array, key) {
const get = entry => key.split('.').reduce((acc, key) => acc[key], entry)
const map = array.reduce((acc, entry) => {
const value = get(entry)
if (typeof acc[value] === 'undefined') {
acc[value] = []
}
acc[value].push(entry)
return acc
}, {})
return Object.keys(map).reduce(
(acc, key) => [...acc, { name: key, items: map[key] }],
[]
)
}

View File

@ -0,0 +1,60 @@
// Credits 🙇 for original ideas to:
// Fork of https://github.com/vimtor/eleventy-plugin-external-links
// css.gg SVG icon https://github.com/astrit/css.gg/blob/master/icons/svg/external.svg
const { parse, HTMLElement } = require("node-html-parser");
const { extname } = require("path");
module.exports = eleventyConfig => {
const options = {
name: "external-links",
regex: new RegExp("^(([a-z]+:)|(//))", "i"),
target: "_blank",
rel: "noopener noreferrer nofollow",
extensions: [".html"],
};
eleventyConfig.addTransform(options.name, (content, outputPath) => {
if (outputPath && options.extensions.includes(extname(outputPath))) {
const root = parse(content);
const links = root.querySelectorAll("a");
links
.filter(link => {
const href = link.getAttribute("href");
return (
href &&
options.regex.test(href) &&
!link.getAttribute("rel") &&
!link.getAttribute("target")
);
})
.forEach(link => {
link.setAttribute("target", options.target);
link.setAttribute("rel", options.rel);
const srText = new HTMLElement("span", { class: "sr-only" });
srText.textContent = "(opens in a new window)";
const icon = new HTMLElement(
"svg",
{},
`viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"`
);
icon.set_content(`
<path
d="M15.6396 7.02527H12.0181V5.02527H19.0181V12.0253H17.0181V8.47528L12.1042 13.3892L10.6899 11.975L15.6396 7.02527Z"
fill="currentColor"
/>
<path
d="M10.9819 6.97473H4.98193V18.9747H16.9819V12.9747H14.9819V16.9747H6.98193V8.97473H10.9819V6.97473Z"
fill="currentColor"
/>`);
link.appendChild(srText);
link.appendChild(icon);
});
return root.toString();
}
return content;
});
};

1316
itemdata.txt Normal file

File diff suppressed because it is too large Load Diff

247
package-lock.json generated
View File

@ -14,6 +14,7 @@
"@11ty/eleventy-plugin-syntaxhighlight": "^4.2.0",
"@11ty/eleventy-upgrade-help": "^2.0.5",
"autoprefixer": "^10.4.13",
"const": "^1.0.0",
"eleventy-load": "^0.3.1",
"eleventy-load-css": "^0.3.0",
"eleventy-load-file": "^0.1.0",
@ -23,6 +24,8 @@
"eleventy-plugin-toc": "^1.1.5",
"eleventy-xml-plugin": "^0.1.0",
"fs-extra": "^11.1.0",
"js-yaml": "^4.1.0",
"lightningcss-cli": "^1.18.0",
"markdown-it": "^13.0.1",
"markdown-it-anchor": "^8.6.6",
"markdown-it-attrs": "^4.1.6",
@ -460,13 +463,9 @@
}
},
"node_modules/argparse": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
"dev": true,
"dependencies": {
"sprintf-js": "~1.0.2"
}
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
},
"node_modules/array-differ": {
"version": "3.0.0",
@ -998,6 +997,11 @@
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
},
"node_modules/const": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/const/-/const-1.0.0.tgz",
"integrity": "sha512-E24n5WFSXaU6+BFaCqImKvuoroCm4jzi4imyA0e20wODGm02n/PmfNLOdngkXAh9DYSEDZIQ/cR+ADEPD1GJpA=="
},
"node_modules/constantinople": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/constantinople/-/constantinople-4.0.1.tgz",
@ -1203,6 +1207,17 @@
"node": ">= 0.6.0"
}
},
"node_modules/detect-libc": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
"integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==",
"bin": {
"detect-libc": "bin/detect-libc.js"
},
"engines": {
"node": ">=0.10"
}
},
"node_modules/dev-ip": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/dev-ip/-/dev-ip-1.0.1.tgz",
@ -1905,6 +1920,28 @@
"node": ">=6.0"
}
},
"node_modules/gray-matter/node_modules/argparse": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
"dev": true,
"dependencies": {
"sprintf-js": "~1.0.2"
}
},
"node_modules/gray-matter/node_modules/js-yaml": {
"version": "3.14.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
"integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
"dev": true,
"dependencies": {
"argparse": "^1.0.7",
"esprima": "^4.0.0"
},
"bin": {
"js-yaml": "bin/js-yaml.js"
}
},
"node_modules/hamljs": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/hamljs/-/hamljs-0.6.2.tgz",
@ -2569,13 +2606,11 @@
"dev": true
},
"node_modules/js-yaml": {
"version": "3.14.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
"integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
"dev": true,
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
"dependencies": {
"argparse": "^1.0.7",
"esprima": "^4.0.0"
"argparse": "^2.0.1"
},
"bin": {
"js-yaml": "bin/js-yaml.js"
@ -2732,6 +2767,187 @@
"node": ">= 0.8.0"
}
},
"node_modules/lightningcss-cli": {
"version": "1.18.0",
"resolved": "https://registry.npmjs.org/lightningcss-cli/-/lightningcss-cli-1.18.0.tgz",
"integrity": "sha512-vlb62UstivI6wrtHeEqQ+j2lDRgfqpDH7GRYIqRdMnGa+VqJsxtezkyUGN0eiYEIlvr0aFjDYPqsU4qW29UCfQ==",
"hasInstallScript": true,
"dependencies": {
"detect-libc": "^1.0.3"
},
"bin": {
"lightningcss": "lightningcss"
},
"engines": {
"node": ">= 12.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
},
"optionalDependencies": {
"lightningcss-cli-darwin-arm64": "1.18.0",
"lightningcss-cli-darwin-x64": "1.18.0",
"lightningcss-cli-linux-arm-gnueabihf": "1.18.0",
"lightningcss-cli-linux-arm64-gnu": "1.18.0",
"lightningcss-cli-linux-arm64-musl": "1.18.0",
"lightningcss-cli-linux-x64-gnu": "1.18.0",
"lightningcss-cli-linux-x64-musl": "1.18.0",
"lightningcss-cli-win32-x64-msvc": "1.18.0"
}
},
"node_modules/lightningcss-cli-darwin-arm64": {
"version": "1.18.0",
"resolved": "https://registry.npmjs.org/lightningcss-cli-darwin-arm64/-/lightningcss-cli-darwin-arm64-1.18.0.tgz",
"integrity": "sha512-R52Gxx56roDw7GbfLFNnAalvTebirVASl42HDriVLlCgQYo0e9/ef2za0c+AYM/RZt7fgfGRIVXFEJVC5mESaw==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">= 12.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/lightningcss-cli-darwin-x64": {
"version": "1.18.0",
"resolved": "https://registry.npmjs.org/lightningcss-cli-darwin-x64/-/lightningcss-cli-darwin-x64-1.18.0.tgz",
"integrity": "sha512-0F1xELsw/FdYcZJc7SvhQ14SRO0EXJPjuotS4hlWtQdl0bZQlI64IRGDAgFNnwrOl3ou3+bhmL/4dtVXzezKWA==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">= 12.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/lightningcss-cli-linux-arm-gnueabihf": {
"version": "1.18.0",
"resolved": "https://registry.npmjs.org/lightningcss-cli-linux-arm-gnueabihf/-/lightningcss-cli-linux-arm-gnueabihf-1.18.0.tgz",
"integrity": "sha512-LGqRajP4x2/onNh8Z/UMhyumC3FukFv1xouAp4Vp8U/SwOx5VRWboxgzUHW7IhyPrEi+O53F6LNrx5JCzdgOmA==",
"cpu": [
"arm"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 12.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/lightningcss-cli-linux-arm64-gnu": {
"version": "1.18.0",
"resolved": "https://registry.npmjs.org/lightningcss-cli-linux-arm64-gnu/-/lightningcss-cli-linux-arm64-gnu-1.18.0.tgz",
"integrity": "sha512-nDjCmZ9Kc3Be51Z7xL9tlYyCoE6bg7UzCZSSqBkOghId7DCmGoNf0RgU0+43YP27E29GyRJFRovsC8Rcv3wjgg==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 12.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/lightningcss-cli-linux-arm64-musl": {
"version": "1.18.0",
"resolved": "https://registry.npmjs.org/lightningcss-cli-linux-arm64-musl/-/lightningcss-cli-linux-arm64-musl-1.18.0.tgz",
"integrity": "sha512-4aOR3ZAn6eixplfOblc+daGIlSvYnTC1sz08kipOCXF0jahaCwJ7SaBBBCLusqfgCEDEz4gesam0YavHa1qZEQ==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 12.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/lightningcss-cli-linux-x64-gnu": {
"version": "1.18.0",
"resolved": "https://registry.npmjs.org/lightningcss-cli-linux-x64-gnu/-/lightningcss-cli-linux-x64-gnu-1.18.0.tgz",
"integrity": "sha512-0WfiSirImUiHv+bsYCSlkwJFk4U6tkCRGABNM/0h0F9LYuXD7wgRnnT7F1i+xFS90KP/8ABjtk9//hKhf7lZaQ==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 12.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/lightningcss-cli-linux-x64-musl": {
"version": "1.18.0",
"resolved": "https://registry.npmjs.org/lightningcss-cli-linux-x64-musl/-/lightningcss-cli-linux-x64-musl-1.18.0.tgz",
"integrity": "sha512-mlNAzk486pT6LNWOmzP7QQ9+WhcLzK6eAcMjTW7MhK+o2lgLmjVeFk+VEJ23tMLjwwjm+/mUaJM8fjTVfniK2A==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 12.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/lightningcss-cli-win32-x64-msvc": {
"version": "1.18.0",
"resolved": "https://registry.npmjs.org/lightningcss-cli-win32-x64-msvc/-/lightningcss-cli-win32-x64-msvc-1.18.0.tgz",
"integrity": "sha512-Sx3/QJL1BqOwtxR+yXGGItamu66CB28mWPTpJ6Mv3Zuezpx6up//HmFA06BABBqgtQS2ocrf8+mj2/HMx2j8YQ==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">= 12.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/linkedom": {
"version": "0.14.21",
"resolved": "https://registry.npmjs.org/linkedom/-/linkedom-0.14.21.tgz",
@ -2980,11 +3196,6 @@
"resolved": "https://registry.npmjs.org/markdown-it-regexp/-/markdown-it-regexp-0.4.0.tgz",
"integrity": "sha512-0XQmr46K/rMKnI93Y3CLXsHj4jIioRETTAiVnJnjrZCEkGaDOmUxTbZj/aZ17G5NlRcVpWBYjqpwSlQ9lj+Kxw=="
},
"node_modules/markdown-it/node_modules/argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
},
"node_modules/markdownify": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/markdownify/-/markdownify-0.1.0.tgz",

View File

@ -4,13 +4,13 @@
"description": "Second generation of site using 11ty for building but using Jekyll theme Minimal Mistakes (with mods to make it work)",
"main": "index.js",
"scripts": {
"watch:sass": "sass --watch src/_sass/**/*.scss dist/assets/styles/minimal-mistakes.css",
"build:sass": "sass --style=compressed src/_sass/minimal-mistakes.scss dist/assets/styles/minimal-mistakes.css",
"build:mysass": "sass --style=compressed src/assets/css/main.scss dist/assets/css/main.css",
"build:sass": "sass --load-path=src/_sass --style=compressed dist/assets/css/tocompile.scss dist/assets/css/main.css",
"watch:eleventy": "eleventy --serve",
"build:eleventy": "eleventy",
"start": "npm-run-all build:sass --parallel watch:*",
"build": "npm-run-all build:*",
"clean": "rm -rf dist",
"postbuild": "",
"start": "npm-run-all clean build:eleventy build:sass --parallel watch:*",
"build": "npm-run-all clean build:eleventy build:sass",
"debug": "DEBUG=Eleventy:* eleventy"
},
"repository": {
@ -34,6 +34,7 @@
"@11ty/eleventy-plugin-syntaxhighlight": "^4.2.0",
"@11ty/eleventy-upgrade-help": "^2.0.5",
"autoprefixer": "^10.4.13",
"const": "^1.0.0",
"eleventy-load": "^0.3.1",
"eleventy-load-css": "^0.3.0",
"eleventy-load-file": "^0.1.0",
@ -43,6 +44,8 @@
"eleventy-plugin-toc": "^1.1.5",
"eleventy-xml-plugin": "^0.1.0",
"fs-extra": "^11.1.0",
"js-yaml": "^4.1.0",
"lightningcss-cli": "^1.18.0",
"markdown-it": "^13.0.1",
"markdown-it-anchor": "^8.6.6",
"markdown-it-attrs": "^4.1.6",

View File

@ -1,9 +1,7 @@
# main links
main:
# - title: ""
# url: /docs/quick-start-guide/
- title: "Posts"
url: /year-archive/
# - title: "Posts"
# url: /year-archive/
- title: "Tags"
url: /tags/
- title: "Categories"

View File

@ -136,6 +136,11 @@
"icon": "fab fa-fw fa-twitter-square",
"url": "https://twitter.com/tarasis"
},
{
"label": "Mastodon",
"icon": "fab fa-fw fa-mastodon",
"url": "https://social.tarasis.net/@tarasis"
},
{
"label": "Facebook",
"icon": "fab fa-fw fa-facebook",
@ -190,6 +195,11 @@
"icon": "fab fa-fw fa-twitter-square",
"url": "https://twitter.com/tarasis"
},
{
"label": "Mastodon",
"icon": "fab fa-fw fa-mastodon",
"url": "https://social.tarasis.net/@tarasis"
},
{
"label": "Facebook",
"icon": "fab fa-fw fa-facebook",

View File

@ -6,6 +6,7 @@ share: true
related: true
title: 'An End of Sorts'
tag: [Life, Work]
eleventyExcludeFromCollections: true
---
Lets be clear up front: ITS MY **FAULT**.

View File

@ -1,58 +0,0 @@
---
title: A short look back on my Camino de Santiago journey
tags:
- life
- camino
- caminodesantiago
category: camino
---
A year ago tomorrow I began the most gruelling, yet immensely satisfying, journey of my life. I set off from my home in Buchholz in der Nordheide Germany, to fly to France to walk the Camino de Santiago.
Ostensibly the point of the walk was to find myself, to seek out something that had been missing in me for a long time. But it was also about trying to make a decision about what I was doing and my relationship with my wife.
I kinda failed at the latter point. I found while walking that often my brain zoned out and I wasn't thinking about what I should have been. I did however find something that (mostly) made me feel good.
My original intention was to take time along the way to stop for an extra day here and there to see places that I was walking through, but it never really happened. I kind of regret that, although the point of the walk was not to be a tourist.
I had fully intended to go back on the Camino this year (2020), but the unthinkable happened and the world entered a state of lock down that for now has no end in sight. The intention was to walk (mostly) different routes this time, because there are a heck of a lot of them.
I didn't want to end when I did, I wasn't ready to back and quite honestly, I'm still not ready to.
## Some Stats, Dates, and Figures
- I walked 2 camino's. The Camino Frances & Camino Portuguese (Porto; More Costal Route + Espiritual Variente)
- I flew from Hamburg to France on the 28th of May 2019
- I started the Camino de Santiago, leaving Saint-Jean-Pied-de-Port on the 31st of May 2019
- I finished the Camino on the 8th July 2019, when I arrived in Santiago de Compostela
- I left the next day for Finisterre
- I arrived in Finisterre on the 11th of July 2019
- I start the Camino Portuguese on the 18th July 2019
- I arrived in Santiago de Compostela on the 31st of July 2019
- I flew back to Hamburg from Porto on the 6th of August 2019 (walking 14km to the airport from Porto)
- I took 3 rest days (3rd, 8th and 23rd of June). The first 2 where not because I actually needed to rest, but because I had the wrong shoes and they where messing my feet up. (which gave me a couple of nasty blisters)
- I bought a new pair of shoes on the evening of the 7th of June, which I then used the rest of the way.
- I sent roughly 2kg of stuff home on the 8th of June, stuff I thought I needed but didn't
Originally I was track my steps / distances using a Fitbit HR and my iPhone 6S. However because of issues charging the HR (connector area broke), I gave up using it on July 6th.
In total I walked at least 1643km. This was a combination of the daily Camino walks, plus any extra after I arrived at my destination.
| Section | Stage Distance Walked | Total walked that stage |
| ------- | -------- | ------- |
| Camino Frances | 793.04km | 972.3km |
| Santiago to Finisterre | 96.16km | 105.9km |
| Camino Portuguese | 299.14km | 402.9km |
| **Totals:** | **1,188.34km** | **1,481.1km** |
The remaining 160km was days walking around Finisterre, Muxia, Santiago and Porto.
## Photos
Over the next little while I am going to post photos from my journey, more than I did at the time on Instagram (which had a limit of 10 per post).
I'll try and add context to them, and a bit about where they where taken.
Anyway, enough for now. I intend, body willing, to locally repeat the Camino distances over the next 2 months.

View File

@ -2,6 +2,8 @@
title: Cash Register Challenge on freeCodeCamp
tags: [webdev, javascript, freecodecamp]
category: programming
eleventyExcludeFromCollections: true
layout: single
---
I've been (slowly) working through the JavaScript module on [freeCodeCamp](https://freecodecamp.org) for a while now, and have recently been doing the certificate challenges. The last of which is the "Cash Register" challenge where you are to write a function that takes a price, a payment amount and an array that contains the cash in the drawer.
@ -35,10 +37,10 @@ Example of the cash in drawer array:
]
```
Sample input to function,
Sample input to function,
```javascript
checkCashRegister(3.26, 100, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.1], ["QUARTER", 4.25], ["ONE", 90], ["FIVE", 55], ["TEN", 20], ["TWENTY", 60], ["ONE HUNDRED", 100]])
checkCashRegister(3.26, 100, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.1], ["QUARTER", 4.25], ["ONE", 90], ["FIVE", 55], ["TEN", 20], ["TWENTY", 60], ["ONE HUNDRED", 100]])
```
and the expected return object

View File

@ -2,6 +2,7 @@
title: CSS Properties, or I have a problem.
tags: [webdev, css]
category: programming
eleventyExcludeFromCollections: true
---

View File

@ -2,6 +2,7 @@
title: What happens when I finish a Frontend Mentor Challenge
tags: [webdev, site, frontendmentor]
category: [programming, webdev]
eleventyExcludeFromCollections: true
---
I've been doing challenges from [Frontend Mentor](https://frontendmentor.io) as a means to practice frontend web development. Specifically working with plain HTML, CSS and JavaScript.

View File

@ -2,9 +2,11 @@
title: Filtering
tags: [webdev, javascript]
category: programming
eleventyExcludeFromCollections: true
---
I was watching the video [How To Create A Search Bar In JavaScript](https://www.youtube.com/watch?v=TlP5WIxVirU) by [Web Dev Simplified](https://www.youtube.com/channel/UCFbNIlppjAuEX4znoulh0Cw) to learn how to do a search bar in JavaScript.
I was watching the video [How To Create A Search Bar In JavaScript](https://www.youtube.com/watch?v=TlP5WIxVirU) by [Web Dev Simplified](https://www.youtube.com/channel/UCFbNIlppjAuEX4znoulh0Cw) to learn how to do a search bar in JavaScript.
What I realised as I was coding along, was that the video was reallymore about filtering data than what I might think of as a search bar. Which is fine, and totally not wrong, but I do find some of Kyle's choices suspect / curious.

View File

@ -1,4 +1,5 @@
---
layout: single
title: pretty-terminal-configs
eleventyExcludeFromCollections: true
---

View File

@ -6,6 +6,7 @@ share: true
related: true
title: 'Superheroes'
tag: [Movies, TV, Comics]
eleventyExcludeFromCollections: true
---
Test

View File

@ -6,6 +6,7 @@ tags:
- swift
- coding-challenges
category: coding-challenges
eleventyExcludeFromCollections: true
---
# Challenge 3

View File

@ -7,6 +7,7 @@ related: true
title: SwiftUI
tags: [swiftui,programming,ios, swift]
category: Programming
eleventyExcludeFromCollections: true
---
Its been a long while since I sat and did programming, but between a life situation and the new technology from Apple for creating user interfaces (SwiftUI), I've been inspired to pickup again an idea I've been kicking around for 10 years.
@ -42,7 +43,7 @@ print_hi('Tom')
#=> prints 'Hi, Tom' to STDOUT.
```
Bash:
Bash:
```bash
#!/usr/bin/env bash
@ -103,13 +104,13 @@ regexp = /[abc]/
# This is a comment
class Person
attr_accessor :name
def initialize(attributes = {})
@name = attributes[:name]
end
def self.greet
"hello"
end
@ -178,7 +179,7 @@ $(document).ready(function() {
}
```
<p>notice</p>{: .notice}
<p>notice</p>{: .notice}
<p>primary</p>{: .notice--primary}
<p>info</p>{: .notice--info}
<p>warning</p>{: .notice--warning}

View File

@ -4,12 +4,14 @@ title: terminal-colors
tags:
- programming
category: programming
eleventyExcludeFromCollections: true
---
Color ... I have a problem ...
Or Colour if you're from the UK and associated territories.
Or Colour if you're from the UK and associated territories.
Seriously, I legitimately have a problem. I need color when I am working with source code, the terminal or when I am reading computer books (like images, or source code).

View File

@ -2,6 +2,7 @@
title: Writeup
tags: [camino,caminodesantiago,jakobsweg,life]
category: personal
eleventyExcludeFromCollections: true
---
Its been a long while since I posted. I fell behind on my Camino posts, although I continued to take notes for a while, before I ended up giving up on those too.

View File

@ -1,13 +1,13 @@
{% if post.header.teaser %}
{% capture teaser %}{{ post.header.teaser }}{% endcapture %}
{% if include.aPost.data.title.header.teaser %}
{% capture teaser %}{{ include.aPost.data.title.header.teaser }}{% endcapture %}
{% else %}
{% assign teaser = site.teaser %}
{% endif %}
{% if post.id %}
{% assign title = post.title | markdownify | remove: "<p>" | remove: "</p>" %}
{% if include.aPost.data.id %}
{% assign title = include.aPost.data.title | markdownify | remove: "<p>" | remove: "</p>" %}
{% else %}
{% assign title = post.title %}
{% assign title = include.aPost.data.title %}
{% endif %}
<div class="{{ include.type | default: 'list' }}__item">
@ -18,13 +18,22 @@
</div>
{% endif %}
<h2 class="archive__item-title no_toc" itemprop="headline">
{% if post.link %}
<a href="{{ post.link }}">{{ title }}</a> <a href="{{ post.url | relative_url }}" rel="permalink"><i class="fas fa-link" aria-hidden="true" title="permalink"></i><span class="sr-only">Permalink</span></a>
{% if include.aPost.data.link %}
<a href="{{ include.aPost.data.link }}">{{ title }}</a> <a href="{{ include.aPost.data.page.url | relative_url }}" rel="permalink"><i class="fas fa-link" aria-hidden="true" title="permalink"></i><span class="sr-only">Permalink</span></a>
{% else %}
<a href="{{ post.url | relative_url }}" rel="permalink">{{ title }}</a>
<a href="{{ include.aPost.data.page.url | relative_url }}" rel="permalink">{{ title }}</a>
{% endif %}
</h2>
{% include page__meta.html type=include.type %}
{% if post.excerpt %}<p class="archive__item-excerpt" itemprop="description">{{ post.excerpt | markdownify | strip_html | truncate: 160 }}</p>{% endif %}
<!-- RMCG consider removing truncate from first 2 where we've explicitly provided a excerpt -->
{% include page__meta.html type=include.type content=include.aPost.data.content %}
{% if include.aPost.data.page.excerpt %}
<p class="archive__item-excerpt" itemprop="description">{{ include.aPost.data.page.excerpt | markdownify | strip_html | truncate: 160 }}</p>
{% elsif include.aPost.data.excerpt %}
<p class="archive__item-excerpt" itemprop="description">{{ include.aPost.data.excerpt | markdownify | strip_html | truncate: 160 }}</p>
{% else %}
<!-- RMCG - Result of this isn't perfect but it works, so now all posts show an excerpt of sorts -->
<p class="archive__item-excerpt" itemprop="description">{{ include.aPost.template._frontMatter.content strip_html | markdownify | truncate: 160 }}</p>
{% endif %}
</article>
</div>

View File

@ -29,7 +29,7 @@
</div>
<div class="author__urls-wrapper">
<button class="btn btn--inverse">{{ site.data.ui-text[site.locale].follow_label | remove: ":" | default: "Follow" }}</button>
<button class="btn btn--inverse">{{ ui-text[site.locale].follow_label | remove: ":" | default: "Follow" }}</button>
<ul class="author__urls social-icons">
{% if author.location %}
<li itemprop="homeLocation" itemscope itemtype="https://schema.org/Place">
@ -48,7 +48,7 @@
{% if author.uri %}
<li>
<a href="{{ author.uri }}" itemprop="url">
<i class="fas fa-fw fa-link" aria-hidden="true"></i><span class="label">{{ site.data.ui-text[site.locale].website_label | default: "Website" }}</span>
<i class="fas fa-fw fa-link" aria-hidden="true"></i><span class="label">{{ ui-text[site.locale].website_label | default: "Website" }}</span>
</a>
</li>
{% endif %}
@ -57,7 +57,7 @@
<li>
<a href="mailto:{{ author.email }}">
<meta itemprop="email" content="{{ author.email }}" />
<i class="fas fa-fw fa-envelope-square" aria-hidden="true"></i><span class="label">{{ site.data.ui-text[site.locale].email_label | default: "Email" }}</span>
<i class="fas fa-fw fa-envelope-square" aria-hidden="true"></i><span class="label">{{ ui-text[site.locale].email_label | default: "Email" }}</span>
</a>
</li>
{% endif %}
@ -241,7 +241,7 @@
{% if author.vine %}
<li>
<a href="https://vine.co/u/{{ author.vine }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
<i class="fab fa-fw fa-vine" aria-hidden="true"></i><span class="label">{{ site.data.ui-text[site.locale].email_label | default: "Email" }}</span>
<i class="fab fa-fw fa-vine" aria-hidden="true"></i><span class="label">{{ ui-text[site.locale].email_label | default: "Email" }}</span>
</a>
</li>
{% endif %}

View File

@ -19,10 +19,10 @@
{% for crumb in crumbs offset: 1 %}
{% if forloop.first %}
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a href="{{ site.url }}{{ site.baseurl }}/" itemprop="item"><span itemprop="name">{{ site.data.ui-text[site.locale].breadcrumb_home_label | default: "Home" }}</span></a>
<a href="{{ site.url }}{{ site.baseurl }}/" itemprop="item"><span itemprop="name">{{ ui-text[site.locale].breadcrumb_home_label | default: "Home" }}</span></a>
<meta itemprop="position" content="{{ i }}" />
</li>
<span class="sep">{{ site.data.ui-text[site.locale].breadcrumb_separator | default: "/" }}</span>
<span class="sep">{{ ui-text[site.locale].breadcrumb_separator | default: "/" }}</span>
{% endif %}
{% if forloop.last %}
<li class="current">{{ page.title }}</li>
@ -32,7 +32,7 @@
<a href="{{ crumb | downcase | replace: '%20', '-' | prepend: path_type | prepend: crumb_path | relative_url }}" itemprop="item"><span itemprop="name">{{ crumb | replace: '-', ' ' | replace: '%20', ' ' | capitalize }}</span></a>
<meta itemprop="position" content="{{ i }}" />
</li>
<span class="sep">{{ site.data.ui-text[site.locale].breadcrumb_separator | default: "/" }}</span>
<span class="sep">{{ ui-text[site.locale].breadcrumb_separator | default: "/" }}</span>
{% endif %}
{% endfor %}
</ol>

View File

@ -9,7 +9,7 @@
{% assign categories_sorted = page.categories | sort_natural %}
<p class="page__taxonomy">
<strong><i class="fas fa-fw fa-folder-open" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].categories_label | default: "Categories:" }} </strong>
<strong><i class="fas fa-fw fa-folder-open" aria-hidden="true"></i> {{ ui-text[site.locale].categories_label | default: "Categories:" }} </strong>
<span itemprop="keywords">
{% for category_word in categories_sorted %}
<a href="{{ category_word | slugify | prepend: path_type | prepend: site.category_archive.path | relative_url }}" class="page__taxonomy-item" rel="tag">{{ category_word }}</a>{% unless forloop.last %}<span class="sep">, </span>{% endunless %}

View File

@ -5,7 +5,7 @@
var form = this;
$(form).addClass('disabled');
$('#comment-form-submit').html('<i class="fas fa-spinner fa-spin fa-fw"></i> {{ site.data.ui-text[site.locale].loading_label | default: "Loading..." }}');
$('#comment-form-submit').html('<i class="fas fa-spinner fa-spin fa-fw"></i> {{ ui-text[site.locale].loading_label | default: "Loading..." }}');
$.ajax({
type: $(this).attr('method'),
@ -13,17 +13,17 @@
data: $(this).serialize(),
contentType: 'application/x-www-form-urlencoded',
success: function (data) {
$('#comment-form-submit').html('{{ site.data.ui-text[site.locale].comment_btn_submitted | default: "Submitted" }}');
$('#comment-form-submit').html('{{ ui-text[site.locale].comment_btn_submitted | default: "Submitted" }}');
$('.page__comments-form .js-notice').removeClass('notice--danger');
$('.page__comments-form .js-notice').addClass('notice--success');
showAlert('{{ site.data.ui-text[site.locale].comment_success_msg | default: "Thanks for your comment! It will show on the site once it has been approved." }}');
showAlert('{{ ui-text[site.locale].comment_success_msg | default: "Thanks for your comment! It will show on the site once it has been approved." }}');
},
error: function (err) {
console.log(err);
$('#comment-form-submit').html('{{ site.data.ui-text[site.locale].comment_btn_submit | default: "Submit Comment" }}');
$('#comment-form-submit').html('{{ ui-text[site.locale].comment_btn_submit | default: "Submit Comment" }}');
$('.page__comments-form .js-notice').removeClass('notice--success');
$('.page__comments-form .js-notice').addClass('notice--danger');
showAlert('{{ site.data.ui-text[site.locale].comment_error_msg | default: "Sorry, there was an error with your submission. Please make sure all required fields have been completed and try again." }}');
showAlert('{{ ui-text[site.locale].comment_error_msg | default: "Sorry, there was an error with your submission. Please make sure all required fields have been completed and try again." }}');
$(form).removeClass('disabled');
}
});

View File

@ -5,7 +5,7 @@
var form = this;
$(form).addClass('disabled');
$('#comment-form-submit').html('<i class="fas fa-spinner fa-spin fa-fw"></i> {{ site.data.ui-text[site.locale].loading_label | default: "Loading..." }}');
$('#comment-form-submit').html('<i class="fas fa-spinner fa-spin fa-fw"></i> {{ ui-text[site.locale].loading_label | default: "Loading..." }}');
$.ajax({
type: $(this).attr('method'),
@ -13,17 +13,17 @@
data: $(this).serialize(),
contentType: 'application/x-www-form-urlencoded',
success: function (data) {
$('#comment-form-submit').html('{{ site.data.ui-text[site.locale].comment_btn_submitted | default: "Submitted" }}');
$('#comment-form-submit').html('{{ ui-text[site.locale].comment_btn_submitted | default: "Submitted" }}');
$('.page__comments-form .js-notice').removeClass('notice--danger');
$('.page__comments-form .js-notice').addClass('notice--success');
showAlert('{{ site.data.ui-text[site.locale].comment_success_msg | default: "Thanks for your comment! It will show on the site once it has been approved." }}');
showAlert('{{ ui-text[site.locale].comment_success_msg | default: "Thanks for your comment! It will show on the site once it has been approved." }}');
},
error: function (err) {
console.log(err);
$('#comment-form-submit').html('{{ site.data.ui-text[site.locale].comment_btn_submit | default: "Submit Comment" }}');
$('#comment-form-submit').html('{{ ui-text[site.locale].comment_btn_submit | default: "Submit Comment" }}');
$('.page__comments-form .js-notice').removeClass('notice--success');
$('.page__comments-form .js-notice').addClass('notice--danger');
showAlert('{{ site.data.ui-text[site.locale].comment_error_msg | default: "Sorry, there was an error with your submission. Please make sure all required fields have been completed and try again." }}');
showAlert('{{ ui-text[site.locale].comment_error_msg | default: "Sorry, there was an error with your submission. Please make sure all required fields have been completed and try again." }}');
$(form).removeClass('disabled');
}
});

View File

@ -1,5 +1,5 @@
<div class="page__comments">
{% capture comments_label %}{{ site.data.ui-text[site.locale].comments_label | default: "Comments" }}{% endcapture %}
{% capture comments_label %}{{ ui-text[site.locale].comments_label | default: "Comments" }}{% endcapture %}
{% case site.comments.provider %}
{% when "discourse" %}
<h4 class="page__comments-title">{{ comments_label }}</h4>
@ -16,7 +16,7 @@
<!-- Start static comments -->
<div class="js-comments">
{% if site.data.comments[page.slug] %}
<h4 class="page__comments-title">{{ site.data.ui-text[site.locale].comments_title | default: "Comments" }}</h4>
<h4 class="page__comments-title">{{ ui-text[site.locale].comments_title | default: "Comments" }}</h4>
{% assign comments = site.data.comments[page.slug] | sort %}
{% for comment in comments %}
@ -33,29 +33,29 @@
<!-- Start new comment form -->
<div class="page__comments-form">
<h4 class="page__comments-title">{{ site.data.ui-text[site.locale].comments_label | default: "Leave a Comment" }}</h4>
<p class="small">{{ site.data.ui-text[site.locale].comment_form_info | default: "Your email address will not be published. Required fields are marked" }} <span class="required">*</span></p>
<h4 class="page__comments-title">{{ ui-text[site.locale].comments_label | default: "Leave a Comment" }}</h4>
<p class="small">{{ ui-text[site.locale].comment_form_info | default: "Your email address will not be published. Required fields are marked" }} <span class="required">*</span></p>
<form id="new_comment" class="page__comments-form js-form form" method="post" action="{{ site.comments.staticman.endpoint }}{{ site.repository }}/{{ site.comments.staticman.branch }}/comments">
<div class="form__spinner">
<i class="fas fa-spinner fa-spin fa-3x fa-fw"></i>
<span class="sr-only">{{ site.data.ui-text[site.locale].loading_label | default: "Loading..." }}</span>
<span class="sr-only">{{ ui-text[site.locale].loading_label | default: "Loading..." }}</span>
</div>
<div class="form-group">
<label for="comment-form-message">{{ site.data.ui-text[site.locale].comment_form_comment_label | default: "Comment" }} <small class="required">*</small></label>
<label for="comment-form-message">{{ ui-text[site.locale].comment_form_comment_label | default: "Comment" }} <small class="required">*</small></label>
<textarea type="text" rows="3" id="comment-form-message" name="fields[message]" tabindex="1"></textarea>
<div class="small help-block"><a href="https://daringfireball.net/projects/markdown/">{{ site.data.ui-text[site.locale].comment_form_md_info | default: "Markdown is supported." }}</a></div>
<div class="small help-block"><a href="https://daringfireball.net/projects/markdown/">{{ ui-text[site.locale].comment_form_md_info | default: "Markdown is supported." }}</a></div>
</div>
<div class="form-group">
<label for="comment-form-name">{{ site.data.ui-text[site.locale].comment_form_name_label | default: "Name" }} <small class="required">*</small></label>
<label for="comment-form-name">{{ ui-text[site.locale].comment_form_name_label | default: "Name" }} <small class="required">*</small></label>
<input type="text" id="comment-form-name" name="fields[name]" tabindex="2" />
</div>
<div class="form-group">
<label for="comment-form-email">{{ site.data.ui-text[site.locale].comment_form_email_label | default: "Email address" }} <small class="required">*</small></label>
<label for="comment-form-email">{{ ui-text[site.locale].comment_form_email_label | default: "Email address" }} <small class="required">*</small></label>
<input type="email" id="comment-form-email" name="fields[email]" tabindex="3" />
</div>
<div class="form-group">
<label for="comment-form-url">{{ site.data.ui-text[site.locale].comment_form_website_label | default: "Website (optional)" }}</label>
<label for="comment-form-url">{{ ui-text[site.locale].comment_form_website_label | default: "Website (optional)" }}</label>
<input type="url" id="comment-form-url" name="fields[url]" tabindex="4"/>
</div>
<div class="form-group hidden" style="display: none;">
@ -76,7 +76,7 @@
</div>
{% endif %}
<div class="form-group">
<button type="submit" id="comment-form-submit" tabindex="5" class="btn btn--primary btn--large">{{ site.data.ui-text[site.locale].comment_btn_submit | default: "Submit Comment" }}</button>
<button type="submit" id="comment-form-submit" tabindex="5" class="btn btn--primary btn--large">{{ ui-text[site.locale].comment_btn_submit | default: "Submit Comment" }}</button>
</div>
</form>
</div>
@ -90,7 +90,7 @@
<!-- Start static comments -->
<div class="js-comments">
{% if site.data.comments[page.slug] %}
<h4 class="page__comments-title">{{ site.data.ui-text[site.locale].comments_title | default: "Comments" }}</h4>
<h4 class="page__comments-title">{{ ui-text[site.locale].comments_title | default: "Comments" }}</h4>
{% assign comments = site.data.comments[page.slug] | sort %}
{% for comment in comments %}
@ -107,29 +107,29 @@
<!-- Start new comment form -->
<div class="page__comments-form">
<h4 class="page__comments-title">{{ site.data.ui-text[site.locale].comments_label | default: "Leave a Comment" }}</h4>
<p class="small">{{ site.data.ui-text[site.locale].comment_form_info | default: "Your email address will not be published. Required fields are marked" }} <span class="required">*</span></p>
<h4 class="page__comments-title">{{ ui-text[site.locale].comments_label | default: "Leave a Comment" }}</h4>
<p class="small">{{ ui-text[site.locale].comment_form_info | default: "Your email address will not be published. Required fields are marked" }} <span class="required">*</span></p>
<form id="new_comment" class="page__comments-form js-form form" method="post" action="https://api.staticman.net/v1/entry/{{ site.repository }}/{{ site.staticman.branch }}">
<div class="form__spinner">
<i class="fas fa-spinner fa-spin fa-3x fa-fw"></i>
<span class="sr-only">{{ site.data.ui-text[site.locale].loading_label | default: "Loading..." }}</span>
<span class="sr-only">{{ ui-text[site.locale].loading_label | default: "Loading..." }}</span>
</div>
<div class="form-group">
<label for="comment-form-message">{{ site.data.ui-text[site.locale].comment_form_comment_label | default: "Comment" }} <small class="required">*</small></label>
<label for="comment-form-message">{{ ui-text[site.locale].comment_form_comment_label | default: "Comment" }} <small class="required">*</small></label>
<textarea type="text" rows="3" id="comment-form-message" name="fields[message]" tabindex="1"></textarea>
<div class="small help-block"><a href="https://daringfireball.net/projects/markdown/">{{ site.data.ui-text[site.locale].comment_form_md_info | default: "Markdown is supported." }}</a></div>
<div class="small help-block"><a href="https://daringfireball.net/projects/markdown/">{{ ui-text[site.locale].comment_form_md_info | default: "Markdown is supported." }}</a></div>
</div>
<div class="form-group">
<label for="comment-form-name">{{ site.data.ui-text[site.locale].comment_form_name_label | default: "Name" }} <small class="required">*</small></label>
<label for="comment-form-name">{{ ui-text[site.locale].comment_form_name_label | default: "Name" }} <small class="required">*</small></label>
<input type="text" id="comment-form-name" name="fields[name]" tabindex="2" />
</div>
<div class="form-group">
<label for="comment-form-email">{{ site.data.ui-text[site.locale].comment_form_email_label | default: "Email address" }} <small class="required">*</small></label>
<label for="comment-form-email">{{ ui-text[site.locale].comment_form_email_label | default: "Email address" }} <small class="required">*</small></label>
<input type="email" id="comment-form-email" name="fields[email]" tabindex="3" />
</div>
<div class="form-group">
<label for="comment-form-url">{{ site.data.ui-text[site.locale].comment_form_website_label | default: "Website (optional)" }}</label>
<label for="comment-form-url">{{ ui-text[site.locale].comment_form_website_label | default: "Website (optional)" }}</label>
<input type="url" id="comment-form-url" name="fields[url]" tabindex="4"/>
</div>
<div class="form-group hidden" style="display: none;">
@ -143,7 +143,7 @@
</p>
<!-- End comment form alert messaging -->
<div class="form-group">
<button type="submit" id="comment-form-submit" tabindex="5" class="btn btn--primary btn--large">{{ site.data.ui-text[site.locale].comment_btn_submit | default: "Submit Comment" }}</button>
<button type="submit" id="comment-form-submit" tabindex="5" class="btn btn--primary btn--large">{{ ui-text[site.locale].comment_btn_submit | default: "Submit Comment" }}</button>
</div>
</form>
</div>

View File

@ -31,7 +31,7 @@
{% endif %}
{% if f.url %}
<p><a href="{{ f.url | relative_url }}" class="btn {{ f.btn_class }}">{{ f.btn_label | default: site.data.ui-text[site.locale].more_label | default: "Learn More" }}</a></p>
<p><a href="{{ f.url | relative_url }}" class="btn {{ f.btn_class }}">{{ f.btn_label | default: ui-text[site.locale].more_label | default: "Learn More" }}</a></p>
{% endif %}
</div>
</div>

View File

@ -1,7 +1,7 @@
<div class="page__footer-follow">
<ul class="social-icons">
{% if site.data.ui-text[site.locale].follow_label %}
<li><strong>{{ site.data.ui-text[site.locale].follow_label }}</strong></li>
{% if ui-text[site.locale].follow_label %}
<li><strong>{{ ui-text[site.locale].follow_label }}</strong></li>
{% endif %}
{% if site.footer.links %}
@ -13,9 +13,9 @@
{% endif %}
{% unless site.atom_feed.hide %}
<li><a href="{% if site.atom_feed.path %}{{ site.atom_feed.path }}{% else %}{{ '/feed.xml' | relative_url }}{% endif %}"><i class="fas fa-fw fa-rss-square" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].feed_label | default: "Feed" }}</a></li>
<li><a href="{% if site.atom_feed.path %}{{ site.atom_feed.path }}{% else %}{{ '/feed.xml' | relative_url }}{% endif %}"><i class="fas fa-fw fa-rss-square" aria-hidden="true"></i> {{ ui-text[site.locale].feed_label | default: "Feed" }}</a></li>
{% endunless %}
</ul>
</div>
<div class="page__footer-copyright">&copy; {{ site.time | date: '%Y' }} {{ site.name | default: site.title }}. {{ site.data.ui-text[site.locale].powered_by | default: "Powered by" }} <a href="https://jekyllrb.com" rel="nofollow">Jekyll</a> &amp; <a href="https://mademistakes.com/work/minimal-mistakes-jekyll-theme/" rel="nofollow">Minimal Mistakes</a>.</div>
<div class="page__footer-copyright">&copy; {{ site.time | date: '%Y' }} {{ site.name | default: site.title }}. {{ ui-text[site.locale].powered_by | default: "Powered by" }} <a href="https://jekyllrb.com" rel="nofollow">Jekyll</a> &amp; <a href="https://mademistakes.com/work/minimal-mistakes-jekyll-theme/" rel="nofollow">Minimal Mistakes</a>.</div>

View File

@ -15,6 +15,9 @@
<!-- For all browsers -->
<link rel="stylesheet" href="{{ '/assets/css/main.css' | relative_url }}">
<!-- <link href="https://unpkg.com/prismjs@1.20.0/themes/prism-okaidia.css" rel="stylesheet"> -->
<link rel="stylesheet" href="/assets/css/colddark-theme.css">
<link rel="preload" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css"></noscript>

View File

@ -3,13 +3,13 @@ layout: default
author_profile: false
---
{% if page.header.overlay_color or page.header.overlay_image or page.header.image %}
{% if header.overlay_color or header.overlay_image or header.image %}
{% include page__hero.html %}
{% elsif page.header.video.id and page.header.video.provider %}
{% elsif header.video.id and header.video.provider %}
{% include page__hero_video.html %}
{% endif %}
{% if page.url != "/" and site.breadcrumbs %}
{% if url != "/" and site.breadcrumbs %}
{% unless paginator %}
{% include breadcrumbs.html %}
{% endunless %}
@ -19,10 +19,10 @@ author_profile: false
{% include sidebar.html %}
<div class="archive">
{% unless page.header.overlay_color or page.header.overlay_image %}
<h1 id="page-title" class="page__title">{{ page.title }}</h1>
{% unless header.overlay_color or header.overlay_image %}
<h1 id="page-title" class="page__title">{{ title }}</h1>
{% endunless %}
{% for post in page.posts %}
{% for post in posts %}
{% include archive-single.html %}
{% endfor %}
</div>

View File

@ -2,9 +2,9 @@
layout: default
---
{% if page.header.overlay_color or page.header.overlay_image or page.header.image %}
{% if header.overlay_color or header.overlay_image or header.image %}
{% include page__hero.html %}
{% elsif page.header.video.id and page.header.video.provider %}
{% elsif header.video.id and header.video.provider %}
{% include page__hero_video.html %}
{% endif %}
@ -18,8 +18,8 @@ layout: default
{% include sidebar.html %}
<div class="archive">
{% unless page.header.overlay_color or page.header.overlay_image %}
<h1 id="page-title" class="page__title">{{ page.title }}</h1>
{% unless header.overlay_color or header.overlay_image %}
<h1 id="page-title" class="page__title">{{ title }}</h1>
{% endunless %}
{{ content }}
</div>

View File

@ -2,22 +2,20 @@
layout: archive
---
{{ content }}
{% assign categories_max = 0 %}
{% for category in site.categories %}
{% if category[1].size > categories_max %}
{% assign categories_max = category[1].size %}
{% for category in collections.categories %}
{% if collections[category].size > categories_max %}
{% assign categories_max = collections[category].size %}
{% endif %}
{% endfor %}
<ul class="taxonomy__index">
{% for i in (1..categories_max) reversed %}
{% for category in site.categories %}
{% if category[1].size == i %}
{% for category in collections.categories %}
{% if collections[category].size == i %}
<li>
<a href="#{{ category[0] | slugify }}">
<strong>{{ category[0] }}</strong> <span class="taxonomy__count">{{ i }}</span>
<a href="#{{ category | slugify }}">
<strong>{{ category }}</strong> <span class="taxonomy__count">{{ i }}</span>
</a>
</li>
{% endif %}
@ -25,18 +23,18 @@ layout: archive
{% endfor %}
</ul>
{% assign entries_layout = page.entries_layout | default: 'list' %}
{% assign entries_layout = entries_layout | default: 'list' %}
{% for i in (1..categories_max) reversed %}
{% for category in site.categories %}
{% if category[1].size == i %}
<section id="{{ category[0] | slugify | downcase }}" class="taxonomy__section">
<h2 class="archive__subtitle">{{ category[0] }}</h2>
{% for category in collections.categories %}
{% if collections[category].size == i %}
<section id="{{ category | slugify | downcase }}" class="taxonomy__section">
<h2 class="archive__subtitle">{{ category }}</h2>
<div class="entries-{{ entries_layout }}">
{% for post in category.last %}
{% include archive-single.html type=entries_layout %}
{% for post in collections[category] %}
{% include archive-single.html type=entries_layout aPost=post%}
{% endfor %}
</div>
<a href="#page-title" class="back-to-top">{{ site.data.ui-text[site.locale].back_to_top | default: 'Back to Top' }} &uarr;</a>
<a href="#page-title" class="back-to-top">{{ ui-text[site.locale].back_to_top | default: 'Back to Top' }} &uarr;</a>
</section>
{% endif %}
{% endfor %}

View File

@ -14,7 +14,7 @@
{% include head/custom.html %}
</head>
<body class="layout--{{ page.layout | default: layout.layout }}{% if page.classes or layout.classes %}{{ page.classes | default: layout.classes | join: ' ' | prepend: ' ' }}{% endif %}">
<body class="layout--{{ layout | default: site.defaults.posts.layout }}{% if classes or site.defaults.posts.classes %}{{ classes | default: site.defaults.posts.classes | join: ' ' | prepend: ' ' }}{% endif %}">
{% include skip-links.html %}
{% include browser-upgrade.html %}
{% include masthead.html %}

View File

@ -0,0 +1,11 @@
---
layout: archive
---
TEST
{{collections.drafts.size}}
{% for post in collections.drafts %}
{% include archive-single.html type=entries_layout, aPost=post %}
{% endfor %}

View File

@ -7,7 +7,7 @@ paginator:
---
<h3 class="archive__subtitle">{{ site.data.ui-text[site.locale].recent_posts | default: "Recent Posts" }}</h3>
<h3 class="archive__subtitle">{{ ui-text[site.locale].recent_posts | default: "Recent Posts" }}</h3>
{% if paginator %}
{% assign posts = collections.posts %}
@ -18,7 +18,7 @@ paginator:
{% assign entries_layout = page.entries_layout | default: 'list' %}
<div class="entries-{{ entries_layout }}">
{% for post in posts %}
{% include archive-single.html type=entries_layout %}
{% include archive-single.html type=entries_layout aPost=post %}
{% endfor %}
</div>

View File

@ -4,6 +4,10 @@ layout: archive
{{ content }}
{% assign sortedPosts = collections.posts | group_by: "date" %}
{{ sortedPosts | inspect }}
{% comment %}
<ul class="taxonomy__index">
{% assign postsInYear = site.posts | where_exp: "item", "item.hidden != true" | group_by_exp: 'post', 'post.date | date: "%Y"' %}
@ -26,7 +30,7 @@ layout: archive
{% include archive-single.html type=entries_layout %}
{% endfor %}
</div>
<a href="#page-title" class="back-to-top">{{ site.data.ui-text[site.locale].back_to_top | default: 'Back to Top' }} &uarr;</a>
<a href="#page-title" class="back-to-top">{{ ui-text[site.locale].back_to_top | default: 'Back to Top' }} &uarr;</a>
</section>
{% endfor %}
{% endcomment %}
{% endcomment %}

View File

@ -25,11 +25,11 @@ layout: default
{%- assign search_provider = site.search_provider | default: "lunr" -%}
{%- case search_provider -%}
{%- when "lunr" -%}
<input type="text" id="search" class="search-input" placeholder="{{ site.data.ui-text[site.locale].search_placeholder_text | default: 'Enter your search term...' }}" />
<input type="text" id="search" class="search-input" placeholder="{{ ui-text[site.locale].search_placeholder_text | default: 'Enter your search term...' }}" />
<div id="results" class="results"></div>
{%- when "google" -%}
<form onsubmit="return googleCustomSearchExecute();" id="cse-search-box-form-id">
<input type="text" id="cse-search-input-box-id" class="search-input" placeholder="{{ site.data.ui-text[site.locale].search_placeholder_text | default: 'Enter your search term...' }}" />
<input type="text" id="cse-search-input-box-id" class="search-input" placeholder="{{ ui-text[site.locale].search_placeholder_text | default: 'Enter your search term...' }}" />
</form>
<div id="results" class="results">
<gcse:searchresults-only></gcse:searchresults-only>

View File

@ -2,9 +2,9 @@
layout: default
---
{% if page.header.overlay_color or page.header.overlay_image or page.header.image %}
{% if header.overlay_color or header.overlay_image or header.image %}
{% include page__hero.html %}
{% elsif page.header.video.id and page.header.video.provider %}
{% elsif header.video.id and header.video.provider %}
{% include page__hero_video.html %}
{% endif %}
@ -18,54 +18,56 @@ layout: default
{% include sidebar.html %}
<article class="page" itemscope itemtype="https://schema.org/CreativeWork">
{% if page.title %}<meta itemprop="headline" content="{{ page.title | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %}
{% if page.excerpt %}<meta itemprop="description" content="{{ page.excerpt | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %}
{% if page.date %}<meta itemprop="datePublished" content="{{ page.date | date_to_xmlschema }}">{% endif %}
{% if page.last_modified_at %}<meta itemprop="dateModified" content="{{ page.last_modified_at | date_to_xmlschema }}">{% endif %}
{% if title %}<meta itemprop="headline" content="{{ title | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %}
{% if excerpt %}<meta itemprop="description" content="{{ excerpt | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %}
{% if date %}<meta itemprop="datePublished" content="{{ date | date_to_xmlschema }}">{% endif %}
{% if last_modified_at %}<meta itemprop="dateModified" content="{{ last_modified_at | date_to_xmlschema }}">{% endif %}
<div class="page__inner-wrap">
{% unless page.header.overlay_color or page.header.overlay_image %}
{% unless header.overlay_color or header.overlay_image %}
<header>
{% if page.title %}<h1 id="page-title" class="page__title" itemprop="headline">{{ page.title | markdownify | remove: "<p>" | remove: "</p>" }}</h1>{% endif %}
{% if title %}<h1 id="page-title" class="page__title" itemprop="headline">{{ title | markdownify | remove: "<p>" | remove: "</p>" }}</h1>{% endif %}
{% include page__meta.html %}
</header>
{% endunless %}
<section class="page__content" itemprop="text">
{% if page.toc %}
<aside class="sidebar__right {% if page.toc_sticky %}sticky{% endif %}">
{% if toc %}
<aside class="sidebar__right {% if toc_sticky %}sticky{% endif %}">
<nav class="toc">
<header><h4 class="nav__title"><i class="fas fa-{{ page.toc_icon | default: 'file-alt' }}"></i> {{ page.toc_label | default: site.data.ui-text[site.locale].toc_label | default: "On this page" }}</h4></header>
<header><h4 class="nav__title"><i class="fas fa-{{ page.toc_icon | default: 'file-alt' }}"></i> {{ toc_label | default: ui-text[site.locale].toc_label | default: "On this page" }}</h4></header>
{% include toc.html sanitize=true html=content h_min=1 h_max=6 class="toc__menu" %}
</nav>
</aside>
{% endif %}
{{ content }}
{% if page.link %}<div><a href="{{ page.link }}" class="btn btn--primary">{{ site.data.ui-text[site.locale].ext_link_label | default: "Direct Link" }}</a></div>{% endif %}
{% if page.link %}<div><a href="{{ page.link }}" class="btn btn--primary">{{ ui-text[site.locale].ext_link_label | default: "Direct Link" }}</a></div>{% endif %}
</section>
<footer class="page__meta">
{% if site.data.ui-text[site.locale].meta_label %}
<h4 class="page__meta-title">{{ site.data.ui-text[site.locale].meta_label }}</h4>
{% if ui-text[site.locale].meta_label %}
<h4 class="page__meta-title">{{ ui-text[site.locale].meta_label }}</h4>
{% endif %}
{% include page__taxonomy.html %}
{% include page__date.html %}
</footer>
{% if page.share %}{% include social-share.html %}{% endif %}
{% include post_pagination.html %}
{% if share or site.defaults.posts.share %}{% include social-share.html %}{% endif %}
{% include post_pagination.html siblings=siblings %}
</div>
{% if jekyll.environment == 'production' and site.comments.provider and page.comments %}
{% comment %}
{% if environment == 'production' and site.comments.provider and comments or site.defaults.post.comments %}
{% endcomment %}
{% if site.comments.provider and comments or site.defaults.posts.comments %}
{% include comments.html %}
{% endif %}
</article>
{% comment %}<!-- only show related on a post page when `related: true` -->{% endcomment %}
{% if page.id and page.related and site.related_posts.size > 0 %}
{% if id and related and site.related_posts.size > 0 %}
<div class="page__related">
<h4 class="page__related-title">{{ site.data.ui-text[site.locale].related_label | default: "You May Also Enjoy" }}</h4>
<h4 class="page__related-title">{{ ui-text[site.locale].related_label | default: "You May Also Enjoy" }}</h4>
<div class="grid__wrapper">
{% for post in site.related_posts limit:4 %}
{% include archive-single.html type="grid" %}
@ -73,11 +75,11 @@ layout: default
</div>
</div>
{% comment %}<!-- otherwise show recent posts if no related when `related: true` -->{% endcomment %}
{% elsif page.id and page.related %}
{% elsif id and related %}
<div class="page__related">
<h4 class="page__related-title">{{ site.data.ui-text[site.locale].related_label | default: "You May Also Enjoy" }}</h4>
<h4 class="page__related-title">{{ ui-text[site.locale].related_label | default: "You May Also Enjoy" }}</h4>
<div class="grid__wrapper">
{% for post in site.posts limit:4 %}
{% for post in collections.posts limit:4 %}
{% if post.id == page.id %}
{% continue %}
{% endif %}

View File

@ -2,15 +2,15 @@
layout: default
---
{% if page.header.overlay_color or page.header.overlay_image or page.header.image %}
{% if header.overlay_color or header.overlay_image or header.image %}
{% include page__hero.html %}
{% elsif page.header.video.id and page.header.video.provider %}
{% elsif header.video.id and header.video.provider %}
{% include page__hero_video.html %}
{% endif %}
<div id="main" role="main">
<article class="splash" itemscope itemtype="https://schema.org/CreativeWork">
{% if page.title %}<meta itemprop="headline" content="{{ page.title | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %}
{% if title %}<meta itemprop="headline" content="{{ title | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %}
{% if page.excerpt %}<meta itemprop="description" content="{{ page.excerpt | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %}
{% if page.date %}<meta itemprop="datePublished" content="{{ page.date | date_to_xmlschema }}">{% endif %}
{% if page.last_modified_at %}<meta itemprop="dateModified" content="{{ page.last_modified_at | date_to_xmlschema }}">{% endif %}

View File

@ -5,19 +5,21 @@ layout: archive
{{ content }}
{% assign tags_max = 0 %}
{% for tag in site.tags %}
{% if tag[1].size > tags_max %}
{% assign tags_max = tag[1].size %}
{% for tag in collections.tags %}
{% if collections[tag].size > tags_max %}
{% assign tags_max = collections[tag].size %}
{% endif %}
{% endfor %}
<ul class="taxonomy__index">
{% for i in (1..tags_max) reversed %}
{% for tag in site.tags %}
{% if tag[1].size == i %}
{% for tag in collections.tags %}
{% if collections[tag].size == i %}
<li>
<a href="#{{ tag[0] | slugify }}">
<strong>{{ tag[0] }}</strong> <span class="taxonomy__count">{{ i }}</span>
<a href="#{{ tag | slugify }}">
<strong>{{ tag }}</strong> <span class="taxonomy__count">{{ i }}</span>
</a>
</li>
{% endif %}
@ -27,16 +29,16 @@ layout: archive
{% assign entries_layout = page.entries_layout | default: 'list' %}
{% for i in (1..tags_max) reversed %}
{% for tag in site.tags %}
{% if tag[1].size == i %}
<section id="{{ tag[0] | slugify | downcase }}" class="taxonomy__section">
<h2 class="archive__subtitle">{{ tag[0] }}</h2>
{% for tag in collections.tags %}
{% if collections[tag].size == i %}
<section id="{{ tag | slugify | downcase }}" class="taxonomy__section">
<h2 class="archive__subtitle">{{ tag }}</h2>
<div class="entries-{{ entries_layout }}">
{% for post in tag.last %}
{% include archive-single.html type=entries_layout %}
{% for post in collections[tag] %}
{% include archive-single.html type=entries_layout, aPost=post %}
{% endfor %}
</div>
<a href="#page-title" class="back-to-top">{{ site.data.ui-text[site.locale].back_to_top | default: 'Back to Top' }} &uarr;</a>
<a href="#page-title" class="back-to-top">{{ ui-text[site.locale].back_to_top | default: 'Back to Top' }} &uarr;</a>
</section>
{% endif %}
{% endfor %}

View File

@ -12,7 +12,7 @@
{% if site.subtitle %}<span class="site-subtitle">{{ site.subtitle }}</span>{% endif %}
</a>
<ul class="visible-links">
{%- for link in site.data.navigation.main -%}
{%- for link in navigation.main -%}
<li class="masthead__menu-item">
<a href="{{ link.url | relative_url }}"{% if link.description %} title="{{ link.description }}"{% endif %}>{{ link.title }}</a>
</li>
@ -20,12 +20,12 @@
</ul>
{% if site.search == true %}
<button class="search__toggle" type="button">
<span class="visually-hidden">{{ site.data.ui-text[site.locale].search_label | default: "Toggle search" }}</span>
<span class="visually-hidden">{{ ui-text[site.locale].search_label | default: "Toggle search" }}</span>
<i class="fas fa-search"></i>
</button>
{% endif %}
<button class="greedy-nav__toggle hidden" type="button">
<span class="visually-hidden">{{ site.data.ui-text[site.locale].menu_label | default: "Toggle menu" }}</span>
<span class="visually-hidden">{{ ui-text[site.locale].menu_label | default: "Toggle menu" }}</span>
<div class="navicon"></div>
</button>
<ul class="hidden-links hidden"></ul>

View File

@ -3,7 +3,7 @@
<nav class="nav__list">
{% if page.sidebar.title %}<h3 class="nav__title" style="padding-left: 0;">{{ page.sidebar.title }}</h3>{% endif %}
<input id="ac-toc" name="accordion-toc" type="checkbox" />
<label for="ac-toc">{{ site.data.ui-text[site.locale].menu_label | default: "Toggle Menu" }}</label>
<label for="ac-toc">{{ ui-text[site.locale].menu_label | default: "Toggle Menu" }}</label>
<ul class="nav__items">
{% for nav in navigation %}
<li>

View File

@ -1,6 +1,7 @@
{% assign date_format = site.date_format | default: "%B %-d, %Y" %}
{% if page.last_modified_at %}
<p class="page__date"><strong><i class="fas fa-fw fa-calendar-alt" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].date_label | default: "Updated:" }}</strong> <time datetime="{{ page.last_modified_at | date: "%Y-%m-%d" }}">{{ page.last_modified_at | date: date_format }}</time></p>
{% elsif page.date %}
<p class="page__date"><strong><i class="fas fa-fw fa-calendar-alt" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].date_label | default: "Updated:" }}</strong> <time datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: date_format }}</time></p>
{% assign date_format = site.date_format | default: "dddd, LL" %}
{% if date %}
<p class="page__date"><strong><i class="fas fa-fw fa-calendar-alt" aria-hidden="true"></i> {{ ui-text[site.locale].date_posted | default: "Posted:" }}</strong> <time datetime="{{ date | date_to_xmlschema }}">{{ date | date: date_format }}</time></p>
{% endif %}
{% if last_modified %}
<p class="page__date"><strong><i class="fas fa-fw fa-calendar-alt" aria-hidden="true"></i> {{ ui-text[site.locale].date_label | default: "Updated:" }}</strong> <time datetime="{{ page.last_modified_at | date: "Y-M-D" }}">{{ last_modified | date: date_format }}</time></p>
{% endif %}

View File

@ -1,55 +1,55 @@
{% capture overlay_img_path %}{{ page.header.overlay_image | relative_url }}{% endcapture %}
{% capture overlay_img_path %}{{ header.overlay_image | relative_url }}{% endcapture %}
{% if page.header.overlay_filter contains "gradient" %}
{% capture overlay_filter %}{{ page.header.overlay_filter }}{% endcapture %}
{% elsif page.header.overlay_filter contains "rgba" %}
{% capture overlay_filter %}{{ page.header.overlay_filter }}{% endcapture %}
{% if header.overlay_filter contains "gradient" %}
{% capture overlay_filter %}{{ header.overlay_filter }}{% endcapture %}
{% elsif header.overlay_filter contains "rgba" %}
{% capture overlay_filter %}{{ header.overlay_filter }}{% endcapture %}
{% capture overlay_filter %}linear-gradient({{ overlay_filter }}, {{ overlay_filter }}){% endcapture %}
{% elsif page.header.overlay_filter %}
{% capture overlay_filter %}rgba(0, 0, 0, {{ page.header.overlay_filter }}){% endcapture %}
{% elsif header.overlay_filter %}
{% capture overlay_filter %}rgba(0, 0, 0, {{ header.overlay_filter }}){% endcapture %}
{% capture overlay_filter %}linear-gradient({{ overlay_filter }}, {{ overlay_filter }}){% endcapture %}
{% endif %}
{% if page.header.image_description %}
{% assign image_description = page.header.image_description %}
{% if header.image_description %}
{% assign image_description = header.image_description %}
{% else %}
{% assign image_description = page.title %}
{% assign image_description = title %}
{% endif %}
{% assign image_description = image_description | markdownify | strip_html | strip_newlines | escape_once %}
<div class="page__hero{% if page.header.overlay_color or page.header.overlay_image %}--overlay{% endif %}"
style="{% if page.header.overlay_color %}background-color: {{ page.header.overlay_color | default: 'transparent' }};{% endif %} {% if overlay_img_path %}background-image: {% if overlay_filter %}{{ overlay_filter }}, {% endif %}url('{{ overlay_img_path }}');{% endif %}"
<div class="page__hero{% if header.overlay_color or header.overlay_image %}--overlay{% endif %}"
style="{% if header.overlay_color %}background-color: {{ header.overlay_color | default: 'transparent' }};{% endif %} {% if overlay_img_path %}background-image: {% if overlay_filter %}{{ overlay_filter }}, {% endif %}url('{{ overlay_img_path }}');{% endif %}"
>
{% if page.header.overlay_color or page.header.overlay_image %}
{% if header.overlay_color or header.overlay_image %}
<div class="wrapper">
<h1 id="page-title" class="page__title" itemprop="headline">
{% if paginator and site.paginate_show_page_num %}
{{ site.title }}{% unless paginator.page == 1 %} {{ site.data.ui-text[site.locale].page | default: "Page" }} {{ paginator.page }}{% endunless %}
{{ site.title }}{% unless paginator.page == 1 %} {{ ui-text[site.locale].page | default: "Page" }} {{ paginator.page }}{% endunless %}
{% else %}
{{ page.title | default: site.title | markdownify | remove: "<p>" | remove: "</p>" }}
{{ title | default: site.title | markdownify | remove: "<p>" | remove: "</p>" }}
{% endif %}
</h1>
{% if page.tagline %}
<p class="page__lead">{{ page.tagline | markdownify | remove: "<p>" | remove: "</p>" }}</p>
{% elsif page.header.show_overlay_excerpt != false and page.excerpt %}
<p class="page__lead">{{ page.excerpt | markdownify | remove: "<p>" | remove: "</p>" }}</p>
{% if tagline %}
<p class="page__lead">{{ tagline | markdownify | remove: "<p>" | remove: "</p>" }}</p>
{% elsif header.show_overlay_excerpt != false and page.excerpt %}
<p class="page__lead">{{ excerpt | markdownify | remove: "<p>" | remove: "</p>" }}</p>
{% endif %}
{% include page__meta.html %}
{% if page.header.cta_url %}
<p><a href="{{ page.header.cta_url | relative_url }}" class="btn btn--light-outline btn--large">{{ page.header.cta_label | default: site.data.ui-text[site.locale].more_label | default: "Learn More" }}</a></p>
{% if header.cta_url %}
<p><a href="{{ header.cta_url | relative_url }}" class="btn btn--light-outline btn--large">{{ header.cta_label | default: ui-text[site.locale].more_label | default: "Learn More" }}</a></p>
{% endif %}
{% if page.header.actions %}
{% if header.actions %}
<p>
{% for action in page.header.actions %}
<a href="{{ action.url | relative_url }}" class="btn btn--light-outline btn--large">{{ action.label | default: site.data.ui-text[site.locale].more_label | default: "Learn More" }}</a>
{% for action in header.actions %}
<a href="{{ action.url | relative_url }}" class="btn btn--light-outline btn--large">{{ action.label | default: ui-text[site.locale].more_label | default: "Learn More" }}</a>
{% endfor %}
{% endif %}
</div>
{% else %}
<img src="{{ page.header.image | relative_url }}" alt="{{ image_description }}" class="page__hero-image">
<img src="{{ header.image | relative_url }}" alt="{{ image_description }}" class="page__hero-image">
{% endif %}
{% if page.header.caption %}
<span class="page__hero-caption">{{ page.header.caption | markdownify | remove: "<p>" | remove: "</p>" }}</span>
{% if header.caption %}
<span class="page__hero-caption">{{ header.caption | markdownify | remove: "<p>" | remove: "</p>" }}</span>
{% endif %}
</div>

View File

@ -1,2 +1,2 @@
{% assign video = page.header.video %}
{% assign video = header.video %}
{% include video id=video.id provider=video.provider danmaku=video.danmaku %}

View File

@ -1,10 +1,6 @@
{% assign document = post | default: page %}
{% assign document = document.data.page %}
{{document | inspect}}
{{site.defaults.posts.show_date | json}}
{{document.date | json}}
{% if document.read_time or document.show_date or site.defaults.posts.show_date %}
<p class="page__meta">
@ -16,21 +12,24 @@
<time datetime="{{ date | date_to_xmlschema }}">{{ date | date: date_format }}</time>
</span>
{% endif %}
{% if document.read_time or site.defaults.posts.read_time and document.show_date or site.defaults.posts.show_date %}<span class="page__meta-sep"></span>{% endif %}
{% if document and document.read_time or site.defaults.posts.read_time and document.show_date or site.defaults.posts.show_date %}<span class="page__meta-sep"></span>{% endif %}
{% if document.read_time or site.defaults.posts.read_time %}
{% assign words_per_minute = document.words_per_minute | default: site.words_per_minute | default: 200 %}
{% assign words = document.content | strip_html | number_of_words %}
{% assign con = include.content | default: content %}
{% assign words = con | strip_html | number_of_words %}
<!-- There is a minute difference between the time to read on the list pages, and on the article itself. So 5 minutes to read in the list, 4 minutes to read on article itself -->
<span class="page__meta-readtime">
<i class="far {% if include.type == 'grid' and document.read_time and document.show_date %}fa-fw {% endif %}fa-clock" aria-hidden="true"></i>
{% if words < words_per_minute %}
{{ site.data.ui-text[site.locale].less_than | default: "less than" }} 1 {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }}
{{ ui-text[site.locale].less_than | default: "less than" }} 1 {{ ui-text[site.locale].minute_read | default: "minute read" }}
{% elsif words == words_per_minute %}
1 {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }}
1 {{ ui-text[site.locale].minute_read | default: "minute read" }}
{% else %}
{{ words | divided_by: words_per_minute }} {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }}
{{ words | divided_by: words_per_minute | round }} {{ ui-text[site.locale].minute_read | default: "minute read" }}
{% endif %}
</span>
{% endif %}

View File

@ -1,7 +1,7 @@
{% if site.tag_archive.type and page.tags[0] %}
{% if site.tag_archive.type and tags[0] %}
{% include tag-list.html %}
{% endif %}
{% if site.category_archive.type and page.categories[0] %}
{% if site.category_archive.type and categories[0] %}
{% include category-list.html %}
{% endif %}

View File

@ -5,12 +5,12 @@
{% comment %} Link for previous page {% endcomment %}
{% if paginator.previous_page %}
{% if paginator.previous_page == 1 %}
<li><a href="{{ first_page_path }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
<li><a href="{{ first_page_path }}">{{ ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
{% else %}
<li><a href="{{ site.paginate_path | replace: ':num', paginator.previous_page | replace: '//', '/' | relative_url }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
<li><a href="{{ site.paginate_path | replace: ':num', paginator.previous_page | replace: '//', '/' | relative_url }}">{{ ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
{% endif %}
{% else %}
<li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</span></a></li>
<li><a href="#" class="disabled"><span aria-hidden="true">{{ ui-text[site.locale].pagination_previous | default: "Previous" }}</span></a></li>
{% endif %}
{% comment %} First page {% endcomment %}
@ -60,9 +60,9 @@
{% comment %} Link next page {% endcomment %}
{% if paginator.next_page %}
<li><a href="{{ site.paginate_path | replace: ':num', paginator.next_page | replace: '//', '/' | relative_url }}">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</a></li>
<li><a href="{{ site.paginate_path | replace: ':num', paginator.next_page | replace: '//', '/' | relative_url }}">{{ ui-text[site.locale].pagination_next | default: "Next" }}</a></li>
{% else %}
<li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</span></a></li>
<li><a href="#" class="disabled"><span aria-hidden="true">{{ ui-text[site.locale].pagination_next | default: "Next" }}</span></a></li>
{% endif %}
</ul>
</nav>

View File

@ -1,14 +1,15 @@
{% if page.previous or page.next %}
{% if include.siblings.prev or include.siblings.next %}
<nav class="pagination">
{% if page.previous %}
<a href="{{ page.previous.url | relative_url }}" class="pagination--pager" title="{{ page.previous.title | markdownify | strip_html }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a>
{% if include.siblings.prev %}
<a href="{{ include.siblings.prev.url | relative_url }}" class="pagination--pager" title="{{ include.siblings.prev.data.title | markdownify | strip_html }}">{{ ui-text[site.locale].pagination_previous | default: "Previous" }}</a>
{% else %}
<a href="#" class="pagination--pager disabled">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a>
<a href="#" class="pagination--pager disabled">{{ ui-text[site.locale].pagination_previous | default: "Previous" }}</a>
{% endif %}
{% if page.next %}
<a href="{{ page.next.url | relative_url }}" class="pagination--pager" title="{{ page.next.title | markdownify | strip_html }}">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</a>
{% if include.siblings.next %}
<a href="{{ include.siblings.next.url | relative_url }}" class="pagination--pager" title="{{ include.siblings.next.data.title | markdownify | strip_html }}">{{ ui-text[site.locale].pagination_next | default: "Next" }}</a>
{% else %}
<a href="#" class="pagination--pager disabled">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</a>
<a href="#" class="pagination--pager disabled">{{ ui-text[site.locale].pagination_next | default: "Next" }}</a>
{% endif %}
</nav>
{% endif %}

View File

@ -37,7 +37,7 @@ search.addWidget(
instantsearch.widgets.searchBox({
container: '.search-searchbar',
{% unless site.algolia.powered_by == false %}poweredBy: true,{% endunless %}
placeholder: '{{ site.data.ui-text[site.locale].search_placeholder_text | default: "Enter your search term..." }}'
placeholder: '{{ ui-text[site.locale].search_placeholder_text | default: "Enter your search term..." }}'
})
);
search.addWidget(
@ -45,7 +45,7 @@ search.addWidget(
container: '.search-hits',
templates: {
item: hitTemplate,
empty: '{{ site.data.ui-text[site.locale].search_algolia_no_results | default: "No results" }}',
empty: '{{ ui-text[site.locale].search_algolia_no_results | default: "No results" }}',
}
})
);

View File

@ -4,17 +4,17 @@
{%- when "lunr" -%}
<form class="search-content__form" onkeydown="return event.key != 'Enter';">
<label class="sr-only" for="search">
{{ site.data.ui-text[site.locale].search_label_text | default: 'Enter your search term...' }}
{{ ui-text[site.locale].search_label_text | default: 'Enter your search term...' }}
</label>
<input type="search" id="search" class="search-input" tabindex="-1" placeholder="{{ site.data.ui-text[site.locale].search_placeholder_text | default: 'Enter your search term...' }}" />
<input type="search" id="search" class="search-input" tabindex="-1" placeholder="{{ ui-text[site.locale].search_placeholder_text | default: 'Enter your search term...' }}" />
</form>
<div id="results" class="results"></div>
{%- when "google" -%}
<form onsubmit="return googleCustomSearchExecute();" id="cse-search-box-form-id">
<label class="sr-only" for="cse-search-input-box-id">
{{ site.data.ui-text[site.locale].search_label_text | default: 'Enter your search term...' }}
{{ ui-text[site.locale].search_label_text | default: 'Enter your search term...' }}
</label>
<input type="search" id="cse-search-input-box-id" class="search-input" tabindex="-1" placeholder="{{ site.data.ui-text[site.locale].search_placeholder_text | default: 'Enter your search term...' }}" />
<input type="search" id="cse-search-input-box-id" class="search-input" tabindex="-1" placeholder="{{ ui-text[site.locale].search_placeholder_text | default: 'Enter your search term...' }}" />
</form>
<div id="results" class="results">
<gcse:searchresults-only></gcse:searchresults-only>

View File

@ -6,8 +6,8 @@
{% assign title_separator = site.title_separator | default: '-' | replace: '|', '&#124;' %}
{%- if page.title -%}
{%- assign seo_title = page.title | append: " " | append: title_separator | append: " " | append: site.title -%}
{%- if title -%}
{%- assign seo_title = title | append: " " | append: title_separator | append: " " | append: site.title -%}
{%- endif -%}
{%- if seo_title -%}
@ -20,34 +20,34 @@
{%- assign canonical_url = page.url | replace: "index.html", "" | absolute_url %}
{% endif %}
{%- assign seo_description = page.description | default: page.excerpt | default: site.description -%}
{%- assign seo_description = description | default: excerpt | default: site.description -%}
{%- if seo_description -%}
{%- assign seo_description = seo_description | markdownify | strip_html | newline_to_br | strip_newlines | replace: '<br />', ' ' | escape_once | strip -%}
{%- endif -%}
{%- assign author = page.author | default: page.authors[0] | default: site.author -%}
{%- assign author = site.data.authors[author] | default: author -%}
{%- assign author = author | default: authors[0] | default: site.author -%}
{%- assign author = authors[author] | default: author -%}
{%- if author.twitter -%}
{%- assign author_twitter = author.twitter | replace: "@", "" -%}
{%- endif -%}
{%- assign page_large_image = page.header.og_image | default: page.header.overlay_image | default: page.header.image | absolute_url -%}
{%- assign page_large_image = header.og_image | default: header.overlay_image | default: header.image | absolute_url -%}
{%- assign page_large_image = page_large_image | escape -%}
{%- assign page_teaser_image = page.header.teaser | default: site.og_image | absolute_url -%}
{%- assign page_teaser_image = header.teaser | default: site.og_image | absolute_url -%}
{%- assign page_teaser_image = page_teaser_image | escape -%}
{%- assign site_og_image = site.og_image | absolute_url -%}
{%- assign site_og_image = site_og_image | escape -%}
{%- if page.date -%}
{%- if date -%}
{%- assign og_type = "article" -%}
{%- else -%}
{%- assign og_type = "website" -%}
{%- endif -%}
<title>{{ seo_title | default: site.title }}{% if paginator %}{% unless paginator.page == 1 %} {{ title_separator }} {{ site.data.ui-text[site.locale].page | default: "Page" }} {{ paginator.page }}{% endunless %}{% endif %}</title>
<title>{{ seo_title | default: site.title }}{% if paginator %}{% unless paginator.page == 1 %} {{ title_separator }} {{ ui-text[site.locale].page | default: "Page" }} {{ paginator.page }}{% endunless %}{% endif %}</title>
<meta name="description" content="{{ seo_description }}">
{% if author.name %}
@ -60,7 +60,7 @@
<meta property="og:type" content="{{ og_type }}">
<meta property="og:locale" content="{{ site.locale | replace: "-", "_" | default: "en_US" }}">
<meta property="og:site_name" content="{{ site.title }}">
<meta property="og:title" content="{{ page.title | default: site.title | markdownify | strip_html | strip_newlines | escape_once }}">
<meta property="og:title" content="{{ title | default: site.title | markdownify | strip_html | strip_newlines | escape_once }}">
<meta property="og:url" content="{{ canonical_url }}">
{% if seo_description %}
@ -75,7 +75,7 @@
{% if site.twitter.username %}
<meta name="twitter:site" content="@{{ site.twitter.username | replace: "@", "" }}">
<meta name="twitter:title" content="{{ page.title | default: site.title | markdownify | strip_html | strip_newlines | escape_once }}">
<meta name="twitter:title" content="{{ title | default: site.title | markdownify | strip_html | strip_newlines | escape_once }}">
<meta name="twitter:description" content="{{ seo_description }}">
<meta name="twitter:url" content="{{ canonical_url }}">
@ -94,12 +94,12 @@
{% endif %}
{% endif %}
{% if page.date %}
<meta property="article:published_time" content="{{ page.date | date_to_xmlschema }}">
{% if date %}
<meta property="article:published_time" content="{{ date | date_to_xmlschema }}">
{% endif %}
{% if og_type == "article" and page.last_modified_at %}
<meta property="article:modified_time" content="{{ page.last_modified_at | date_to_xmlschema }}">
<meta property="article:modified_time" content="{{ last_modified_at | date_to_xmlschema }}">
{% endif %}
{% if site.facebook %}

View File

@ -1,7 +1,7 @@
<nav class="skip-links">
<ul>
<li><a href="#site-nav" class="screen-reader-shortcut">{{ site.data.ui-text[site.locale].skip_primary_nav | default: 'Skip to primary navigation' }}</a></li>
<li><a href="#main" class="screen-reader-shortcut">{{ site.data.ui-text[site.locale].skip_content | default: 'Skip to content' }}</a></li>
<li><a href="#footer" class="screen-reader-shortcut">{{ site.data.ui-text[site.locale].skip_footer | default: 'Skip to footer' }}</a></li>
<li><a href="#site-nav" class="screen-reader-shortcut">{{ ui-text[site.locale].skip_primary_nav | default: 'Skip to primary navigation' }}</a></li>
<li><a href="#main" class="screen-reader-shortcut">{{ ui-text[site.locale].skip_content | default: 'Skip to content' }}</a></li>
<li><a href="#footer" class="screen-reader-shortcut">{{ ui-text[site.locale].skip_footer | default: 'Skip to footer' }}</a></li>
</ul>
</nav>

View File

@ -1,11 +1,11 @@
<section class="page__share">
{% if site.data.ui-text[site.locale].share_on_label %}
<h4 class="page__share-title">{{ site.data.ui-text[site.locale].share_on_label | default: "Share on" }}</h4>
{% if ui-text[site.locale].share_on_label %}
<h4 class="page__share-title">{{ ui-text[site.locale].share_on_label | default: "Share on" }}</h4>
{% endif %}
<a href="https://twitter.com/intent/tweet?{% if site.twitter.username %}via={{ site.twitter.username | url_encode }}&{% endif %}text={{ page.title | url_encode }}%20{{ page.url | absolute_url | url_encode }}" class="btn btn--twitter" onclick="window.open(this.href, 'window', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;" title="{{ site.data.ui-text[site.locale].share_on_label | default: 'Share on' }} Twitter"><i class="fab fa-fw fa-twitter" aria-hidden="true"></i><span> Twitter</span></a>
<a href="https://twitter.com/intent/tweet?{% if site.twitter.username %}via={{ site.twitter.username | url_encode }}&{% endif %}text={{ page.title | url_encode }}%20{{ page.url | absolute_url | url_encode }}" class="btn btn--twitter" onclick="window.open(this.href, 'window', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;" title="{{ ui-text[site.locale].share_on_label | default: 'Share on' }} Twitter"><i class="fab fa-fw fa-twitter" aria-hidden="true"></i><span> Twitter</span></a>
<a href="https://www.facebook.com/sharer/sharer.php?u={{ page.url | absolute_url | url_encode }}" class="btn btn--facebook" onclick="window.open(this.href, 'window', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;" title="{{ site.data.ui-text[site.locale].share_on_label | default: 'Share on' }} Facebook"><i class="fab fa-fw fa-facebook" aria-hidden="true"></i><span> Facebook</span></a>
<a href="https://www.facebook.com/sharer/sharer.php?u={{ page.url | absolute_url | url_encode }}" class="btn btn--facebook" onclick="window.open(this.href, 'window', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;" title="{{ ui-text[site.locale].share_on_label | default: 'Share on' }} Facebook"><i class="fab fa-fw fa-facebook" aria-hidden="true"></i><span> Facebook</span></a>
<a href="https://www.linkedin.com/shareArticle?mini=true&url={{ page.url | absolute_url | url_encode }}" class="btn btn--linkedin" onclick="window.open(this.href, 'window', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;" title="{{ site.data.ui-text[site.locale].share_on_label | default: 'Share on' }} LinkedIn"><i class="fab fa-fw fa-linkedin" aria-hidden="true"></i><span> LinkedIn</span></a>
<a href="https://www.linkedin.com/shareArticle?mini=true&url={{ page.url | absolute_url | url_encode }}" class="btn btn--linkedin" onclick="window.open(this.href, 'window', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;" title="{{ ui-text[site.locale].share_on_label | default: 'Share on' }} LinkedIn"><i class="fab fa-fw fa-linkedin" aria-hidden="true"></i><span> LinkedIn</span></a>
</section>

View File

@ -6,10 +6,10 @@
{% endcase %}
{% if site.tag_archive.path %}
{% assign tags_sorted = page.tags | sort_natural %}
{% assign tags_sorted = tags | sort_natural %}
<p class="page__taxonomy">
<strong><i class="fas fa-fw fa-tags" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].tags_label | default: "Tags:" }} </strong>
<strong><i class="fas fa-fw fa-tags" aria-hidden="true"></i> {{ ui-text[site.locale].tags_label | default: "Tags:" }} </strong>
<span itemprop="keywords">
{% for tag_word in tags_sorted %}
<a href="{{ tag_word | slugify | prepend: path_type | prepend: site.tag_archive.path | relative_url }}" class="page__taxonomy-item" rel="tag">{{ tag_word }}</a>{% unless forloop.last %}<span class="sep">, </span>{% endunless %}

View File

@ -1,6 +1,6 @@
<aside class="sidebar__right">
<nav class="toc" markdown="1">
<header><h4 class="nav__title"><i class="fas fa-{{ include.icon | default: 'file-alt' }}"></i> {{ include.title | default: site.data.ui-text[site.locale].toc_label }}</h4></header>
<header><h4 class="nav__title"><i class="fas fa-{{ include.icon | default: 'file-alt' }}"></i> {{ include.title | default: ui-text[site.locale].toc_label }}</h4></header>
* Auto generated table of contents
{:toc .toc__menu}
</nav>

View File

@ -35,18 +35,18 @@ layout: default
{% if page.toc %}
<aside class="sidebar__right {% if page.toc_sticky %}sticky{% endif %}">
<nav class="toc">
<header><h4 class="nav__title"><i class="fas fa-{{ page.toc_icon | default: 'file-alt' }}"></i> {{ page.toc_label | default: site.data.ui-text[site.locale].toc_label | default: "On this page" }}</h4></header>
<header><h4 class="nav__title"><i class="fas fa-{{ page.toc_icon | default: 'file-alt' }}"></i> {{ page.toc_label | default: ui-text[site.locale].toc_label | default: "On this page" }}</h4></header>
{% include toc.html sanitize=true html=content h_min=1 h_max=6 class="toc__menu" %}
</nav>
</aside>
{% endif %}
{{ content }}
{% if page.link %}<div><a href="{{ page.link }}" class="btn btn--primary">{{ site.data.ui-text[site.locale].ext_link_label | default: "Direct Link" }}</a></div>{% endif %}
{% if page.link %}<div><a href="{{ page.link }}" class="btn btn--primary">{{ ui-text[site.locale].ext_link_label | default: "Direct Link" }}</a></div>{% endif %}
</section>
<footer class="page__meta">
{% if site.data.ui-text[site.locale].meta_label %}
<h4 class="page__meta-title">{{ site.data.ui-text[site.locale].meta_label }}</h4>
{% if ui-text[site.locale].meta_label %}
<h4 class="page__meta-title">{{ ui-text[site.locale].meta_label }}</h4>
{% endif %}
{% include page__taxonomy.html %}
{% include page__date.html %}
@ -65,7 +65,7 @@ layout: default
{% comment %}<!-- only show related on a post page when `related: true` -->{% endcomment %}
{% if page.id and page.related and site.related_posts.size > 0 %}
<div class="page__related">
<h4 class="page__related-title">{{ site.data.ui-text[site.locale].related_label | default: "You May Also Enjoy" }}</h4>
<h4 class="page__related-title">{{ ui-text[site.locale].related_label | default: "You May Also Enjoy" }}</h4>
<div class="grid__wrapper">
{% for post in site.related_posts limit:4 %}
{% include archive-single.html type="grid" %}
@ -75,7 +75,7 @@ layout: default
{% comment %}<!-- otherwise show recent posts if no related when `related: true` -->{% endcomment %}
{% elsif page.id and page.related %}
<div class="page__related">
<h4 class="page__related-title">{{ site.data.ui-text[site.locale].related_label | default: "You May Also Enjoy" }}</h4>
<h4 class="page__related-title">{{ ui-text[site.locale].related_label | default: "You May Also Enjoy" }}</h4>
<div class="grid__wrapper">
{% for post in site.posts limit:4 %}
{% if post.id == page.id %}

View File

@ -2,6 +2,7 @@
title: "Page Not Found"
excerpt: "Page not found. Your pixels are in another canvas."
sitemap: false
layout: default
permalink: /404.html
---

5
src/_pages/drafts.md Normal file
View File

@ -0,0 +1,5 @@
---
title: "Drafts"
permalink: /drafts/
layout: drafts
---

View File

@ -12,7 +12,7 @@ Second one within 13 hours, good lord, that would never do.
So this challenge was to test if a string matched against the reverse of itself. Basically a palindrome checker.
This took me less time, partly because my first approach was similar to the approach for challenge 1. I used a copy of the string as a ``Character`` Array with two indexes (one counting up from 0, the other down from the max number of characters), and compared each character of the array against the one at the opposite end of the array.
This took me less time, partly because my first approach was similar to the approach for challenge 1. I used a copy of the string as a ``Character`` Array with two indexes (one counting up from 0, the other down from the max number of characters), and compared each character of the array against the one at the opposite end of the array.
So for ```['R', 'A', 'R']```, my solution compared if the character at index ```[0]``` was equal to the one at index ```[2]```, then ```[1]``` to ```[1]```. If at any point there wasn't a match, then it would have returned ```false```, otherwise it would have returned ```true```.
@ -26,11 +26,11 @@ Anyway, this was my first attempt at the challenge
```swift
func challenge2(input: String) -> Bool {
let arrayOfCharacters = Array(input.lowercased())
//start from either end of the string, return false the first time they don't match
var index = 0
var reverseIndex = arrayOfCharacters.count - 1
while index != reverseIndex {
if (arrayOfCharacters[index] != arrayOfCharacters[reverseIndex]) {
return false
@ -38,9 +38,8 @@ func challenge2(input: String) -> Bool {
reverseIndex -= 1
index += 1
}
return true
}
```
(As an aside, to my mind index, reverseIndex and arrayOfCharacters should be highlighted the same color the whole way through the code, not in two different colors. Not sure what I can do about that.)

View File

@ -23,7 +23,7 @@ gallery:
title: DevOps Roadmap
date: 2020-04-21 00:44:00 +01:00
---
I mentioned in the [goals post]({% post_url 2020-04-17-goals %}), one of the things I am aiming to do is to start learning web development.
I mentioned in the [goals post]({% post_url collections.posts, "goals" %}), one of the things I am aiming to do is to start learning web development.
I was well aware that what falls under the banner of web development is massive, I just hadn't realised quite how large it was.
@ -37,13 +37,13 @@ What I find overwhelming is what to use for learning in terms of tutorials, vide
At the moment my focus is split between the following multiple sources
Text:
Text:
- [FreeCodeCamp](https://www.freecodecamp.org)
- [HTML Dog](https://htmldog.com/guides/)
- and a couple of others (links are on my iPad, will update later)
Video:
Video:
- [The Complete 2020 Web Development Bootcamp](https://www.udemy.com/course/the-complete-web-development-bootcamp/) by Angela Yu
- [CS50s Web Programming with Python and JavaScript](https://cs50.harvard.edu/web/) (via [edx](https://www.edx.org/course/cs50s-web-programming-with-python-and-javascript)) - (although this is kinda a mix of both video and text)
- [Colt's Code Camp (Learn Coding From Scratch)](https://www.youtube.com/watch?v=SF_Xl5TOGlY&list=PLblA84xge2_xNtaFnZhefjFbnDrpySKD3) by Colt Steele
@ -52,4 +52,4 @@ I'm trying to get a feel for what works best for me, what sits in my mind more a
Right now I'm still vetting, I def like Angela's course, or at least her voice, style, and humour (even if I'm watching the videos at 1.5-2.0x speed). However it is the only thing I've linked to that requires payment.
I really like FreeCodeCamp's site, and the mechanics of teaching in the browser. I seriously question the 300 hours it suggests per module. I'm virtually finished the first module within about 6 hours. I'm currently working on the first "assignment", and I could easily see spending a bunch of time doing those and making them look great.
I really like FreeCodeCamp's site, and the mechanics of teaching in the browser. I seriously question the 300 hours it suggests per module. I'm virtually finished the first module within about 6 hours. I'm currently working on the first "assignment", and I could easily see spending a bunch of time doing those and making them look great.

View File

@ -3,6 +3,8 @@ title: Moving site from Jekyll to ???
tags: [webdev, site, personal]
category: [site, webdev, personal]
date: 2023-01-21
last_modified: 2023-01-22 13:11
excerpt: Goal is that at some point in the not to distant future I will move the blog from [Jekyll](https://jekyllrb.com) & the [Minimal Mistakes Theme](https://mmistakes.github.io/minimal-mistakes/) to something built with [11ty](https://www.11ty.dev/).
---
Goal is that at some point in the not to distant future I will move the blog from [Jekyll](https://jekyllrb.com) & the [Minimal Mistakes Theme](https://mmistakes.github.io/minimal-mistakes/) to something built with [11ty](https://www.11ty.dev/).

View File

@ -44,9 +44,16 @@ $base0f: #cc6633 !default;
.author__urls.social-icons .svg-inline--fa,
.page__footer-follow .social-icons i,
.page__footer-follow .social-icons .svg-inline--fa {
color: inherit;
/* comment the following out to get coloured icons in the sidebar and footer
but you will also need to override github as its then hard to see
haven't found way to override this rule in main.scss so disabling here
RMCG
*/
/* color: inherit;*/
}
/* next/previous buttons */
.pagination--pager {
color: $text-color;
@ -60,4 +67,4 @@ $base0f: #cc6633 !default;
.ais-search-box .ais-search-box--input {
background-color: $form-background-color;
}
}

View File

@ -0,0 +1,317 @@
/**
* Coldark Theme for Prism.js
* Theme variation: Dark
* Tested with HTML, CSS, JS, JSON, PHP, YAML, Bash script
* @author Armand Philippot <contact@armandphilippot.com>
* @homepage https://github.com/ArmandPhilippot/coldark-prism
* @license MIT
*/
code[class*="language-"],
pre[class*="language-"] {
color: #e3eaf2;
background: none;
font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
pre[class*="language-"]::-moz-selection,
pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection,
code[class*="language-"] ::-moz-selection {
background: #3c526d;
}
pre[class*="language-"]::selection,
pre[class*="language-"] ::selection,
code[class*="language-"]::selection,
code[class*="language-"] ::selection {
background: #3c526d;
}
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: 0.5em 0;
overflow: auto;
}
:not(pre) > code[class*="language-"],
pre[class*="language-"] {
background: #111b27;
}
/* Inline code */
:not(pre) > code[class*="language-"] {
padding: 0.1em 0.3em;
border-radius: 0.3em;
white-space: normal;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: #8da1b9;
}
.token.punctuation {
color: #e3eaf2;
}
.token.delimiter.important,
.token.selector .parent,
.token.tag,
.token.tag .token.punctuation {
color: #66cccc;
}
.token.attr-name,
.token.boolean,
.token.boolean.important,
.token.number,
.token.constant,
.token.selector .token.attribute {
color: #e6d37a;
}
.token.class-name,
.token.key,
.token.parameter,
.token.property,
.token.property-access,
.token.variable {
color: #6cb8e6;
}
.token.attr-value,
.token.inserted,
.token.color,
.token.selector .token.value,
.token.string,
.token.string .token.url-link {
color: #91d076;
}
.token.builtin,
.token.keyword-array,
.token.package,
.token.regex {
color: #f4adf4;
}
.token.function,
.token.selector .token.class,
.token.selector .token.id {
color: #c699e3;
}
.token.atrule .token.rule,
.token.combinator,
.token.keyword,
.token.operator,
.token.pseudo-class,
.token.pseudo-element,
.token.selector,
.token.unit {
color: #e9ae7e;
}
.token.deleted,
.token.important {
color: #cd6660;
}
.token.keyword-this,
.token.this {
color: #6cb8e6;
}
.token.important,
.token.keyword-this,
.token.this,
.token.bold {
font-weight: bold;
}
.token.delimiter.important {
font-weight: inherit;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
.language-markdown .token.title,
.language-markdown .token.title .token.punctuation {
color: #6cb8e6;
font-weight: bold;
}
.language-markdown .token.blockquote.punctuation {
color: #f4adf4;
}
.language-markdown .token.code {
color: #66cccc;
}
.language-markdown .token.hr.punctuation {
color: #6cb8e6;
}
.language-markdown .token.url .token.content {
color: #91d076;
}
.language-markdown .token.url-link {
color: #e6d37a;
}
.language-markdown .token.list.punctuation {
color: #f4adf4;
}
.language-markdown .token.table-header {
color: #e3eaf2;
}
.language-json .token.operator {
color: #e3eaf2;
}
.language-scss .token.variable {
color: #66cccc;
}
/* overrides color-values for the Show Invisibles plugin
* https://prismjs.com/plugins/show-invisibles/
*/
.token.token.tab:not(:empty):before,
.token.token.cr:before,
.token.token.lf:before,
.token.token.space:before {
color: #8da1b9;
}
/* overrides color-values for the Toolbar plugin
* https://prismjs.com/plugins/toolbar/
*/
div.code-toolbar > .toolbar.toolbar > .toolbar-item > a,
div.code-toolbar > .toolbar.toolbar > .toolbar-item > button {
color: #111b27;
background: #6cb8e6;
}
div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover,
div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus,
div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover,
div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus {
color: #111b27;
background: #6cb8e6da;
text-decoration: none;
}
div.code-toolbar > .toolbar.toolbar > .toolbar-item > span,
div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover,
div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus {
color: #111b27;
background: #8da1b9;
}
/* overrides color-values for the Line Highlight plugin
* http://prismjs.com/plugins/line-highlight/
*/
.line-highlight.line-highlight {
background: #3c526d5f;
background: linear-gradient(to right, #3c526d5f 70%, #3c526d55);
}
.line-highlight.line-highlight:before,
.line-highlight.line-highlight[data-end]:after {
background-color: #8da1b9;
color: #111b27;
box-shadow: 0 1px #3c526d;
}
pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before {
background-color: #8da1b918;
}
/* overrides color-values for the Line Numbers plugin
* http://prismjs.com/plugins/line-numbers/
*/
.line-numbers.line-numbers .line-numbers-rows {
border-right: 1px solid #0b121b;
background: #0b121b7a;
}
.line-numbers .line-numbers-rows > span:before {
color: #8da1b9da;
}
/* overrides color-values for the Match Braces plugin
* https://prismjs.com/plugins/match-braces/
*/
.rainbow-braces .token.token.punctuation.brace-level-1,
.rainbow-braces .token.token.punctuation.brace-level-5,
.rainbow-braces .token.token.punctuation.brace-level-9 {
color: #e6d37a;
}
.rainbow-braces .token.token.punctuation.brace-level-2,
.rainbow-braces .token.token.punctuation.brace-level-6,
.rainbow-braces .token.token.punctuation.brace-level-10 {
color: #f4adf4;
}
.rainbow-braces .token.token.punctuation.brace-level-3,
.rainbow-braces .token.token.punctuation.brace-level-7,
.rainbow-braces .token.token.punctuation.brace-level-11 {
color: #6cb8e6;
}
.rainbow-braces .token.token.punctuation.brace-level-4,
.rainbow-braces .token.token.punctuation.brace-level-8,
.rainbow-braces .token.token.punctuation.brace-level-12 {
color: #c699e3;
}
/* overrides color-values for the Diff Highlight plugin
* https://prismjs.com/plugins/diff-highlight/
*/
pre.diff-highlight > code .token.token.deleted:not(.prefix),
pre > code.diff-highlight .token.token.deleted:not(.prefix) {
background-color: #cd66601f;
}
pre.diff-highlight > code .token.token.inserted:not(.prefix),
pre > code.diff-highlight .token.token.inserted:not(.prefix) {
background-color: #91d0761f;
}
/* overrides color-values for the Command Line plugin
* https://prismjs.com/plugins/command-line/
*/
.command-line .command-line-prompt {
border-right: 1px solid #0b121b;
}
.command-line .command-line-prompt > span:before {
color: #8da1b9da;
}

View File

@ -1,5 +1,6 @@
---
# Only the main Sass file needs front matter (the dashes are enough)
# made a liquid file so theme is correctly compiled into import below
permalink: /assets/css/tocompile.scss
---
@charset "utf-8";
@ -26,6 +27,7 @@ $warning-color: #d67f05 !default;
$danger-color: #ff0000 !default;
$info-color: #3b9cba !default;
// section not needed under 11ty
/* neon syntax highlighting (base16) */
$base00: #1a191a;
$base01: #e0e0e0;
@ -55,6 +57,7 @@ $base0f: #926e5c;
// base16-classic-dark
// base16-brewer
// section not needed under 11ty
// Hacking the syntax highlighting
.nb {
/* Name.Builtin */
@ -80,7 +83,7 @@ $base0f: #926e5c;
// Progress Bar
#progress-bar {
background: linear-gradient(to right, red, orange , yellow, green,
background: linear-gradient(to right, red, orange , yellow, green,
blue, indigo, violet var(--scroll), transparent 0);
position: fixed;
overflow: hidden;
@ -91,7 +94,7 @@ $base0f: #926e5c;
// Scroll to top
#scroll-to-top {
background: black;
background: rgb(215, 210, 210);
display:block;
position:fixed;
font-size:25px;
@ -123,7 +126,7 @@ $base0f: #926e5c;
}
#scroll-to-top span {
cursor:pointer;
color:#1a1d24
color:#dee3ee
}
#scroll-to-top span:hover .up-arrow,
#scroll-to-top span:active .up-arrow {
@ -138,8 +141,12 @@ pre {
color: #1bb6be !important
}
$github-color: #fff !default;
//@import "progress.css"; // for progress bar
@import "minimal-mistakes/skins/{{ site.minimal_mistakes_skin | default: 'default' }}"; // skin
//@import "minimal-mistakes/skins/{{ site.minimal_mistakes_skin | default: 'default' }}"; // skin
@import "minimal-mistakes/skins/_{{ site.minimal_mistakes_skin | default: 'default' }}.scss"; // skin
@import "minimal-mistakes"; // main partials
//@import "assets/css/override-notices.scss"
@import "override-notices.scss"
@import "override-notices.scss";

View File

@ -39,7 +39,7 @@ $(document).ready(function() {
})
});
resultdiv.empty();
resultdiv.prepend('<p class="results__found">'+result.length+' {{ site.data.ui-text[site.locale].results_found | default: "Result(s) found" }}</p>');
resultdiv.prepend('<p class="results__found">'+result.length+' {{ ui-text[site.locale].results_found | default: "Result(s) found" }}</p>');
for (var item in result) {
var ref = result[item].ref;
if(store[ref].teaser){

View File

@ -492,7 +492,7 @@ $(document).ready(function() {
})
});
resultdiv.empty();
resultdiv.prepend('<p class="results__found">'+result.length+' {{ site.data.ui-text[site.locale].results_found | default: "Result(s) found" }}</p>');
resultdiv.prepend('<p class="results__found">'+result.length+' {{ ui-text[site.locale].results_found | default: "Result(s) found" }}</p>');
for (var item in result) {
var ref = result[item].ref;
if(store[ref].teaser){

39
src/feed.njk Normal file
View File

@ -0,0 +1,39 @@
---json
{
"permalink": "feed.xml",
"eleventyExcludeFromCollections": true,
"metadata": {
"title": "TDN: RMCG",
"subtitle": "👨‍💻 🚶‍♂️ 💭 🤯",
"language": "en",
"url": "https://tarasis.net/",
"author": {
"name": "Robert McGovern",
"email": "rob@tarasis.net"
}
}
}
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:base="{{ metadata.url }}">
<title>{{ metadata.title }}</title>
<subtitle>{{ metadata.subtitle }}</subtitle>
<link href="{{ permalink | absoluteUrl(metadata.url) }}" rel="self"/>
<link href="{{ metadata.url }}"/>
<updated>{{ collections.posts | getNewestCollectionItemDate | dateToRfc3339 }}</updated>
<id>{{ metadata.url }}</id>
<author>
<name>{{ metadata.author.name }}</name>
<email>{{ metadata.author.email }}</email>
</author>
{%- for post in collections.posts | reverse %}
{%- set absolutePostUrl = post.url | absoluteUrl(metadata.url) %}
<entry>
<title>{{ post.data.title }}</title>
<link href="{{ absolutePostUrl }}"/>
<updated>{{ post.date | dateToRfc3339 }}</updated>
<id>{{ absolutePostUrl }}</id>
<content xml:lang="{{ metadata.language }}" type="html">{{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }}</content>
</entry>
{%- endfor %}
</feed>