From 7caeb6a0c9d47f6cd44df3d486676aadf0049241 Mon Sep 17 00:00:00 2001
From: Mikkel Svartveit
Date: Mon, 13 May 2024 01:00:10 -0700
Subject: [PATCH] Fix view counter
---
src/components/ArticleViewCounter.svelte | 37 ++++++++++++------------
src/pages/articles/[article].astro | 4 ++-
2 files changed, 22 insertions(+), 19 deletions(-)
diff --git a/src/components/ArticleViewCounter.svelte b/src/components/ArticleViewCounter.svelte
index af96efd..3acecb3 100644
--- a/src/components/ArticleViewCounter.svelte
+++ b/src/components/ArticleViewCounter.svelte
@@ -15,23 +15,24 @@
});
-
- ⋅
+{#if counter !== null}
+
+
-
- {#if counter !== null}
- {counter}
- {/if}
-
+ {counter}
+
+{/if}
diff --git a/src/pages/articles/[article].astro b/src/pages/articles/[article].astro
index 3350919..02f0145 100644
--- a/src/pages/articles/[article].astro
+++ b/src/pages/articles/[article].astro
@@ -37,7 +37,9 @@ const title = headings[0].text;
}
-
+ ⋅
+
+