diff --git a/dev.db b/dev.db deleted file mode 100644 index 561f289..0000000 Binary files a/dev.db and /dev/null differ diff --git a/package.json b/package.json index 106cd1e..0433d59 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,8 @@ "dev": "vite dev", "build": "vite build", "preview": "vite preview", + "zip": "rm -f build.zip && zip -r build.zip build/", + "prod": "bun --bun run build && bun run zip", "prepare": "svelte-kit sync || echo ''", "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" diff --git a/src/app.html b/src/app.html index 77a5ff5..c1524fb 100644 --- a/src/app.html +++ b/src/app.html @@ -2,7 +2,7 @@ - + %sveltekit.head% diff --git a/src/app.scss b/src/app.scss index 7478540..5aa9b8e 100644 --- a/src/app.scss +++ b/src/app.scss @@ -1,5 +1,6 @@ $blue: oklch(0.76 0.0358 233.23); -$yellow: oklch(0.98 0.1102 107.17); -$orange: oklch(0.76 0.1039 65.65); -$green: oklch(0.22 0.0211 174.37); -$green-42: oklch(42% 0.042 142); \ No newline at end of file +$yellow: oklch(0.84 0.123 100); +$orange: oklch(0.76 0.1239 65); +$brown: oklch(0.36 0.042 42); +$green: oklch(0.22 0.0211 174); +$green-42: oklch(0.42 0.042 142); \ No newline at end of file diff --git a/src/lib/db/index.ts b/src/lib/db/index.ts index 906db10..6130595 100644 --- a/src/lib/db/index.ts +++ b/src/lib/db/index.ts @@ -2,7 +2,7 @@ import Database from 'bun:sqlite'; import { dev } from '$app/environment'; // Initialize the database -const db = new Database(dev ? 'dev.db' : 'prod.db', { create: true}); +const db = new Database('sludge.db', { create: true}); db.exec(` CREATE TABLE IF NOT EXISTS users ( @@ -36,11 +36,15 @@ process.on('SIGINT', () => { // Export database instance and helper functions export { db }; -// Example helper functions -export function get_all_users() { - return db.query('SELECT * FROM users').all(); +export function get_all_blags() { + return db.query('SELECT * FROM blags').all(); } +export function get_blag(uri) { + return db.query('SELECT * FROM blags WHERE uri = ?').get(uri); +} + + export function create_user(name: string, email: string) { try { return { success: true, id: result.lastInsertRowid, name, email }; diff --git a/src/routes/+layout.server.ts b/src/routes/+layout.server.ts index 1211079..3aa4021 100644 --- a/src/routes/+layout.server.ts +++ b/src/routes/+layout.server.ts @@ -1,7 +1,3 @@ -import { get_all_users } from '$lib/db'; - export async function load() { - return { - users: get_all_users(), - }; + return { }; } \ No newline at end of file diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 85d47bf..2d7d9a4 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,53 +1,34 @@
{@render children()}
- - diff --git a/src/routes/+page.server.ts b/src/routes/+page.server.ts index ad524d6..fd80880 100644 --- a/src/routes/+page.server.ts +++ b/src/routes/+page.server.ts @@ -1,24 +1,14 @@ -import { get_all_users, create_user } from '$lib/db'; +import { create_user } from '$lib/db'; import { fail, type Actions } from '@sveltejs/kit'; import { marked } from 'marked'; export async function load() { - const users = await get_all_users(); const html = marked.parse('# Sludge And Links\n\n**maybe**.'); - return { users, html }; + return { html }; } export const actions: Actions = { default: async ({ request }: { request: Request }) => { - const formData = await request.formData(); - const name = formData.get('name'); - const email = formData.get('email'); - - if (!name || !email) { - return fail(400, { name, email, error: 'Name and email are required' }); - } - - return create_user(name as string, email as string); } }; diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 5b9ce52..a31f68c 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -5,6 +5,11 @@ $inspect(form); + + Sludge and Link + + +
{@html html}
diff --git a/src/routes/blag/+page.server.ts b/src/routes/blag/+page.server.ts new file mode 100644 index 0000000..30a39c1 --- /dev/null +++ b/src/routes/blag/+page.server.ts @@ -0,0 +1,12 @@ +import { get_all_blags } from '$lib/db' + +export async function load({ fetch, data, setHeaders, parent, depends}) { + return{ + blags: await get_all_blags() + } +} +export const actions = { + default: async({cookies, fetch, getClientAddress, locals, params, platform, request, route, setHeaders, url, isDataRequest}) => { + + } +} \ No newline at end of file diff --git a/src/routes/blag/+page.svelte b/src/routes/blag/+page.svelte new file mode 100644 index 0000000..0e8e94a --- /dev/null +++ b/src/routes/blag/+page.svelte @@ -0,0 +1,44 @@ + + + + + + + +
+

