From 73a1576233aa8179c3777a760a4756a066470d0e Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Mon, 9 Aug 2021 17:50:20 +0100 Subject: [PATCH] Wrangle up some CSS --- src/.eleventy.js | 5 +- src/_includes/main.njk | 14 ++- src/css/theme.css | 255 +++++++++++++++++++++++++++++++++++++++++ src/images/clock.svg | 3 + src/index.11tydata.js | 2 +- src/index.html | 51 +++++++-- 6 files changed, 313 insertions(+), 17 deletions(-) create mode 100644 src/images/clock.svg diff --git a/src/.eleventy.js b/src/.eleventy.js index 8dd31f2..85ec588 100644 --- a/src/.eleventy.js +++ b/src/.eleventy.js @@ -32,13 +32,12 @@ async function filter_asset(src) { let type = await filetype.fromBuffer(content); if(typeof type === "undefined") { // Failed, try to extract from the URL - let match = src.match(/(?<=\.)[a-zA-Z0-9-_]$/); + let match = src.match(/(?<=\.)[a-zA-Z0-9-_]+$/); // Failed, just go with no file type extension at all if(match === null) match = [ null, "" ]; - type = { ext: match[1] } + type = { ext: match[0] }; } if(type.ext.length > 0) type.ext = `.${type.ext}`; - // It's a URL - download it filename = `${hash(src)}${type.ext}`; await fs.promises.writeFile( diff --git a/src/_includes/main.njk b/src/_includes/main.njk index d21d11e..dba1f24 100644 --- a/src/_includes/main.njk +++ b/src/_includes/main.njk @@ -37,23 +37,25 @@ description: "Hull Blogs provides aggregated content from University of Hull stu

{{ tagline }}

-