mirror of
https://github.com/mikkelsvartveit/astro-personal-website.git
synced 2025-12-22 19:22:37 +00:00
Fix view counter
This commit is contained in:
parent
6edd8ba2cf
commit
7caeb6a0c9
2 changed files with 22 additions and 19 deletions
|
|
@ -15,9 +15,11 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<span class="inline-flex items-center space-x-1">
|
{#if counter !== null}
|
||||||
<span class="px-1">⋅</span>
|
<span
|
||||||
|
class="inline-flex items-center space-x-1"
|
||||||
|
transition:fade={{ duration: 200, easing: expoIn }}
|
||||||
|
>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" height="12">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" height="12">
|
||||||
<!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
|
<!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
|
||||||
<style>
|
<style>
|
||||||
|
|
@ -31,7 +33,6 @@
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
||||||
{#if counter !== null}
|
<span>{counter}</span>
|
||||||
<span transition:fade={{ duration: 200, easing: expoIn }}>{counter}</span>
|
</span>
|
||||||
{/if}
|
{/if}
|
||||||
</span>
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,9 @@ const title = headings[0].text;
|
||||||
}
|
}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<ArticleViewCounter articleSlug={project.slug} client:load />
|
<span class="px-2">⋅</span>
|
||||||
|
|
||||||
|
<ArticleViewCounter articleSlug={project.slug} client:only="svelte" />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<ProseLayout>
|
<ProseLayout>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue