summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/_layouts/base.njk23
-rw-r--r--src/feed.njk34
-rw-r--r--src/index.njk23
-rw-r--r--src/posts/hello-world.md34
4 files changed, 114 insertions, 0 deletions
diff --git a/src/_layouts/base.njk b/src/_layouts/base.njk
new file mode 100644
index 0000000..84df4f4
--- /dev/null
+++ b/src/_layouts/base.njk
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>{% if title %}{{ title }} - {% endif %}liz.coffee</title>
+ <link rel="stylesheet" href="/assets/adelie.css">
+ <link rel="alternate" type="application/atom+xml" title="liz.coffee" href="/feed.xml">
+ {% if pageStyles %}
+ <style>{{ pageStyles | safe }}</style>
+ {% endif %}
+</head>
+<body>
+ <main>
+ {{ content | safe }}
+ </main>
+
+ <script src="/assets/adelie.js"></script>
+ {% if pageScripts %}
+ <script>{{ pageScripts | safe }}</script>
+ {% endif %}
+</body>
+</html>
diff --git a/src/feed.njk b/src/feed.njk
new file mode 100644
index 0000000..b5c45e3
--- /dev/null
+++ b/src/feed.njk
@@ -0,0 +1,34 @@
+---
+permalink: /feed.xml
+eleventyExcludeFromCollections: true
+metadata:
+ title: liz.coffee
+ subtitle: A cute little blog with interactive toys
+ url: https://liz.coffee/
+ feedUrl: https://liz.coffee/feed.xml
+ author:
+ name: Lizzy
+---
+<?xml version="1.0" encoding="utf-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom">
+ <title>{{ metadata.title }}</title>
+ <subtitle>{{ metadata.subtitle }}</subtitle>
+ <link href="{{ metadata.feedUrl }}" rel="self"/>
+ <link href="{{ metadata.url }}"/>
+ <updated>{{ collections.all | getNewestCollectionItemDate | dateToRfc3339 }}</updated>
+ <id>{{ metadata.url }}</id>
+ <author>
+ <name>{{ metadata.author.name }}</name>
+ </author>
+ {%- for post in collections.all | reverse -%}
+ {%- if post.data.title -%}
+ <entry>
+ <title>{{ post.data.title }}</title>
+ <link href="{{ metadata.url }}{{ post.url }}"/>
+ <updated>{{ post.date | dateToRfc3339 }}</updated>
+ <id>{{ metadata.url }}{{ post.url }}</id>
+ <content type="html">{{ post.templateContent | htmlToAbsoluteUrls(metadata.url) }}</content>
+ </entry>
+ {%- endif -%}
+ {%- endfor -%}
+</feed>
diff --git a/src/index.njk b/src/index.njk
new file mode 100644
index 0000000..064c05e
--- /dev/null
+++ b/src/index.njk
@@ -0,0 +1,23 @@
+---
+layout: base.njk
+title: Home
+---
+
+<h1>liz.coffee</h1>
+
+<p>A cute little blog with interactive toys.</p>
+
+<h2>Posts</h2>
+
+<ul>
+{%- for post in collections.all | reverse -%}
+ {%- if post.data.title -%}
+ <li>
+ <a href="{{ post.url }}">{{ post.data.title }}</a>
+ {%- if post.data.date -%}
+ <span> - {{ post.data.date | date: "%Y-%m-%d" }}</span>
+ {%- endif -%}
+ </li>
+ {%- endif -%}
+{%- endfor -%}
+</ul>
diff --git a/src/posts/hello-world.md b/src/posts/hello-world.md
new file mode 100644
index 0000000..22eef26
--- /dev/null
+++ b/src/posts/hello-world.md
@@ -0,0 +1,34 @@
+---
+layout: base.njk
+title: Hello World
+date: 2025-12-14
+---
+
+# Hello World!
+
+This is my first blog post. I can write regular markdown here.
+
+## Interactive Toy Example
+
+Here's a little interactive toy:
+
+<div id="color-toy" style="padding: 2rem; background: #f0f0f0; border-radius: 8px; text-align: center;">
+ <button id="change-color">Click me!</button>
+ <p id="color-display" style="margin-top: 1rem; font-weight: bold;">Color: #f0f0f0</p>
+</div>
+
+<script>
+ const btn = document.getElementById('change-color');
+ const display = document.getElementById('color-display');
+ const toy = document.getElementById('color-toy');
+
+ btn.addEventListener('click', () => {
+ const randomColor = '#' + Math.floor(Math.random()*16777215).toString(16);
+ toy.style.background = randomColor;
+ display.textContent = 'Color: ' + randomColor;
+ });
+</script>
+
+## More Content
+
+And I can continue writing markdown after the interactive bit!