Refactor Analytics component to encode URI parameters
All checks were successful
Test / test (push) Successful in 39s
Test / test (pull_request) Successful in 37s

This commit is contained in:
Valentin Popov 2024-09-12 23:33:43 +00:00
parent 33c9464dad
commit b8fd186801
Signed by: Valentin Popov
GPG Key ID: AE3CE523DAAA8401
3 changed files with 5 additions and 4 deletions

View File

@ -13,5 +13,5 @@ const { title } = Astro.props;
<!-- GoatCounter -->
<script is:inline data-goatcounter="https://analytics.popov.link/count" src="//gc.zgo.at/count.js"></script>
<noscript>
<img alt="pixel" src={`https://analytics.popov.link/count?p=${path}&t=${title}`} />
<img alt="pixel" src={`https://analytics.popov.link/count?p=${encodeURI(path)}&t=${encodeURI(title)}`} />
</noscript>

View File

@ -12,7 +12,7 @@
left: 0;
line-height: 3.5em;
opacity: 0.975;
position: fixed;
position: absolute;
right: 0;
top: 0;
}
@ -36,6 +36,7 @@
@media (width <=684px) {
header {
box-shadow: none;
position: fixed;
}
nav {
@ -50,6 +51,6 @@
<header>
<nav>
<a href="/feed.xml">RSS</a>
<a href="/">Home</a>
</nav>
</header>

View File

@ -35,7 +35,7 @@ body {
margin: auto;
max-width: 52em;
min-height: 100vh;
padding: 6em 4em 4em;
padding: 4em;
text-rendering: optimizelegibility;
}