Skip to content

Commit 6730d91

Browse files
committed
[RZA-250159]: added google analytics
1 parent 0b24669 commit 6730d91

File tree

8 files changed

+27
-24
lines changed

8 files changed

+27
-24
lines changed

src/assets/icons/close.svg

Lines changed: 5 additions & 5 deletions
Loading

src/assets/styles/setting.css

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,15 @@
1919
transition: transform 330ms ease-in-out;
2020

2121
&::after {
22-
/*content: '🕸';*/
2322
outline: 1px solid slateblue;
2423
}
25-
26-
/*&:hover {
27-
transform: scale(1.05) rotate(45deg);
28-
}*/
2924
}
3025

3126
@media (max-width: 480px) {
3227
.setting__trigger {
3328
font-size: 0.6rem;
34-
/* Adjust font size for smaller screens */
3529
width: 2.5rem;
36-
/* Adjust width for smaller screens */
3730
height: 2.5rem;
38-
/* Adjust height for smaller screens */
3931
margin-top: 12px;
4032
}
4133
}
@@ -155,4 +147,4 @@
155147
transform: scale(1.05) rotate(45deg);
156148
}
157149
}
158-
}
150+
}

src/assets/styles/stories/stories.css

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@
290290
}
291291

292292
.reading-time {
293-
color: light-dark(#000000, #ffffff);
293+
/*color: light-dark(#000000, #ffffff);*/
294294
font-weight: 500;
295295
display: flex;
296296
align-items: center;
@@ -335,7 +335,6 @@
335335

336336
.story-description {
337337
font-size: clamp(1rem, 2.5vw, 1.25rem);
338-
color: light-dark(#000000, #ffffff);
339338
margin-bottom: 2rem;
340339
line-height: 1.7;
341340
max-width: 800px;
@@ -372,7 +371,6 @@
372371
}
373372

374373
.category-badge {
375-
color: light-dark(#000000, #ffffff);
376374
padding: 0.3rem 0.9rem;
377375
border-radius: 9999px;
378376
font-size: 15px;
@@ -506,4 +504,4 @@
506504
width: 18px;
507505
height: 18px;
508506
}
509-
}
507+
}

src/components/Analytics.astro

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
const GA_ID = "G-GV20S7JE8Q";
3+
---
4+
5+
<script async src={`https://www.googletagmanager.com/gtag/js?id=${GA_ID}`} is:inline></script>
6+
<script>
7+
window.dataLayer = window.dataLayer || [];
8+
function gtag() {
9+
{
10+
dataLayer.push(arguments);
11+
}
12+
}
13+
gtag("js", new Date());
14+
gtag("config", "{GA_ID}");
15+
</script>

src/layouts/BaseHead.astro

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import "@/assets/styles/globals.css";
55
import { siteConfig } from "@/site-config";
66
import "@fontsource/roboto";
7+
import Analytics from "../components/Analytics.astro";
78
89
const { title, description, ogImage, articleDate } = Astro.props;
910
@@ -76,5 +77,6 @@ const socialImageURL = new URL(ogImage ? ogImage : "/assets/icons/logo.png", Ast
7677
<link rel="alternate" type="application/rss+xml" title={siteConfig.title} href="/rss.xml" />
7778

7879
<meta name="generator" content={Astro.generator} />
80+
<Analytics />
7981

8082
<!--<ClientRouter />-->

src/layouts/common/Footer.astro

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import "@/assets/styles/footer.css";
33
import ToggleIcon from "@/assets/icons/toggle.svg";
44
---
55

6-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" />
76
<div class="container__footer">
87
<div class="footer__main-content">
98
<!-- Brand and description -->
@@ -13,7 +12,7 @@ import ToggleIcon from "@/assets/icons/toggle.svg";
1312
</div>
1413
<p>Making learning fun and engaging for young minds everywhere.</p>
1514
<div class="social hide">
16-
<a href="https://twitter.com/" aria-label="X" target="_blank" rel="noopener noreferrer"
15+
<a href="https://twitter.com/abcd_kbd" aria-label="X" target="_blank" rel="noopener noreferrer"
1716
><i class="fa-brands fa-x-twitter"></i></a
1817
>
1918
<a href="https://facebook.com/" aria-label="Facebook" target="_blank" rel="noopener noreferrer"

src/pages/contact.astro

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,10 @@ const meta = {
5151
.writeText(emailText)
5252
.then(() => {
5353
// Success feedback
54-
copyIcon.classList.remove("fa-copy");
55-
copyIcon.classList.add("fa-check");
5654
copyButton.title = "Copied!";
5755

5856
// Revert back after 2 seconds
5957
setTimeout(() => {
60-
copyIcon.classList.remove("fa-check");
61-
copyIcon.classList.add("fa-copy");
6258
copyButton.title = "Copy email";
6359
}, 2000);
6460
})

src/pages/poems.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ const meta = {
4242
<PoemDialog />
4343
</div>
4444
</BaseLayout>
45+

0 commit comments

Comments
 (0)