Skip to content

Commit cbc25f4

Browse files
committed
added help to reader and updated css
1 parent 58738cd commit cbc25f4

File tree

2 files changed

+19
-16
lines changed

2 files changed

+19
-16
lines changed

src/assets/styles/reader.css

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
--main__txt--2: #ff61d5;
44
--button__bg--3: hsl(60deg, 56%, 91%);
55
}
6-
#reader-main {
6+
7+
#container__reader {
78
font-size: 20rem;
89
display: grid;
910
place-content: center;
@@ -18,17 +19,20 @@
1819
min-height: 60vh;
1920
line-height: 1;
2021
padding: 1rem;
22+
23+
& span:hover,
24+
span:active,
25+
span.active {
26+
background-color: aliceblue;
27+
color: #6767d3;
28+
}
2129
}
2230

2331
.center {
2432
display: grid;
2533
place-items: center;
2634
}
2735

28-
.hide {
29-
display: none;
30-
}
31-
3236
.scroll {
3337
margin-top: 10px;
3438
scroll-behavior: smooth;
@@ -61,14 +65,7 @@
6165
cursor: pointer;
6266
}
6367

64-
.speaker > span {
68+
.speaker>span {
6569
padding: 0.5rem;
6670
border: 1px solid grey;
67-
}
68-
69-
span:hover,
70-
span:active,
71-
span.active {
72-
background-color: aliceblue;
73-
color: #6767d3;
74-
}
71+
}

src/pages/reader.astro

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
import "@/assets/styles/reader.css";
3+
import Help from "@/components/Help.astro";
34
import BaseLayout from "@/layouts/Base";
45
---
56

@@ -12,15 +13,20 @@ import BaseLayout from "@/layouts/Base";
1213
<span data-name="mudra">Mudra</span>
1314
<span data-name="rutvi">Rutvi</span>
1415
</div>
16+
17+
<Help
18+
title="Reader"
19+
description="Press any letter key (A-Z) to display it with a related emoji. Toggle the speaker buttons to change voices, and use the audio button to mute/unmute sounds."
20+
/>
1521
</Fragment>
16-
<article id="reader-main"></article>
22+
<article id="container__reader">a🍎</article>
1723
<section class="section--audio hide">
1824
<audio id="audioPlayer" controlslist="nodownload" controls autoplay></audio>
1925
</section>
2026
<script>
2127
import { emojiList, isAlphabet, isNumber, random } from "@/utils/utils.js";
2228

23-
const mainBlock = document.querySelector("#reader-main") as HTMLElement;
29+
const mainBlock = document.querySelector("#container__reader") as HTMLElement;
2430
const muteButton = document.querySelector("#mute") as HTMLButtonElement;
2531
const audioPlayer = document.querySelector("#audioPlayer") as HTMLAudioElement;
2632
const speaker = document.querySelector("#speaker") as HTMLElement;

0 commit comments

Comments
 (0)