Skip to content

Commit 3771a80

Browse files
committed
added help to typing and updated css
1 parent eb40ba9 commit 3771a80

File tree

2 files changed

+38
-33
lines changed

2 files changed

+38
-33
lines changed

src/assets/styles/typing.css

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
:root {
33
--letter__txt--2: blueviolet;
44
--spelling__txt--3: palevioletred;
5-
}
6-
:root {
75
--steps: 10;
86
}
97

10-
article.main {
8+
.container__typing {
119
display: grid;
1210
grid-template-columns: repeat(2, 1fr);
1311
grid-template-rows: 40% auto;
@@ -18,38 +16,38 @@ article.main {
1816
font-size: 1rem;
1917
place-items: center;
2018
will-change: contents;
21-
}
2219

23-
.letter {
24-
grid-area: letter;
25-
font-size: 18em;
26-
color: var(--letter__txt--2);
27-
transition: color 0.5s ease-in;
28-
}
20+
& .letter {
21+
grid-area: letter;
22+
font-size: 18em;
23+
color: var(--letter__txt--2);
24+
transition: color 0.5s ease-in;
25+
}
2926

30-
.emoji {
31-
grid-area: emoji;
32-
font-size: 10em;
33-
}
27+
& .emoji {
28+
grid-area: emoji;
29+
font-size: 10em;
30+
}
3431

35-
.animation {
36-
animation:
37-
typing 1s steps(var(--steps, 10)),
38-
blink 0.5s step-end infinite alternate;
39-
}
32+
& .animation {
33+
animation:
34+
typing 1s steps(var(--steps, 10)),
35+
blink 0.5s step-end infinite alternate;
36+
}
4037

41-
.spelling {
42-
grid-area: spelling;
43-
grid-column: 1/3;
44-
grid-row: 2/3;
45-
width: 6ch;
46-
white-space: nowrap;
47-
overflow: hidden;
48-
border-right: 3px solid;
49-
font-family: monospace;
50-
font-size: 8em;
51-
transition: all 0.5s ease-in-out;
52-
color: var(--spelling__txt--3);
38+
& .spelling {
39+
grid-area: spelling;
40+
grid-column: 1/3;
41+
grid-row: 2/3;
42+
width: 6ch;
43+
white-space: nowrap;
44+
overflow: hidden;
45+
border-right: 3px solid;
46+
font-family: monospace;
47+
font-size: 8em;
48+
transition: all 0.5s ease-in-out;
49+
color: var(--spelling__txt--3);
50+
}
5351
}
5452

5553
@keyframes typing {
@@ -62,4 +60,4 @@ article.main {
6260
50% {
6361
border-color: transparent;
6462
}
65-
}
63+
}

src/pages/typing.astro

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

67
<BaseLayout meta={{ title: "Typing" }}>
7-
<article class="main">
8+
<Fragment slot="header-right">
9+
<Help
10+
title="Typing"
11+
description="Press any letter key (A-Z) to see the letter, related emoji, and spelling word animation."
12+
/>
13+
</Fragment>
14+
<article class="tv container__typing">
815
<div class="letter">A</div>
916
<div class="emoji">🎸</div>
1017
<div class="spelling animation" id="spelling">Apple</div>

0 commit comments

Comments
 (0)