what am i even doing bro

This commit is contained in:
TrèsAbhi committed 2026-03-31 22:18:03 -05:00
1 parent 191843f972
commit e8ed4615fe
3 files changed
+78 -4

No files matched your search

@@ -25,3 +25,77 @@
setInterval(halloweenFrame, 1000 / 30);
}
</script>
<script>
const elements = new Set<HTMLElement>();
function handle(event: PointerEvent) {
for (const element of elements) {
const rect = element.getBoundingClientRect();
const x0 = (rect.left + rect.right) / 2;
const y0 = (rect.top + rect.bottom) / 2;
const S = (window.innerWidth + window.innerHeight) / 2;
const s = S * 2 ** -6;
const dx = event.clientX - x0;
const dy = event.clientY - y0;
const d = Math.sqrt(dx ** 2 + dy ** 2);
const nx = dx / d;
const ny = dy / d;
const l = Math.tanh(d);
const x = -s * nx * l;
const y = -s * ny * l;
element.style.transform = `translate(${x}px, ${y}px)`;
}
}
window.addEventListener("pointermove", handle);
window.addEventListener("pointerdown", handle);
setInterval(() => {
const discovered = new Set<HTMLElement>(
document.querySelectorAll("span, a, h1, h2, h3, h4, h5, h6"),
);
const difference = discovered.difference(elements);
for (const element of difference) {
const styles = element.computedStyleMap();
const position = styles.get("position")?.toString();
const isMovable = position === undefined || position === "static";
if (!isMovable) continue;
elements.add(element);
element.style.position = "relative";
if (
element instanceof HTMLSpanElement ||
element instanceof HTMLAnchorElement
) {
element.addEventListener("mouseover", () => {
if (element.children.length !== 0) return;
element.dataset.original = element.textContent ?? "";
element.textContent = "PLEASE don't click me";
});
element.addEventListener("mouseout", () => {
if (element.children.length !== 0) return;
element.textContent = element.dataset.original!;
});
}
}
}, 1000);
</script>
<style>
html {
filter: saturate(80%) hue-rotate(20deg) brightness(90%);
}
</style>
@@ -97,7 +97,7 @@ const strings = getStrings(locale);
window.innerHeight) **
2,
0,
1
1,
);
// https://www.desmos.com/calculator/ndz2poxk32
@@ -130,7 +130,8 @@ const strings = getStrings(locale);
<Flex direction="column" align="center" gap="1">
<Heading size={{ initial: "8", xs: "9" }} weight="bold" align="center">
<Flex align="center" gap={{ initial: "2", xs: "4" }}>
BlitzKit
<!-- BlitzKit -->
Keep Your Distance
{
isBranchNamed && (
<Code
@@ -6,7 +6,6 @@ import { literals } from "@blitzkit/i18n/src/literals";
import { Box, Flex, Link } from "@radix-ui/themes";
import type { GetStaticPaths } from "astro";
import { AesonPlug } from "../../components/AesonPlug";
import { Giveaway } from "../../components/Giveaway";
import HomeHero from "../../components/HomeHero.astro";
import { Plugs } from "../../components/Plugs";
import ToolCard from "../../components/ToolCard.astro";
@@ -29,7 +28,7 @@ for (const id in tools) {
const compatibleRow = rows.find(
(row) =>
row.length < MAX_TOOLS_PER_ROW &&
!("significant" in row[0] && row[0].significant)
!("significant" in row[0] && row[0].significant),
);
if (compatibleRow) {