get all posts in, make styles acceptable & passable
Some checks failed
test / test (push) Has been cancelled

This commit is contained in:
graphiteisaac 2025-01-30 17:23:48 +11:00
parent bac36e2784
commit 44047fef2c
13 changed files with 218 additions and 65 deletions

BIN
bun.lockb

Binary file not shown.

View file

@ -19,6 +19,7 @@
},
"dependencies": {
"@tailwindcss/postcss": "^4.0.1",
"@tailwindcss/typography": "^0.5.16",
"@tailwindcss/vite": "^4.0.1",
"tailwindcss": "^4.0.1",
"vite": "^6.0.11",

View file

@ -1,6 +1,23 @@
@import url(https://fonts.bunny.net/css?family=alegreya:400,400i,700,700i);
@import 'tailwindcss';
@plugin '@tailwindcss/typography';
@theme {
--breakpoint-xl: initial;
--breakpoint-2xl: initial;
}
body {
background-color: #fffff8;
color: #111;
font-family: 'Alegreya', serif;
}
@utility prose {
color: #111;
p {
margin-top: .3rem;
margin-bottom: .3rem;
}
}

74
priv/posts/overgrown.md Normal file
View file

@ -0,0 +1,74 @@
---
title: Overgrown
week: 3
date: 2024-01-15
---
A world taken over by those who belong. Humans enraged, guts full of anger, their home returned to what's good. What will we do with all this space? The animals cried out, free, at rest. Trees growing broadly, cracking layered concrete, a flower blooms quietly. Sun shines from her eyes, petals spread, reaching. Competition seems simple now: no parking, roads, construction. Coexistence, mingled here, all species bar one. As living as life gets, so far from done. An overgrown forest, or so they once called it, now merely just growing.
+++
My search result remains unknown
What if I find you overgrown
A break from my trek ever forth
To feel how flame evokes your warmth
Dying embers sit and simmer
Reminding how your eyes glimmer
How could my grasp let you slip through
Unthinkable that you withdrew
How was my grip not tight enough
Would holding on have been too rough
Awake and drowsy I can only yawn
Again set out, before the crack of dawn
Through concrete jungle, turning to latter
Objects of service on a new chapter
To time forsaken, these buildings have changed
Constructed for users now long estranged
Inside I sit for but a moments rest
A pleasant refuge no longer suppressed
Abandoned now, theyre free from our restore
Oh how theyve grown to greater than before
Resumed my journey more aware
Unsure why I feel this despair
My heart knew what my mind did not
Its beat increased to rate forgot
Upon glimpse of your silhouette
A rush of heat and touch of sweat
Long last my venture is complete
Something inside screams to retreat
You seem so happy from afar
Arousing feelings so bizarre
Should I leave you on your own
It seems I've found you overgrown

View file

@ -1,38 +0,0 @@
---
title: second one
week: 2
date: 2024-01-08
---
The two natural states of any changing being. As we all are, between them or reaching, life seldom finds stillness. When tides recede, we must work harder to be ourselves - don't disrupt our friendships, carry on our routines, push ourselves through it. Or rest. Allow healing, and comfort - risking the costs in connections, health, responsibilities.
When the pendulum swings back the challenges differ. Goodness and effort come easy. There is plenty of zest and fervour to light each day. We relish these hours, and come to expect them, though these joys can never go on forever. Even the richest - in any and all measures - experience hardship and lows. A lost opportunity; no welcome relief, a broken relationship; painful and seething. Unanticipated death knocking an unfair door. All the preventative factors in the world couldn't prepare a person for these things, nor make them easy.
In the flow, recall ebb, its bitterness and dark. Let it creep in just a little. That piece who finds warmth or kindness during abundance may resurface again, between thrashing waves - a small piece of light bringing hope for the end of the tunnel.
+++
would you like to meet up sometime quite soon
that was so fun, can't wait to hang again
let's meet up if your free this afternoon
no problem, dont stress, just let me know when
I'm so glad I spotted you at that tree
I love getting to spend time together
I'm keen, I'll let you know next time i'm free
I'm so sorry, I cant with this weather
I'm glad you called, I've been thinking of you
I need to say, you mean so much to me
can't wait to meet again, it's over due
no family first, I dont disagree
I've been missing you so much as of late
An ebb I pray ends, the flow I await

100
priv/posts/tinker.md Normal file
View file

@ -0,0 +1,100 @@
---
title: Tinker
week: 2
date: 2024-01-08
---
Luke and Mateo had grown together like round peas in a square pod. Life never quite suited them right - mismatched family trips, different schools, growing pains keeping them apart. For what felt like forever, they waited longingly for the summer holidays. The festive days at school passed slowly, a tiny ant stuck in honey.
Every year, Luke and Mateo spent their break together, as much as possible. They were well known by the local kids for their workshopping; they could make anything their hearts desired. Luke and Mateo made whistles, pulleys, gadgets, and gizmos. They took donations and commissions from the other children, collecting bottle caps and springs to return as fishing rods and game pieces to wondrous onlookers.
That fated first summer Saturday, Mateo scoffed his breakfast, Luke rushed to get dressed, and they both cycled to their sacred place in the park to begin the next magical season.
'Hey, Mateo,' called Luke as he rolled up to the meeting place.
'Hi Luke! I couldn't wait to get started so I've already been setting up, I hope you don't mind.'
The boys perched their workstation between some dense trees - a couple wobbly tables, a cart that used to roll, and all the 'junk' they had gathered throughout the last 10 months of mundane life missing each other. Luke dumped his collection into the pile and they began sorting.
'Say, Mateo, any ideas for what we could make this year?'
'So many,' he replied excitedly. 'I'll show you my notebook later. The first thing I'd like to make is a kite, though. My dad showed me a video from when he was my age, with a smart blue kite that danced beautifully in the wind. Do you think we can do that?'
Luke studied Mateo's serious face. He had never made a kite before, but Mateo looked up to him, wanting to learn the whole world.
'Of course we can. I see string, some fabric...' Luke's voice trailed off.
'I'm not sure how to make it though,' admitted Mateo.
'No problem,' Luke assured him. 'We will work it out together. Nothing is too hard for us, right?'
'Right.'
The pair pulled together anything they thought could work: lengths of string, some thin pipes, a cobalt sheet of tarp. They planned, measured, cut, and built, working side by side on their first project of the season. As the afternoon drew nearer to dusk, Luke and Mateo climbed to the highest point of the park to test out their creation.
'I'm going to beat you!' teased Luke, Mateo following fast behind. The strong evening breeze cooled their sun-soaked arms upon the hill.
'You should go first,' offered Luke. 'It was your idea after all.' Mateo grabbed the kite and galloped across the grass.
'Let out some more string!' Luke called - and he did. The kite went up, a little, a meter, then two. About three in total before it came crashing down. Disappointment flooded Mateo's heart.
'Here, let me show you.' Mateo gave up the kite, Luke went for lift off. Again and again, their work couldn't make it off the ground. Returning the failure to the workshop, both boys got ready to head home.
'See you tomorrow, Luke,' said Mateo. He felt disappointed in himself. That was their first project that didn't work, and it was all his fault. Luke probably didn't want to work with him anymore.
That night, Mateo had a big dream. It was tomorrow, and he had a kite that flew just as his dad's had. He studied the kite, its shapes, features, design. He would try to recreate it, no matter if Luke wanted to be involved or not. When Luke found him at the at the workshop the next morning already tinkering, he had no reason to be surprised.
'Hey bud, how's it going?'
Mateo startled. 'I didn't expect you here today...' he looked away.
'Why not?'
'Well, I just thought you would be disappointed with my idea...' Mateo mumbled.
'Of course not, Mateo! Things go wrong sometimes, it helps us learn and grow. I can see it's already working for you.'
'I thought of some new ideas last night,' said Mateo, not wanting to admit where he got them from.
Soon, the kite had been altered and adapted to match his memory exactly. They raced up the hill again, Mateo now leading.
'Here goes...' he said.
The blue beauty clung to the air, climbing, soaring, fluttering.
'It's dancing!' Luke shrieked. 'Like your dad's one!' They held hands and ran together, the kite floating effortlessly beyond them. Finally, they sat down and watched it flit down like an autumn leaf.
'Wow, just wow,' said Luke. Mateo's face flushed a rosy red. 'I'm so impressed by you.'
'Really?' asked Mateo. He didn't believe how different today went from what he had worried about.
'Yes, really. You did what I couldn't. I'm proud of you for trying again.' This made Mateo hide, shy. 'And I'm sorry for making it seem like I knew what to do. I guess it's time for me to start learning from you, too.'
'I'm so excited for the rest of the summer together,' admitted Mateo.
'I can only imagine what we'll build,' said Luke with a smile.
+++
Adjust to a fine tune
Locate mistakes to prune
Forever to repeat
Yet still I strive this feat
Hydra of error found
A web of fixes wound
Too much going on here
Function become unclear
Inertia left uncapped
Cycle of ego trapped
Effort I must sustain
Tinkering I remain

View file

@ -1,10 +1,10 @@
import promptbox/postcss
import argv
import gleam/io
import gleam/list
import lustre/element
import promptbox/devserver
import promptbox/files
import promptbox/postcss
import promptbox/web
pub fn main() {
@ -18,8 +18,7 @@ pub fn main() {
let posts = files.read_all_posts()
// Generate HTML
let index =
posts
|> web.home
[web.home(posts)]
|> web.layout("All Posts")
|> element.to_document_string

View file

@ -23,8 +23,7 @@ fn update(model, _msg) {
}
fn view(_model) {
html.div(
[],
html.div([], [
web.home([
parser.Post(
slug: "ebben-flow",
@ -35,5 +34,5 @@ fn view(_model) {
post_j: "OK",
),
]),
)
])
}

View file

@ -23,8 +23,8 @@ pub fn read_all_posts() {
use a, b <- list.sort(posts)
case a.week >= b.week {
True -> order.Gt
_ -> order.Lt
True -> order.Lt
_ -> order.Gt
}
}

View file

@ -2,7 +2,6 @@ import promptbox/parser
import promptbox/web
pub fn generate_posts(posts: List(parser.Post)) {
posts
|> web.home
[web.home(posts)]
|> web.layout("all writing")
}

View file

@ -1,5 +1,6 @@
import gleam/int
import gleam/list
import lustre/attribute.{attribute}
import lustre/attribute.{attribute, class}
import lustre/element/html
import promptbox/parser
@ -12,7 +13,10 @@ pub fn layout(contents, title) {
attribute.name("viewport"),
]),
html.title([], title),
html.link([attribute.href("/assets/main.css"), attribute.rel("stylesheet")]),
html.link([
attribute.href("/assets/main.css"),
attribute.rel("stylesheet"),
]),
]),
html.body(
[],
@ -22,7 +26,7 @@ pub fn layout(contents, title) {
}
pub fn home(posts: List(parser.Post)) {
list.map(posts, prompt_element)
html.div([class("container px-4 mx-auto")], list.map(posts, prompt_element))
}
pub fn individual(post: parser.Post) {
@ -30,11 +34,18 @@ pub fn individual(post: parser.Post) {
}
fn prompt_element(post: parser.Post) {
html.article([attribute.class("post")], [
html.h3([attribute.class("post_title")], [html.text(post.title)]),
html.div([attribute.class("grid lg:grid-cols-2 gap-6")], [
html.div([attribute("dangerous-unescaped-html", post.post_p)], []),
html.div([attribute("dangerous-unescaped-html", post.post_j)], []),
html.article([class("post py-8")], [
html.h2([class("prompt_title text-center text-4xl font-bold italic mb-1")], [html.text(post.title)]),
html.h5([class("prompt_week text-center italic text-slate-700 mb-5")], [html.text("Week " <> int.to_string(post.week))]),
html.div([class("flex flex-col")], [
html.article([class("prose text-left")], [
html.div([attribute("dangerous-unescaped-html", post.post_p)], []),
html.cite([], [html.text("-P")]),
]),
html.article([class("prose text-right self-end")], [
html.div([attribute("dangerous-unescaped-html", post.post_j)], []),
html.cite([], [html.text("-J")]),
]),
]),
])
}

View file

@ -1,9 +0,0 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./src/**/*.gleam'],
theme: {
extend: {},
},
plugins: [],
}