Skip to content

Commit 9321473

Browse files
committed
live activity changes and popup leaderboar tweak
1 parent 3a67ef4 commit 9321473

3 files changed

Lines changed: 21 additions & 3 deletions

File tree

src/components/MockTerminal/MockTerminal.css

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,15 @@
115115
}
116116

117117
.mock-terminal__hint {
118+
display: inline-block;
119+
overflow: hidden;
120+
white-space: nowrap;
121+
vertical-align: bottom;
118122
font-size: 11.5px;
119-
font-style: italic;
120123
color: rgba(55, 65, 70, 0.4);
121124
transition: color 0.2s ease;
125+
/* 32ch = length of "click to see live user activity" */
126+
animation: mock-terminal-typing 5s steps(32, end) infinite;
122127
}
123128

124129
[data-theme="dark"] .mock-terminal__hint {
@@ -133,6 +138,18 @@
133138
color: rgba(244, 246, 243, 0.6);
134139
}
135140

141+
@keyframes mock-terminal-typing {
142+
0% {
143+
width: 0;
144+
}
145+
55% {
146+
width: 32ch;
147+
}
148+
100% {
149+
width: 32ch;
150+
}
151+
}
152+
136153
@keyframes mock-terminal-blink {
137154
0%,
138155
100% {

src/components/MockTerminal/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ const MockTerminal: React.FC<MockTerminalProps> = ({ onPromptClick }) => {
5353
}}
5454
>
5555
<span className="mock-terminal__prompt">$</span>{" "}
56-
<span className="mock-terminal__cursor" />{" "}
5756
<span className="mock-terminal__hint">
5857
click to see live user activity
5958
</span>
59+
<span className="mock-terminal__cursor" />
6060
</div>
6161
</div>
6262
</div>

src/theme/Root.module.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/* Base styles for the toast container */
22
.toastContainer {
33
position: fixed;
4-
top: 40px;
4+
/* Sit just below the navbar instead of overlapping it */
5+
top: calc(var(--ifm-navbar-height, 60px) + 10px);
56
right: 24px;
67
border: 1px solid oklch(0.69 0 0);
78
border-radius: 8px; /* Docusaurus --radius var is often 8px */

0 commit comments

Comments
 (0)