From fc30799d4a463cd4881fc031297527e3f1239fdd Mon Sep 17 00:00:00 2001 From: Lewis Dale Date: Sat, 2 Mar 2024 09:44:48 +0000 Subject: [PATCH] Events calendar for 2024 cycling --- src/blogroll.html | 1 - src/css/exceptions/callout.css | 9 +++++++++ src/css/exceptions/events.css | 14 ++++++++++++++ src/css/globals.css | 15 +++++++++++++++ src/events/2024.11tydata.json | 27 +++++++++++++++++++++++++++ src/events/2024.html | 27 +++++++++++++++++++++++++++ src/index.html | 11 ++++++++++- 7 files changed, 102 insertions(+), 2 deletions(-) create mode 100644 src/css/exceptions/callout.css create mode 100644 src/css/exceptions/events.css create mode 100644 src/events/2024.11tydata.json create mode 100644 src/events/2024.html diff --git a/src/blogroll.html b/src/blogroll.html index 32556fb..9c87143 100644 --- a/src/blogroll.html +++ b/src/blogroll.html @@ -25,7 +25,6 @@ layout: base.njk - diff --git a/src/css/exceptions/callout.css b/src/css/exceptions/callout.css new file mode 100644 index 0000000..849817f --- /dev/null +++ b/src/css/exceptions/callout.css @@ -0,0 +1,9 @@ +.callout { + background-color: var(--color-callout-bg); + border: 5px solid var(--color-callout-border); + border-radius: 10px; + color: var(--color-primary); + height: fit-content; + max-width: 60ch; + padding: var(--space-size-xs); +} \ No newline at end of file diff --git a/src/css/exceptions/events.css b/src/css/exceptions/events.css new file mode 100644 index 0000000..9ffb140 --- /dev/null +++ b/src/css/exceptions/events.css @@ -0,0 +1,14 @@ +.events { + p { + margin-inline: auto; + } + + h2 { + text-align: center; + } + + .event { + border: 1px solid var(--color-primary); + padding: var(--space-size-xs); + } +} \ No newline at end of file diff --git a/src/css/globals.css b/src/css/globals.css index c1a23e3..563901f 100644 --- a/src/css/globals.css +++ b/src/css/globals.css @@ -5,6 +5,9 @@ --color-subtle: var(--color-zinc-400); --color-disabled: var(--color-neutral-400); --color-accent: var(--color-zinc-600); + + --color-callout-bg: var(--color-slate-800); + --color-callout-border: var(--color-coolGray-600); } .inverse { @@ -14,6 +17,8 @@ --color-subtle: var(--color-zinc-600); --color-disabled: var(--color-neutral-600); --color-accent: var(--color-zinc-400); + --color-callout-bg: var(--color-slate-300); + --color-callout-border: var(--color-coolGray-400); } @media (prefers-color-scheme: light) { @@ -24,6 +29,8 @@ --color-subtle: var(--color-zinc-600); --color-disabled: var(--color-neutral-600); --color-accent: var(--color-zinc-400); + --color-callout-bg: var(--color-slate-300); + --color-callout-border: var(--color-coolGray-400); } .inverse { @@ -33,6 +40,8 @@ --color-subtle: var(--color-zinc-400); --color-disabled: var(--color-neutral-400); --color-accent: var(--color-zinc-600); + --color-callout-bg: var(--color-slate-800); + --color-callout-border: var(--color-coolGray-600); } } @@ -43,6 +52,8 @@ --color-subtle: var(--color-zinc-600); --color-disabled: var(--color-neutral-600); --color-accent: var(--color-zinc-600); + --color-callout-bg: var(--color-slate-300); + --color-callout-border: var(--color-coolGray-400); } [data-color-scheme="light"] .inverse { @@ -52,6 +63,8 @@ --color-subtle: var(--color-zinc-400); --color-disabled: var(--color-neutral-400); --color-accent: var(--color-zinc-400); + --color-callout-bg: var(--color-slate-800); + --color-callout-border: var(--color-coolGray-600); } [data-color-scheme="dark"] { @@ -61,6 +74,8 @@ --color-subtle: var(--color-zinc-400); --color-disabled: var(--color-neutral-400); --color-accent: var(--color-zinc-600); + --color-callout-bg: var(--color-slate-800); + --color-callout-border: var(--color-coolGray-600); } body { diff --git a/src/events/2024.11tydata.json b/src/events/2024.11tydata.json new file mode 100644 index 0000000..59fae72 --- /dev/null +++ b/src/events/2024.11tydata.json @@ -0,0 +1,27 @@ +{ "events": [ + { + "date": "2024-05-11", + "name": "Macclesfield Bikeathon", + "location": "Macclesfield, UK", + "distance": "96km" + }, + { + "date": "2024-05-12", + "name": "Helping Kids with Cancer Sportive 2024", + "location": "Bolton, UK", + "distance": "105km" + }, + { + "date": "2024-07-14", + "name": "Manchester - Blackpool Bike Ride", + "location": "Manchester, UK", + "distance": "215km" + }, + { + "date": "2024-09-01", + "name": "Manchester 100", + "location": "Manchester, UK", + "distance": "160km" + } +] +} \ No newline at end of file diff --git a/src/events/2024.html b/src/events/2024.html new file mode 100644 index 0000000..9ba29cf --- /dev/null +++ b/src/events/2024.html @@ -0,0 +1,27 @@ +--- +title: 2024 cycling events calendar +layout: base.njk +--- + +
+
+

{{ title }}

+
+

This year I'm raising money for Cyclists Fighting Cancer, a brilliant charity that donate bikes to children and young people who are dealing with cancer.

+ +

If you'd like to donate to the fundraiser, you can do so on the JustGiving page.

+ +

The events

+ +
    + {% for event in events %} +
  • +

    {{ event.name }}

    + +

    Distance: {{ event.distance }}

    +
  • + {% endfor %} +
+
+
+
diff --git a/src/index.html b/src/index.html index 380d87c..e5c55ea 100644 --- a/src/index.html +++ b/src/index.html @@ -7,11 +7,20 @@ layout: base.njk

Hi, I'm Lewis

+ + + {% image metadata.author.avatar, "My face", "box circle u-photo", "300px", [300] %} +

I'm a software engineer who loves building things for the web. I consider myself a generalist, but on a given day I'll probably be working with Typescript, HTML and CSS, and on occasion a touch of .NET. I work for Triptease as a Senior Software Engineer, and on the side I'm learning Rust by building a Sinclair BASIC Interpreter.

- {% image metadata.author.avatar, "My face", "box circle u-photo", "300px", [300] %}

When I'm not working I love cycling, reading fiction (mostly sci-fi and ghost stories), and spending time with my family & our border collie.