mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 20:19:49 +02:00
feat: uh hahaha you'll see ... again!
This commit is contained in:
1 parent
9538a03afb
commit
9475d22472
5 files changed
+111
-3
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
const FUNNY_DATES: [number, number][] = [
|
const FUNNY_DATES: [number, number][] = [
|
||||||
// two days for april fools
|
|
||||||
[4, 1],
|
[4, 1],
|
||||||
[4, 2],
|
[4, 2],
|
||||||
|
[4, 3],
|
||||||
];
|
];
|
||||||
|
|
||||||
export function isFunny() {
|
export function isFunny() {
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
<script>
|
||||||
|
function funnify() {
|
||||||
|
document.body.querySelectorAll('*').forEach((element) => {
|
||||||
|
element.childNodes.forEach((node) => {
|
||||||
|
if (
|
||||||
|
node.nodeType !== 3 ||
|
||||||
|
!node.textContent ||
|
||||||
|
!(node instanceof HTMLElement) ||
|
||||||
|
node.classList.contains('no-funny')
|
||||||
|
)
|
||||||
|
return;
|
||||||
|
|
||||||
|
node.textContent = node.textContent
|
||||||
|
.replaceAll(/[tdkqgp]/g, 'w')
|
||||||
|
.replaceAll(/[TDKQGP]/g, 'W');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
funnify();
|
||||||
|
setInterval(funnify, 1000);
|
||||||
|
|
||||||
|
let mouseDown = false;
|
||||||
|
|
||||||
|
document.addEventListener('mousedown', () => (mouseDown = true));
|
||||||
|
document.addEventListener('mouseup', () => (mouseDown = false));
|
||||||
|
|
||||||
|
document.addEventListener('mousemove', (e) => {
|
||||||
|
if (mouseDown) return;
|
||||||
|
|
||||||
|
const star = document.createElement('div');
|
||||||
|
star.classList.add('star');
|
||||||
|
star.innerHTML = '⭐';
|
||||||
|
document.body.appendChild(star);
|
||||||
|
|
||||||
|
star.style.left = `${e.clientX}px`;
|
||||||
|
star.style.top = `${e.clientY}px`;
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
star.remove();
|
||||||
|
}, 600);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -7,6 +7,7 @@ import Navbar from '../components/Navbar.astro';
|
|||||||
import Party3 from '../components/Party3.astro';
|
import Party3 from '../components/Party3.astro';
|
||||||
import './base.css';
|
import './base.css';
|
||||||
import { DEFAULT_LOCALE } from '@blitzkit/i18n';
|
import { DEFAULT_LOCALE } from '@blitzkit/i18n';
|
||||||
|
import Funny from '../components/Funny.astro';
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
noFooter?: boolean;
|
noFooter?: boolean;
|
||||||
@@ -23,6 +24,10 @@ const locale = Astro.params.locale ?? DEFAULT_LOCALE;
|
|||||||
<link rel="icon" type="image/x-icon" href="/favicon.png" />
|
<link rel="icon" type="image/x-icon" href="/favicon.png" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<link rel="sitemap" href="/sitemap-index.xml" />
|
<link rel="sitemap" href="/sitemap-index.xml" />
|
||||||
|
<link
|
||||||
|
href="https://fonts.googleapis.com/css2?family=Schoolbell&display=swap"
|
||||||
|
rel="stylesheet"
|
||||||
|
/>
|
||||||
|
|
||||||
<Party3 />
|
<Party3 />
|
||||||
|
|
||||||
@@ -55,6 +60,8 @@ const locale = Astro.params.locale ?? DEFAULT_LOCALE;
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
<Funny />
|
||||||
|
|
||||||
<BlitzKitTheme>
|
<BlitzKitTheme>
|
||||||
<Flex direction="column" minHeight="100vh">
|
<Flex direction="column" minHeight="100vh">
|
||||||
<Navbar />
|
<Navbar />
|
||||||
|
|||||||
@@ -2,4 +2,48 @@
|
|||||||
|
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
cursor:
|
||||||
|
url(https://i.imgur.com/MeQQWCX.png) 16 16,
|
||||||
|
auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
font-family: 'Schoolbell', cursive !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radix-themes {
|
||||||
|
--gray-1: var(--crimson-5);
|
||||||
|
--gray-2: var(--crimson-5);
|
||||||
|
--gray-3: var(--crimson-5);
|
||||||
|
--gray-4: var(--crimson-6);
|
||||||
|
--gray-5: var(--crimson-6);
|
||||||
|
--gray-6: var(--crimson-7);
|
||||||
|
--gray-7: var(--crimson-7);
|
||||||
|
--gray-8: var(--crimson-8);
|
||||||
|
--gray-9: var(--crimson-9);
|
||||||
|
--gray-10: var(--crimson-10);
|
||||||
|
--gray-11: var(--crimson-11);
|
||||||
|
--gray-12: var(--crimson-12);
|
||||||
|
}
|
||||||
|
|
||||||
|
.star {
|
||||||
|
position: fixed;
|
||||||
|
color: yellow;
|
||||||
|
font-size: 20px;
|
||||||
|
pointer-events: none;
|
||||||
|
animation:
|
||||||
|
fade-out 0.6s ease-out forwards,
|
||||||
|
move-up 0.6s ease-out forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fade-out {
|
||||||
|
to {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes move-up {
|
||||||
|
to {
|
||||||
|
transform: translateY(20px);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
---
|
---
|
||||||
import { assertSecret } from '@blitzkit/core';
|
import { assertSecret } from '@blitzkit/core';
|
||||||
import { DEFAULT_LOCALE, SUPPORTED_LOCALES } from '@blitzkit/i18n';
|
import { DEFAULT_LOCALE, SUPPORTED_LOCALES } from '@blitzkit/i18n';
|
||||||
import { Box, Flex, Heading, Link } from '@radix-ui/themes';
|
import { literals } from '@blitzkit/i18n/src/literals';
|
||||||
|
import { Box, Flex, Heading, Link, Quote } from '@radix-ui/themes';
|
||||||
import type { GetStaticPaths } from 'astro';
|
import type { GetStaticPaths } from 'astro';
|
||||||
import { AesonPlug } from '../../components/AesonPlug';
|
import { AesonPlug } from '../../components/AesonPlug';
|
||||||
import { HomeLocaleSwitcher } from '../../components/Home/HomeLocaleSwitcher';
|
import { HomeLocaleSwitcher } from '../../components/Home/HomeLocaleSwitcher';
|
||||||
@@ -21,7 +22,6 @@ import {
|
|||||||
tierListTool,
|
tierListTool,
|
||||||
} from '../../constants/tools';
|
} from '../../constants/tools';
|
||||||
import { getStrings } from '../../core/i18n/getStrings';
|
import { getStrings } from '../../core/i18n/getStrings';
|
||||||
import { literals } from '@blitzkit/i18n/src/literals';
|
|
||||||
import BaseLayout from '../../layouts/BaseLayout.astro';
|
import BaseLayout from '../../layouts/BaseLayout.astro';
|
||||||
|
|
||||||
const PUBLIC_ASSET_BRANCH = assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH);
|
const PUBLIC_ASSET_BRANCH = assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH);
|
||||||
@@ -45,6 +45,20 @@ export const getStaticPaths = (() => {
|
|||||||
<BaseLayout>
|
<BaseLayout>
|
||||||
<HomeHero />
|
<HomeHero />
|
||||||
|
|
||||||
|
<Flex justify="center" pt="6" px="8">
|
||||||
|
<Flex flexGrow="1" maxWidth="32rem" justify="center">
|
||||||
|
<Quote
|
||||||
|
className="no-funny"
|
||||||
|
style={{
|
||||||
|
fontSize: '1.3em',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
It has come to our attention that tanks are very harsh objects. To even
|
||||||
|
it out, we made the website a pretty pretty princess {'<'}3
|
||||||
|
</Quote>
|
||||||
|
</Flex>
|
||||||
|
</Flex>
|
||||||
|
|
||||||
<HomeLocaleSwitcher {locale} client:load />
|
<HomeLocaleSwitcher {locale} client:load />
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user