File tree Expand file tree Collapse file tree 3 files changed +118
-4
lines changed Expand file tree Collapse file tree 3 files changed +118
-4
lines changed Original file line number Diff line number Diff line change 11import { createRef , useCallback , useMemo } from "react" ;
22import { useState , useEffect } from "react" ;
33import { useLocation , useNavigate } from "react-router-dom" ;
4-
54import routes from "../routes" ;
65import BitButton from "../components/BitButton.component" ;
76import BitCounter from "../BitCounter" ;
Original file line number Diff line number Diff line change 1+ .typewriter h1 {
2+ border-right : .15em solid var (--caret );
3+ }
4+
5+ .typewriter {
6+ --caret : currentcolor;
7+ }
8+
9+ .typewriter ::before {
10+ content : "" ;
11+ animation : typing 1s forwards;
12+ }
13+
14+ .typewriter ::after {
15+ content : "" ;
16+ border-right : 1.5rem solid var (--caret );
17+ margin-left : .5rem ;
18+ animation : blink 1.5s steps (2 ) infinite;
19+ }
20+
21+ @keyframes typing {
22+ 0% {
23+ content : "" ;
24+ }
25+
26+ 5% {
27+ content : "1" ;
28+ }
29+
30+ 10% {
31+ content : "12" ;
32+ }
33+
34+ 15% {
35+ content : "12-" ;
36+ }
37+
38+ 20% {
39+ content : "12-b" ;
40+ }
41+
42+ 25% {
43+ content : "12-bi" ;
44+ }
45+
46+ 30% {
47+ content : "12-bit" ;
48+ }
49+
50+ 35% {
51+ content : "12-bit " ;
52+ }
53+
54+ 40% {
55+ content : "12-bit b" ;
56+ }
57+
58+ 45% {
59+ content : "12-bit bi" ;
60+ }
61+
62+ 50% {
63+ content : "12-bit bin" ;
64+ }
65+
66+ 55% {
67+ content : "12-bit bina" ;
68+ }
69+
70+ 60% {
71+ content : "12-bit binar" ;
72+ }
73+
74+ 65% {
75+ content : "12-bit binary" ;
76+ }
77+
78+ 70% {
79+ content : "12-bit binary " ;
80+ }
81+
82+ 75% {
83+ content : "12-bit binary t" ;
84+ }
85+
86+ 80% {
87+ content : "12-bit binary ti" ;
88+ }
89+
90+ 85% {
91+ content : "12-bit binary tim" ;
92+ }
93+
94+ 90% {
95+ content : "12-bit binary time" ;
96+ }
97+
98+ 100% {
99+ content : "12-bit binary timer" ;
100+ }
101+ }
102+
103+ @keyframes blink {
104+
105+ 0% {
106+ opacity : 0 ;
107+ }
108+ }
109+
110+ @media (prefers-reduced-motion) {
111+ .typewriter ::after {
112+ animation : none;
113+ }
114+ }
Original file line number Diff line number Diff line change 11import { createRef , useMemo } from "react" ;
22import { useEffect , useState } from "react" ;
33import { useNavigate } from "react-router-dom" ;
4-
54import { faPlay } from "@fortawesome/free-solid-svg-icons" ;
6-
75import { Button , ButtonType } from "../components/Button.component" ;
86import BitButton from "../components/BitButton.component" ;
97import BitCounter from "../BitCounter" ;
8+ import styles from "./TimerSetup.module.css" ;
109
1110function TimerSetup ( ) {
1211 const navigate = useNavigate ( ) ;
@@ -63,7 +62,9 @@ function TimerSetup() {
6362
6463 return (
6564 < div className = "flex flex-col items-center justify-center text-center" >
66- < h1 className = "text-5xl uppercase mb-8" > 12-bit Binary timer</ h1 >
65+ < h1 className = "text-5xl uppercase mb-8" >
66+ < span className = { styles . typewriter } />
67+ </ h1 >
6768 < div className = "flex flex-row justify-center align-center flex-wrap mt-8" >
6869 { selectedBits . map ( ( _ , index ) => (
6970 < BitButton
You can’t perform that action at this time.
0 commit comments