Skip to content

Commit

Permalink
chore: Update Google Analytics tracking code and improve link styles …
Browse files Browse the repository at this point in the history
…in Layout.astro
  • Loading branch information
RND332 committed Jun 16, 2024
1 parent 2fd32b6 commit 06ec31d
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ const pages: Array<Page> = [
<title>RND</title>
<ViewTransitions />
<script
is:inline
type="text/partytown"
src="https://www.googletagmanager.com/gtag/js?id=G-VSD6GSYPH2"
></script>
<script type="text/partytown">
<script is:inline type="text/partytown">
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
Expand Down Expand Up @@ -62,7 +63,7 @@ const pages: Array<Page> = [
currentPage == undefined ? "who" : currentPage;
const isCurrentPage = currentPageId === page.id;

let styles = "px-2 ";
let styles = "w-full px-2 ";
if (index % 3 === 0) {
styles += "border-r border-[#30363d] ";
} else if (index % 3 === 1) {
Expand All @@ -74,11 +75,13 @@ const pages: Array<Page> = [
}

return (
<li class={styles}>
<a href={page.url} target="_self">
{page.title}
</a>
</li>
<a
class="w-full active-link"
href={page.url}
target="_self"
>
<li class={styles}>{page.title}</li>
</a>
);
})
}
Expand Down Expand Up @@ -134,6 +137,16 @@ const pages: Array<Page> = [
Courier New,
monospace;
}

.active-link:hover {
transition: color 0.3s ease;
color: color-mix(in srgb, white 50%, black 50%);
}

.active-link:active {
transition: color 0.3s ease;
color: color-mix(in srgb, white 50%, black 50%);
}
</style>
</body>
</html>

0 comments on commit 06ec31d

Please sign in to comment.