mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-09-07 23:26:59 +08:00
chore: merch banner, anniversary
This commit is contained in:
parent
d3fa7c9be2
commit
cde852cf2a
6 changed files with 41 additions and 15 deletions
|
@ -41,6 +41,8 @@
|
|||
<h1 class="text">
|
||||
<div class="top">monkey see</div>
|
||||
monkeytype
|
||||
|
||||
<div class="bottom">5 year anniversary!</div>
|
||||
</h1>
|
||||
</a>
|
||||
<nav>
|
||||
|
|
|
@ -294,10 +294,29 @@ header {
|
|||
user-select: none;
|
||||
|
||||
.bottom {
|
||||
margin-left: -0.15rem;
|
||||
// margin-left: -0.15rem;
|
||||
// color: var(--main-color);
|
||||
// transition: 0.25s;
|
||||
// cursor: pointer;
|
||||
font-size: 0.4em;
|
||||
position: absolute;
|
||||
right: -10px;
|
||||
bottom: -20px;
|
||||
color: var(--main-color);
|
||||
transition: 0.25s;
|
||||
cursor: pointer;
|
||||
transform: rotate(-5deg);
|
||||
animation: pulse 1.5s infinite;
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0% {
|
||||
transform: rotate(-5deg) scale(1);
|
||||
}
|
||||
50% {
|
||||
transform: rotate(-5deg) scale(1.1);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(-5deg) scale(1);
|
||||
}
|
||||
}
|
||||
&:focus-visible {
|
||||
outline: none;
|
||||
|
@ -392,6 +411,10 @@ header {
|
|||
opacity: 0 !important;
|
||||
}
|
||||
|
||||
#logo .bottom {
|
||||
opacity: 0 !important;
|
||||
}
|
||||
|
||||
.config {
|
||||
opacity: 0 !important;
|
||||
}
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
import { z } from "zod";
|
||||
import { LocalStorageWithSchema } from "../utils/local-storage-with-schema";
|
||||
// import * as Notifications from "./notifications";
|
||||
import * as Notifications from "./notifications";
|
||||
|
||||
const closed = new LocalStorageWithSchema({
|
||||
key: "merchBannerClosed",
|
||||
key: "merchBannerClosed2",
|
||||
schema: z.boolean(),
|
||||
fallback: false,
|
||||
});
|
||||
|
||||
export function showIfNotClosedBefore(): void {
|
||||
if (!closed.get()) {
|
||||
// Notifications.addBanner(
|
||||
// `Check out our merchandise, available at <a target="_blank" rel="noopener" href="https://monkeytype.store/">monkeytype.store</a>`,
|
||||
// 1,
|
||||
// "./images/merch2.png",
|
||||
// false,
|
||||
// () => {
|
||||
// closed.set(true);
|
||||
// },
|
||||
// true
|
||||
// );
|
||||
Notifications.addBanner(
|
||||
`New merch store now open, including a limited edition metal keycap! <a target="_blank" rel="noopener" href="https://mktp.co/merch">monkeytype.store</a>`,
|
||||
1,
|
||||
"./images/merch3.png",
|
||||
true,
|
||||
() => {
|
||||
closed.set(true);
|
||||
},
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1461,6 +1461,7 @@ $(".pageTest").on("click", "#testConfig .numbersMode.textButton", () => {
|
|||
|
||||
$("header").on("click", "nav #startTestButton, #logo", () => {
|
||||
if (ActivePage.get() === "test") restart();
|
||||
Result.showConfetti();
|
||||
});
|
||||
|
||||
// ===============================
|
||||
|
|
BIN
frontend/static/images/merch3.png
Normal file
BIN
frontend/static/images/merch3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 86 KiB |
BIN
frontend/static/images/merch4.png
Normal file
BIN
frontend/static/images/merch4.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 88 KiB |
Loading…
Add table
Reference in a new issue