diff --git a/.gitignore b/.gitignore index 936a4bf..ddd34c5 100644 --- a/.gitignore +++ b/.gitignore @@ -28,4 +28,7 @@ vite.config.ts.timestamp-* *.png # Databases -*.db \ No newline at end of file +*.db + +# zips +*.zip \ No newline at end of file diff --git a/prod.db b/prod.db index e69de29..561f289 100644 Binary files a/prod.db and b/prod.db differ diff --git a/src/lib/db/index.ts b/src/lib/db/index.ts index 02a4b23..906db10 100644 --- a/src/lib/db/index.ts +++ b/src/lib/db/index.ts @@ -4,6 +4,28 @@ import { dev } from '$app/environment'; // Initialize the database const db = new Database(dev ? 'dev.db' : 'prod.db', { create: true}); +db.exec(` + CREATE TABLE IF NOT EXISTS users ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + name TEXT NOT NULL, + email TEXT UNIQUE NOT NULL, + created_at DATETIME DEFAULT CURRENT_TIMESTAMP + ); +`); + +db.exec(` + CREATE TABLE IF NOT EXISTS + 'pork_cuts' ( + 'id' integer not null primary key autoincrement, + 'name' varchar(40) null, + 'raw_cut' BOOLEAN null, + 'stock' INT null default 0, + "preweighed" BOOLEAN NULL, + "min_weight" DOUBLE NULL, + "max_weight" DOUBLE NULL, + unique ('id') + ) +`); // Close the database connection when the application shuts down process.on('SIGINT', () => { diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 5b5295d..85d47bf 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -12,6 +12,12 @@ $inspect(data); + +
{@render children()}
@@ -44,6 +50,22 @@ // background-repeat: no-repeat; background-attachment: fixed; } + nav{ + padding: 0 20%; + display: flex; + gap: 1rem; + justify-content: flex-end; + a{ + text-decoration: none; + &:first-child{ + margin-right: auto; + } + &:hover{ + color: $orange; + } + } + } + main { display: flex; flex-direction: row; @@ -62,11 +84,11 @@ font-size: 100%; font: inherit; color: inherit; - font-family: "Garamond",sans-serif; + font-family: "Garamond", serif; vertical-align: baseline; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; - text-size-adjust: none; + font-size-adjust: 0.75; } diff --git a/src/routes/+page.server.ts b/src/routes/+page.server.ts index 2cbeda9..ad524d6 100644 --- a/src/routes/+page.server.ts +++ b/src/routes/+page.server.ts @@ -4,7 +4,7 @@ import { marked } from 'marked'; export async function load() { const users = await get_all_users(); - const html = marked.parse('# Marked in Node.js\n\nRendered by **marked**.'); + const html = marked.parse('# Sludge And Links\n\n**maybe**.'); return { users, html }; } diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index eb3aaa3..5b9ce52 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -6,30 +6,7 @@
-

Add User

- {#if form?.error} -

{form.error}

- {/if} -
{@html html}
-

User List

-
diff --git a/src/routes/fest/+page.svelte b/src/routes/fest/+page.svelte new file mode 100644 index 0000000..f00f0c0 --- /dev/null +++ b/src/routes/fest/+page.svelte @@ -0,0 +1,19 @@ + + + + + + + +
+

Coming Soon™ - 2025

+

This time its brown

+
+ + \ No newline at end of file diff --git a/src/routes/pork/+page.svelte b/src/routes/pork/+page.svelte index 75fbe6c..726250d 100644 --- a/src/routes/pork/+page.svelte +++ b/src/routes/pork/+page.svelte @@ -13,38 +13,23 @@ }; } - let selected = $state({ - name: "Chop" - }) + let selected = $state("Chop") + + function change_photo({target:{id}}){ + console.log(id) + selected = id + }
-

Pork

- - - +

Farm Raised Pork

+
this ain't your grocery store's pork
  1. CutWeightStock
  2. {#each data.pork as {name, raw_cut, preweighed, min_weight, max_weight, stock}} {@const price_per_lb = raw_cut ? RAW_COST : PROCESSED_COST} -
  3. +
  4. {name} {#if preweighed} {min_weight} lb @@ -55,12 +40,16 @@
  5. {/each}
- {`Image + {`Image