Skip to content

Commit aebfa21

Browse files
Develop: Added Google Analytics (#161)
2 parents 9cfb929 + c22fe91 commit aebfa21

File tree

17 files changed

+65
-179
lines changed

17 files changed

+65
-179
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@recursivezero/abcd",
3-
"version": "3.2.2",
3+
"version": "3.2.3",
44
"description": "A website for our kids trial phase of abcdkbd.com",
55
"homepage": "https://abcdkbd.com",
66
"displayName": "abcd",

src/assets/icons/close.svg

Lines changed: 5 additions & 5 deletions
Loading

src/assets/styles/draw.css

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -304,21 +304,6 @@
304304
}
305305

306306
@media (max-width: 480px) {
307-
#keyboard-trigger {
308-
height: 32px !important;
309-
width: 32px !important;
310-
}
311-
312-
.share-trigger-button {
313-
height: 32px !important;
314-
width: 32px !important;
315-
}
316-
317-
.share-trigger-button svg {
318-
height: 12px !important;
319-
width: 12px !important;
320-
}
321-
322307
.controls {
323308
right: 0;
324309
padding: 0.25rem;

src/assets/styles/footer.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@
274274
transition: transform 0.2s ease-in-out;
275275
}
276276

277-
.footer__nav--item[open]>summary .fa-chevron-down {
277+
.footer__nav--item[open] > summary .fa-chevron-down {
278278
transform: rotate(180deg);
279279
}
280280

@@ -291,4 +291,4 @@
291291
margin-top: 1rem;
292292
font-size: 0.85rem;
293293
}
294-
}
294+
}

src/assets/styles/setting.css

Lines changed: 0 additions & 8 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
}

src/assets/styles/stories/stories.css

Lines changed: 1 addition & 3 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;

src/assets/styles/varnmala/reader.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
.container__reader > .letter {
3232
width: 100%;
3333
box-sizing: border-box;
34-
margin-left: 4rem;
3534
display: flex;
3635
align-items: center;
3736
justify-content: space-evenly;

src/components/Analytics.astro

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

src/components/ControllerContainer.astro

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import BackgroundToggle from "@/components/draw/BgToggle.astro";
77
import ResetButton from "@/components/draw/ResetButton.astro";
88
import SharePopover from "@/components/ShareButton.astro";
99
import Help from "@/components/Help.astro";
10-
import Speak from "@/components/Speaker.astro";
10+
import AudioToggle from "@/components/Speaker.astro";
1111
import KeyboardTrigger from "@/components/KeyboardTrigger.astro";
1212
---
1313

@@ -22,7 +22,7 @@ import KeyboardTrigger from "@/components/KeyboardTrigger.astro";
2222
<KeyboardTrigger />
2323
<SharePopover />
2424
</div>
25-
<Speak />
25+
<AudioToggle />
2626
<Help
2727
title="Draw Keyboard"
2828
description="Draw letters by sliding your finger across the keys! Try the buttons to change the style, make it BIG or small, change the images, pick cool backgrounds, and customize font colors!"
@@ -57,6 +57,7 @@ import KeyboardTrigger from "@/components/KeyboardTrigger.astro";
5757
isKeyboardNav = false;
5858
controlButtons.forEach((btn) => btn.classList.remove("keyboard-focus"));
5959
});
60+
//for the audio feature
6061
document.addEventListener("keydown", (event) => {
6162
const e = event as KeyboardEvent;
6263
if (e.key === "Tab") {

0 commit comments

Comments
 (0)