I might decide to write sometime

+
    + {#each data.blags as {title, uri, created_at}} +
  1. {title} @

    {new Date(created_at).toLocaleDateString()}

  2. + {/each} +
+
+ + \ No newline at end of file diff --git a/src/routes/blag/[uri]/+page.server.ts b/src/routes/blag/[uri]/+page.server.ts new file mode 100644 index 0000000..051dfa5 --- /dev/null +++ b/src/routes/blag/[uri]/+page.server.ts @@ -0,0 +1,13 @@ +import {get_blag} from '$lib/db' + +export async function load({ params, fetch, data, setHeaders, parent, depends}) { + console.log('uri', params.uri) + return { + post: get_blag(params.uri) + } +} +export const actions = { + default: async({cookies, fetch, getClientAddress, locals, params, platform, request, route, setHeaders, url, isDataRequest}) => { + + } +} \ No newline at end of file diff --git a/src/routes/blag/[uri]/+page.svelte b/src/routes/blag/[uri]/+page.svelte new file mode 100644 index 0000000..428d8d8 --- /dev/null +++ b/src/routes/blag/[uri]/+page.svelte @@ -0,0 +1,22 @@ + + + + {post.title} + + + +
+

{post.title}

+ {@html post.body} + {post.created_at} +
+ + \ No newline at end of file diff --git a/src/routes/blag/new/+page.server.ts b/src/routes/blag/new/+page.server.ts new file mode 100644 index 0000000..fc485bf --- /dev/null +++ b/src/routes/blag/new/+page.server.ts @@ -0,0 +1,8 @@ +export async function load({}) { + console.log("new blag") +} +export const actions = { + default: async({cookies, fetch, getClientAddress, locals, params, platform, request, route, setHeaders, url, isDataRequest}) => { + + } +} \ No newline at end of file diff --git a/src/routes/blag/new/+page.svelte b/src/routes/blag/new/+page.svelte new file mode 100644 index 0000000..b7f85eb --- /dev/null +++ b/src/routes/blag/new/+page.svelte @@ -0,0 +1,96 @@ + + + + + + + +
+
+

Editor

+
+ +
+
+
+

Preview

+
+ {@html marked.parse(value)} +
+
+
+ + \ No newline at end of file diff --git a/src/routes/fest/+page.svelte b/src/routes/fest/+page.svelte index f00f0c0..a48c0ef 100644 --- a/src/routes/fest/+page.svelte +++ b/src/routes/fest/+page.svelte @@ -3,17 +3,37 @@ - - + !!Sludge Fest 2025!! +
-

Coming Soon™ - 2025

+

August 9 2025

This time its brown

+

At Sludge Farm

+

Come out and enjoy live music and fun times

+

If you'd like to perform fill out this Artist Application

+
\ No newline at end of file diff --git a/src/routes/pork/+page.server.js b/src/routes/pork/+page.server.ts similarity index 100% rename from src/routes/pork/+page.server.js rename to src/routes/pork/+page.server.ts diff --git a/src/routes/pork/+page.svelte b/src/routes/pork/+page.svelte index 726250d..4127017 100644 --- a/src/routes/pork/+page.svelte +++ b/src/routes/pork/+page.svelte @@ -21,12 +21,19 @@ } + + + + Sludge Farm Pork + + +

Farm Raised Pork

