From 5a5741db59c1d042b93631a00abde0378600f80a Mon Sep 17 00:00:00 2001 From: Daniel-I-Am Date: Thu, 26 May 2022 11:48:29 +0200 Subject: [PATCH] Add first src files --- src/404.pug | 10 ++++++++++ src/50x.pug | 13 +++++++++++++ src/data/snippets.json | 12 ++++++++++++ src/index.pug | 6 ++++++ src/js/app.js | 3 +++ 5 files changed, 44 insertions(+) create mode 100644 src/404.pug create mode 100644 src/50x.pug create mode 100644 src/data/snippets.json create mode 100644 src/index.pug create mode 100644 src/js/app.js diff --git a/src/404.pug b/src/404.pug new file mode 100644 index 0000000..464108b --- /dev/null +++ b/src/404.pug @@ -0,0 +1,10 @@ +doctype html +html(lang="en") + head + title Error + style. + html { color-scheme: light dark; } + body { width: 35em; margin: 0 auto; font-family: Tahoma, Verdana, Arial, sans-serif; } + body + h1 An error occurred + p Sorry, the page you are looking does not exist. diff --git a/src/50x.pug b/src/50x.pug new file mode 100644 index 0000000..d9fee1d --- /dev/null +++ b/src/50x.pug @@ -0,0 +1,13 @@ +doctype html +html(lang="en") + head + title Error + style. + html { color-scheme: light dark; } + body { width: 35em; margin: 0 auto; font-family: Tahoma, Verdana, Arial, sans-serif; } + body + h1 An error occurred + p Sorry, the page you are looking for is currently unavailable.
Please try again later. + p If you are the system administrator of this resource then you should check the error log for details. + p + em Faithfully yours, nginx. diff --git a/src/data/snippets.json b/src/data/snippets.json new file mode 100644 index 0000000..b57ca4c --- /dev/null +++ b/src/data/snippets.json @@ -0,0 +1,12 @@ +[ + { + "title": "Seconds since last pacman sync", + "slug": "seconds-since-last-pacman-sync", + "snippet": "echo $(expr $(date +%s) - $(grep -rn -A 1 %INSTALLDATE% /var/lib/pacman/local/*/desc | grep -oP '\\d{10,}$' | sort | tail -1))", + "tags": [ + "archlinux", + "linux", + "pacman" + ] + } +] diff --git a/src/index.pug b/src/index.pug new file mode 100644 index 0000000..ac8aa38 --- /dev/null +++ b/src/index.pug @@ -0,0 +1,6 @@ +doctype html +html(lang='en') + head + title Portfolio - Daniel de Cloet + body + span#out diff --git a/src/js/app.js b/src/js/app.js new file mode 100644 index 0000000..3052d30 --- /dev/null +++ b/src/js/app.js @@ -0,0 +1,3 @@ +const snippets = require('../data/snippets.json'); + +console.log(snippets);