Skip to content

Commit

Permalink
Add google analytics and make project cards load on client for client…
Browse files Browse the repository at this point in the history
… side aria labels
  • Loading branch information
daniel-panhead committed Apr 19, 2024
1 parent 47616a0 commit 342d02d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/ProjectsContentSection.astro
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const { maxProjects} = Astro.props;
<div class="projects-cards">
{projects.slice(0, maxProjects ?? projects.length).map((project) => (
<ProjectCard
client:idle
client:only
title={project.title}
tagline={project.tagline}
link={project.link}
Expand Down
33 changes: 26 additions & 7 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
import Navbar from './Navbar.astro';
import Navbar from "./Navbar.astro";
interface Props {
title: string;
showNav?: boolean
showNav?: boolean;
}
const { title, showNav = true } = Astro.props;
Expand All @@ -19,6 +19,18 @@ const { title, showNav = true } = Astro.props;
<meta name="generator" content={Astro.generator} />
<title>{title}</title>
</head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-T6DTLYXZ5Z"
></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());

gtag("config", "G-T6DTLYXZ5Z");
</script>
<body>
{showNav && <Navbar />}
<slot />
Expand All @@ -39,11 +51,18 @@ const { title, showNav = true } = Astro.props;
--default-border-radius: 9px;
}

.bg-primary { background-color: var(--primary); }
.text-primary { color: var(--primary-text) }
.text-secondary { color: var(--secondary-text) }
.text-tertiary { color: var(--tertiary-text) }

.bg-primary {
background-color: var(--primary);
}
.text-primary {
color: var(--primary-text);
}
.text-secondary {
color: var(--secondary-text);
}
.text-tertiary {
color: var(--tertiary-text);
}

html {
font-family: "Work Sans", system-ui, sans-serif;
Expand Down

0 comments on commit 342d02d

Please sign in to comment.