From 7b27ab1ea9a6cce9662a4b6212c2ac4a37bf09f9 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Mon, 6 Nov 2023 16:40:44 +0000 Subject: [PATCH] More cleanup of CSS --- config.toml | 26 +++++---- themes/lhs/{static => assets}/js/site.js | 4 -- themes/lhs/assets/sass/leighhack.scss | 6 ++ themes/lhs/layouts/_default/baseof.html | 3 +- themes/lhs/layouts/partials/foot.html | 4 ++ themes/lhs/layouts/partials/footer.html | 2 +- themes/lhs/layouts/partials/head.html | 13 ++--- themes/lhs/layouts/partials/header.html | 2 +- .../static/js/dist/openlayers/ol-ext.min.js | 9 --- themes/lhs/static/js/dist/openlayers/ol.js | 3 - themes/lhs/static/js/leighhack-map-contact.js | 53 ------------------ themes/lhs/static/js/leighhack-map.js | 56 ------------------- 12 files changed, 33 insertions(+), 148 deletions(-) rename themes/lhs/{static => assets}/js/site.js (96%) create mode 100644 themes/lhs/layouts/partials/foot.html delete mode 100644 themes/lhs/static/js/dist/openlayers/ol-ext.min.js delete mode 100644 themes/lhs/static/js/dist/openlayers/ol.js delete mode 100644 themes/lhs/static/js/leighhack-map-contact.js delete mode 100644 themes/lhs/static/js/leighhack-map.js diff --git a/config.toml b/config.toml index 062c388..4017f70 100644 --- a/config.toml +++ b/config.toml @@ -5,14 +5,18 @@ title = 'Leigh Hackspace' enableRobotsTXT = true [sitemap] - changeFreq = 'weekly' - filename = 'sitemap.xml' - priority = -1 +changeFreq = 'weekly' +filename = 'sitemap.xml' +priority = -1 [params] company = "Leigh Hackspace CIC" company_number = "09404083" copyright_years = "2023" +description = "Leigh Hackspace is a hackspace located in the north-west of England." + +[params.social] +twitter = 'leigh_hackspace' # Header links [menu] @@ -37,37 +41,37 @@ name = "Events" pageRef = "events" # Social links -[[params.social]] +[[params.social_links]] name = "twitter" url = "https://twitter.com/leigh_hackspace" icon = "fa-twitter" -[[params.social]] +[[params.social_links]] name = "slack" url = "https://join.slack.com/t/leighhack/shared_invite/enQtNDYzMjEyMDMxNDExLTE1MWY5N2IwMzdhMzQ0ZWFiNDkyNzJmMGM1ZmFkODcwMGM5ODFmYmI4MjhmM2JiMWEyY2E3NTRjMTQzMzljZWU" icon = "fa-slack" -[[params.social]] +[[params.social_links]] name = "github" url = "https://github.com/leigh-hackspace" icon = "fa-github-alt" -[[params.social]] +[[params.social_links]] name = "instagram" url = "https://www.instagram.com/leighhackspace" icon = "fa-instagram" -[[params.social]] +[[params.social_links]] name = "facebook" url = "https://www.facebook.com/groups/leighhackspace/" icon = "fa-facebook-square" -[[params.social]] +[[params.social_links]] name = "discourse" url = "https://discourse.leighhack.org" icon = "fa-discourse" -[[params.social]] +[[params.social_links]] name = "mastodon" url = "https://mastodon.social/@leigh_hackspace" icon = "fa-mastodon" @@ -125,4 +129,4 @@ price = " POA" period = "per month" description = "Enhanced membership which includes a dedicated space for your personal use." link = "mailto:info@leighhack.org?subject=Artist%20Pod%20Lease" -button = "Enquire" \ No newline at end of file +button = "Enquire" diff --git a/themes/lhs/static/js/site.js b/themes/lhs/assets/js/site.js similarity index 96% rename from themes/lhs/static/js/site.js rename to themes/lhs/assets/js/site.js index 0919973..1eeaffe 100644 --- a/themes/lhs/static/js/site.js +++ b/themes/lhs/assets/js/site.js @@ -1,5 +1,3 @@ -// Hide and show menu - document.addEventListener('DOMContentLoaded', () => { // Get all "navbar-burger" elements @@ -23,6 +21,4 @@ document.addEventListener('DOMContentLoaded', () => { }); }); } - - }); \ No newline at end of file diff --git a/themes/lhs/assets/sass/leighhack.scss b/themes/lhs/assets/sass/leighhack.scss index f2b1824..52c3a0c 100644 --- a/themes/lhs/assets/sass/leighhack.scss +++ b/themes/lhs/assets/sass/leighhack.scss @@ -1,5 +1,11 @@ @charset "utf-8"; +// Additional fonts +@font-face { + font-family: 'Transport Medium'; + src: url('/fonts/transport-medium.woff2') format('woff2'); +} + // Hackspace Branding $family-sans-serif: "Roboto", sans-serif; $primary: #d41246; diff --git a/themes/lhs/layouts/_default/baseof.html b/themes/lhs/layouts/_default/baseof.html index 7de4808..6a8e05b 100644 --- a/themes/lhs/layouts/_default/baseof.html +++ b/themes/lhs/layouts/_default/baseof.html @@ -45,8 +45,7 @@ {{ end }} {{ partial "footer.html" .}} - - + {{ partial "foot.html" .}} \ No newline at end of file diff --git a/themes/lhs/layouts/partials/foot.html b/themes/lhs/layouts/partials/foot.html new file mode 100644 index 0000000..689f411 --- /dev/null +++ b/themes/lhs/layouts/partials/foot.html @@ -0,0 +1,4 @@ +{{ $site := resources.Get "js/site.js" }} +{{ $js := slice $site | resources.Concat "js/bundle.js" | resources.Minify }} +{{ $secureJS := $js | resources.Fingerprint "sha512" }} + \ No newline at end of file diff --git a/themes/lhs/layouts/partials/footer.html b/themes/lhs/layouts/partials/footer.html index 802686a..ddb4c17 100644 --- a/themes/lhs/layouts/partials/footer.html +++ b/themes/lhs/layouts/partials/footer.html @@ -37,7 +37,7 @@
    - {{- with .Site.Params.social }} + {{- with .Site.Params.social_links }} {{ range . -}}
  • {{ .name | humanize }}
  • {{ end }} diff --git a/themes/lhs/layouts/partials/head.html b/themes/lhs/layouts/partials/head.html index 75cbc5b..ea695b8 100644 --- a/themes/lhs/layouts/partials/head.html +++ b/themes/lhs/layouts/partials/head.html @@ -1,8 +1,12 @@ - {{ block "title" . }}{{ .Site.Title }} - {{ .Title }}{{ end }} + + +{{ template "_internal/opengraph.html" . }} +{{ template "_internal/twitter_cards.html" . }} + @@ -19,10 +23,3 @@ {{ with resources.Get "sass/leighhack.scss" | toCSS $opts | minify | fingerprint }} {{ end }} - - diff --git a/themes/lhs/layouts/partials/header.html b/themes/lhs/layouts/partials/header.html index 028f499..0abd76d 100644 --- a/themes/lhs/layouts/partials/header.html +++ b/themes/lhs/layouts/partials/header.html @@ -32,7 +32,7 @@