this ain't your grocery store's pork
    -
  1. CutWeightStock
  2. +
  3. CutWeight$/#Stock
  4. {#each data.pork as {name, raw_cut, preweighed, min_weight, max_weight, stock}} {@const price_per_lb = raw_cut ? RAW_COST : PROCESSED_COST}
  5. @@ -34,9 +41,10 @@ {#if preweighed} {min_weight} lb {:else} - {min_weight} ~ ${max_weight} lbs + {min_weight} ~ {max_weight} lbs {/if} - {stock} + {price_per_lb}$ + {stock}
  6. {/each}
@@ -47,7 +55,10 @@ \ No newline at end of file diff --git a/src/routes/user/[user]/+page.server.ts b/src/routes/user/[user]/+page.server.ts deleted file mode 100644 index 2d17359..0000000 --- a/src/routes/user/[user]/+page.server.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { get_user } from "$lib/db"; - -export async function load({ params }) { - const user = await get_user(params.user); - console.log(user); - return { user }; -} diff --git a/src/routes/user/[user]/+page.svelte b/src/routes/user/[user]/+page.svelte deleted file mode 100644 index 9fbdc79..0000000 --- a/src/routes/user/[user]/+page.svelte +++ /dev/null @@ -1,16 +0,0 @@ - -
-

{data.user.name}

-

{data.user.email}

-
diff --git a/static/favicon.ico b/static/favicon.ico new file mode 100644 index 0000000..10ca75c Binary files /dev/null and b/static/favicon.ico differ diff --git a/static/favicon.png b/static/favicon.png deleted file mode 100644 index 825b9e6..0000000 Binary files a/static/favicon.png and /dev/null differ diff --git a/static/font/EBGaramond-Initials.otf b/static/font/EBGaramond-Initials.otf index 220684e..dc1f920 100644 Binary files a/static/font/EBGaramond-Initials.otf and b/static/font/EBGaramond-Initials.otf differ diff --git a/static/font/EBGaramond-InitialsF1.otf b/static/font/EBGaramond-InitialsF1.otf index b8683ff..93624a1 100644 Binary files a/static/font/EBGaramond-InitialsF1.otf and b/static/font/EBGaramond-InitialsF1.otf differ diff --git a/static/font/EBGaramond-InitialsF2.otf b/static/font/EBGaramond-InitialsF2.otf index 128bd7f..0c3daa9 100644 Binary files a/static/font/EBGaramond-InitialsF2.otf and b/static/font/EBGaramond-InitialsF2.otf differ diff --git a/static/font/EBGaramond-Italic.ttf b/static/font/EBGaramond-Italic.ttf new file mode 100644 index 0000000..ab46e3f Binary files /dev/null and b/static/font/EBGaramond-Italic.ttf differ diff --git a/static/font/EBGaramond.ttf b/static/font/EBGaramond.ttf new file mode 100644 index 0000000..1466311 Binary files /dev/null and b/static/font/EBGaramond.ttf differ diff --git a/static/font/EBGaramond08-Italic.otf b/static/font/EBGaramond08-Italic.otf deleted file mode 100644 index 00938e6..0000000 Binary files a/static/font/EBGaramond08-Italic.otf and /dev/null differ diff --git a/static/font/EBGaramond08-Regular.otf b/static/font/EBGaramond08-Regular.otf deleted file mode 100644 index b0229f8..0000000 Binary files a/static/font/EBGaramond08-Regular.otf and /dev/null differ diff --git a/static/font/EBGaramond12-AllSC.otf b/static/font/EBGaramond12-AllSC.otf deleted file mode 100644 index 2882bdb..0000000 Binary files a/static/font/EBGaramond12-AllSC.otf and /dev/null differ diff --git a/static/font/EBGaramond12-Italic.otf b/static/font/EBGaramond12-Italic.otf deleted file mode 100644 index 81845af..0000000 Binary files a/static/font/EBGaramond12-Italic.otf and /dev/null differ diff --git a/static/font/EBGaramond12-Regular.otf b/static/font/EBGaramond12-Regular.otf deleted file mode 100644 index 6f26875..0000000 Binary files a/static/font/EBGaramond12-Regular.otf and /dev/null differ diff --git a/static/font/EBGaramondSC08-Regular.otf b/static/font/EBGaramondSC08-Regular.otf deleted file mode 100644 index b71442b..0000000 Binary files a/static/font/EBGaramondSC08-Regular.otf and /dev/null differ diff --git a/static/font/EBGaramondSC12-Regular.otf b/static/font/EBGaramondSC12-Regular.otf deleted file mode 100644 index 7912787..0000000 Binary files a/static/font/EBGaramondSC12-Regular.otf and /dev/null differ diff --git a/static/font/LibreBaskerville-Bold.otf b/static/font/LibreBaskerville-Bold.otf new file mode 100644 index 0000000..91d049b Binary files /dev/null and b/static/font/LibreBaskerville-Bold.otf differ diff --git a/static/font/LibreBaskerville-Italic.otf b/static/font/LibreBaskerville-Italic.otf new file mode 100644 index 0000000..6c8eefa Binary files /dev/null and b/static/font/LibreBaskerville-Italic.otf differ diff --git a/static/font/LibreBaskerville-Regular.otf b/static/font/LibreBaskerville-Regular.otf new file mode 100644 index 0000000..409c256 Binary files /dev/null and b/static/font/LibreBaskerville-Regular.otf differ