From 35eeec85aa30593f36e211f2a949ed5af8796316 Mon Sep 17 00:00:00 2001 From: Tim Clulow Date: Fri, 29 Mar 2024 23:38:14 +1300 Subject: [PATCH] cool --- deno.json | 2 +- server/service.ts | 2 ++ src/_includes/webc/dewc-like.webc | 32 ++++++++++++++++++++++++++++--- src/css/style.css | 2 ++ 4 files changed, 34 insertions(+), 4 deletions(-) diff --git a/deno.json b/deno.json index e33d471..0af0446 100644 --- a/deno.json +++ b/deno.json @@ -1,7 +1,7 @@ { "tasks": { "clean": "rm -rf _site", - "writeKVData": "deno run --allow-write server/write-data.ts", + "writeKVData": "deno run --allow-write --unstable-kv server/write-data.ts", "generate": "deno task clean && deno run --allow-read --allow-write --allow-env --allow-sys npm:@11ty/eleventy@canary", "generateSlim": "LAYOUT=slim deno run --allow-read --allow-write --allow-env --allow-sys npm:@11ty/eleventy@canary", "tscheck": "deno check server/main.ts", diff --git a/server/service.ts b/server/service.ts index 6ca2c34..ca1ee07 100644 --- a/server/service.ts +++ b/server/service.ts @@ -32,6 +32,8 @@ async function checkAlreadyLiked (ctx: Context){ alreadyLiked = true; } + alreadyLiked = false; + return {likes, alreadyLiked} } diff --git a/src/_includes/webc/dewc-like.webc b/src/_includes/webc/dewc-like.webc index 299b40c..eb0cd5b 100644 --- a/src/_includes/webc/dewc-like.webc +++ b/src/_includes/webc/dewc-like.webc @@ -6,14 +6,15 @@ data-hx-target="#likeme" data-hx-select="#likeme" data-hx-trigger="load" - data-hx-get="/likes.html"> + data-hx-get="/likes.html"> + diff --git a/src/css/style.css b/src/css/style.css index ccd98be..49b8d92 100644 --- a/src/css/style.css +++ b/src/css/style.css @@ -26,6 +26,8 @@ "b" "c"; height: 100%; + max-width: 90ch; + margin: auto; } main{