Skip to content

Commit cde852c

Browse files
committed
chore: merch banner, anniversary
1 parent d3fa7c9 commit cde852c

File tree

6 files changed

+41
-15
lines changed

6 files changed

+41
-15
lines changed

frontend/src/html/header.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
<h1 class="text">
4242
<div class="top">monkey see</div>
4343
monkeytype
44+
45+
<div class="bottom">5 year anniversary!</div>
4446
</h1>
4547
</a>
4648
<nav>

frontend/src/styles/nav.scss

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,10 +294,29 @@ header {
294294
user-select: none;
295295

296296
.bottom {
297-
margin-left: -0.15rem;
297+
// margin-left: -0.15rem;
298+
// color: var(--main-color);
299+
// transition: 0.25s;
300+
// cursor: pointer;
301+
font-size: 0.4em;
302+
position: absolute;
303+
right: -10px;
304+
bottom: -20px;
298305
color: var(--main-color);
299-
transition: 0.25s;
300-
cursor: pointer;
306+
transform: rotate(-5deg);
307+
animation: pulse 1.5s infinite;
308+
}
309+
310+
@keyframes pulse {
311+
0% {
312+
transform: rotate(-5deg) scale(1);
313+
}
314+
50% {
315+
transform: rotate(-5deg) scale(1.1);
316+
}
317+
100% {
318+
transform: rotate(-5deg) scale(1);
319+
}
301320
}
302321
&:focus-visible {
303322
outline: none;
@@ -392,6 +411,10 @@ header {
392411
opacity: 0 !important;
393412
}
394413

414+
#logo .bottom {
415+
opacity: 0 !important;
416+
}
417+
395418
.config {
396419
opacity: 0 !important;
397420
}
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
import { z } from "zod";
22
import { LocalStorageWithSchema } from "../utils/local-storage-with-schema";
3-
// import * as Notifications from "./notifications";
3+
import * as Notifications from "./notifications";
44

55
const closed = new LocalStorageWithSchema({
6-
key: "merchBannerClosed",
6+
key: "merchBannerClosed2",
77
schema: z.boolean(),
88
fallback: false,
99
});
1010

1111
export function showIfNotClosedBefore(): void {
1212
if (!closed.get()) {
13-
// Notifications.addBanner(
14-
// `Check out our merchandise, available at <a target="_blank" rel="noopener" href="https://monkeytype.store/">monkeytype.store</a>`,
15-
// 1,
16-
// "./images/merch2.png",
17-
// false,
18-
// () => {
19-
// closed.set(true);
20-
// },
21-
// true
22-
// );
13+
Notifications.addBanner(
14+
`New merch store now open, including a limited edition metal keycap! <a target="_blank" rel="noopener" href="https://mktp.co/merch">monkeytype.store</a>`,
15+
1,
16+
"./images/merch3.png",
17+
true,
18+
() => {
19+
closed.set(true);
20+
},
21+
true
22+
);
2323
}
2424
}

frontend/src/ts/test/test-logic.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,6 +1461,7 @@ $(".pageTest").on("click", "#testConfig .numbersMode.textButton", () => {
14611461

14621462
$("header").on("click", "nav #startTestButton, #logo", () => {
14631463
if (ActivePage.get() === "test") restart();
1464+
Result.showConfetti();
14641465
});
14651466

14661467
// ===============================

frontend/static/images/merch3.png

86.3 KB
Loading

frontend/static/images/merch4.png

88.3 KB
Loading

0 commit comments

Comments
 (0)