Compare commits

...

10 Commits

Author SHA1 Message Date
3c90cbbe2e update home page 2025-10-11 20:51:05 +07:00
4065f0cd84 change the 404 poke animation again lol 2025-10-11 20:50:20 +07:00
a4b3d74af3 update 404 PAGE AGAIN 2025-10-07 16:06:10 +07:00
bbd92bcdda update not found 2025-10-06 14:23:44 +07:00
f8195aa401 update not found page 2025-10-06 14:05:15 +07:00
b3c03e0c41 fixed outline effect windows 2025-10-05 22:14:41 +07:00
fe79418bfd revamp i guess 2025-09-04 21:21:32 +07:00
0b04eed82b change restore window 2025-09-03 12:45:09 +07:00
9471a13388 working window manager 2025-09-03 12:09:00 +07:00
3ff1248887 update legal stuff 2025-09-03 10:51:20 +07:00
25 changed files with 565 additions and 171 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

BIN
public/sound/poke.wav Normal file

Binary file not shown.

BIN
public/sound/squeak.wav Normal file

Binary file not shown.

View File

@@ -7,6 +7,15 @@
--primary: #F48120;
}
@keyframes click-bounce {
0%, 100% {
transform: translate(0px, 0px) scale(1, 1);
}
10% {
transform: translate(0px, 14px) scale(1.2, 0.9);
}
}
@keyframes silly-bounce {
0%, 100% {
transform: translate(0px, 0px) scale(0.9, 1.1);

View File

@@ -1,4 +1,6 @@
import WobblingImage from "@/components/wobbling-image";
import type { Metadata } from "next";
import Link from "@/components/link";
export const metadata: Metadata = {
title: "Wep wep",
@@ -8,11 +10,23 @@ export default function NotFound() {
return (
<main className="flex items-center h-screen pt-16 md:pt-32 pb-12 px-8 md:px-0">
<div className="mx-auto w-[380px]">
<header className="mb-8 -ms-5 text-center">
<h1 className="font-bold text-8xl">404</h1>
</header>
<div className="">
Oh you lost, you know there&apos;s nothing here...
<noscript>
<header className="mb-8 -ms-5 text-center">
<h1 className="font-bold text-8xl">404</h1>
</header>
<div className="">
Oh you lost, you know there&apos;s nothing here...
</div>
</noscript>
<WobblingImage
images={{
idle: "/images/coralz_idle.png",
aware: "/images/coralz_scared.png",
poked: "/images/coralz_poked.png"
}}
/>
<div className="-mt-2">
<Link className="text-xs" target="_blank" href="https://x.com/JoelGuerraC/status/1840178999546319101">{">]"}Image source</Link>
</div>
</div>
</main>

View File

@@ -1,40 +1,42 @@
import { LandingImage } from "@/components/landing-image";
import { NolaGlitchClientOnly } from "@/components/nola-glitch";
import { Sosmed } from "@/components/sosmed";
import HomeText from "@/components/home-text.mdx"
import HomeText from "@/components/texts/home.mdx"
import Link from "next/link";
import Link from "@/components/link";
import { FakeWindow, HomeWindows } from "@/components/windows";
import Taskbar from "@/components/taskbar";
import { WindowManagerProvider } from "@/hooks/window-manager";
export default function Home() {
return (<>
<main className="flex items-center pt-16 md:pt-24 pb-12 px-8 md:px-0 overflow-x-hidden">
<FakeWindow windowText="Homepage">
<HomeWindows />
<header className="text-center mb-8">
<h1 className="font-bold text-3xl leading-normal">
Nonszy Work<span className="text-primary">space</span>
</h1>
</header>
<noscript>
<LandingImage />
</noscript>
<NolaGlitchClientOnly />
<Sosmed />
<article className="space-y-6 leading-relaxed relative">
<HomeText />
</article>
<section className="my-8">
<p> Powered with <Link href="https://www.cloudflare.com/" target="_blank" className="text-primary underline">Cloudflare</Link> </p>
</section>
<footer className="mt-20 text-center">
<p>&copy; <span className="text-sm">2025 Nomi Nonszy</span></p>
<p className="text-sm">
<Link href={"/terms"} className="text-primary underline">Terms and conditions</Link> and <Link href={"/privacy"} className="text-primary underline">Privacy Policy</Link>
</p>
</footer>
</FakeWindow>
<WindowManagerProvider>
<FakeWindow windowText="Homepage">
<HomeWindows />
<header className="text-center mb-8">
<h1 className="font-bold text-3xl leading-normal">
Nonszy Work<span className="text-primary">space</span>
</h1>
</header>
<noscript>
<LandingImage />
</noscript>
<NolaGlitchClientOnly />
<Sosmed />
<article className="space-y-5 leading-relaxed relative text-sm">
<HomeText />
</article>
<section className="my-8">
<p> Powered with <Link href="https://www.cloudflare.com/" target="_blank">Cloudflare</Link> </p>
</section>
<footer className="mt-20 text-center">
<p>&copy; <span className="text-sm">2025 Nomi Nonszy</span></p>
<p className="text-sm">
<Link href={"/terms"}>Terms</Link> and <Link href={"/privacy"}>Privacy</Link>
</p>
</footer>
</FakeWindow>
</WindowManagerProvider>
</main>
</>);
}

View File

@@ -1,6 +1,6 @@
import type { Metadata } from "next";
import PrivacyPolicy from "@/components/texts/privacy-policy.mdx"
import PrivacyPolicy from "@/components/texts/privacy.mdx"
import { SimpleArticle } from "@/components/page-template";
export const metadata: Metadata = {

View File

@@ -1,10 +1,10 @@
import type { Metadata } from "next";
import TermsAndConditions from "@/components/texts/terms-and-condition.mdx"
import TermsAndConditions from "@/components/texts/terms.mdx"
import { SimpleArticle } from "@/components/page-template";
export const metadata: Metadata = {
title: "Terms and conditions",
title: "Terms",
};
export default function Terms () {

View File

@@ -1,8 +1,27 @@
'use client'
import { FakeWindow, useWindowManager } from "@/hooks/window-manager";
import { Icon } from "@iconify/react";
import clsx from "clsx";
import { useState, useRef, useEffect } from "react";
import React, { useState, useRef, useEffect, useReducer } from "react";
export const RestoreWindowsButton = ({ onClick, className, ...props}: React.ComponentProps<"button">) => {
const windowManager = useWindowManager();
const isWindowsDataDirty = !windowManager.windows.find(w =>
w.closed == true
|| w.minimized == true
|| (w.offset.x != 0 && w.offset.y != 0)
)
return (
<button
className={clsx("bg-primary border border-[#FFA826]", className, isWindowsDataDirty && "hidden")}
onClick={windowManager.resetAll}
{...props}
/>
)
}
export const FakeRelativeWindow = ({
windowText,
@@ -17,12 +36,18 @@ export const FakeRelativeWindow = ({
withAnim?: boolean,
children: React.ReactNode
}) => {
const [isMinimized, setMinimize] = useState(false);
const [offset, setOffset] = useState({ x: 0, y: 0 });
const windowManager = useWindowManager();
const windowName = windowText.toLocaleLowerCase();
const currentWindow = windowManager.get(windowName);
const [animation, setAnimation] = useState({
window: "animate-window-popup",
content: "animate-[fade-in-half_1s]"
});
const offsetRef = useRef({ x: 0, y: 0 });
const [isDragging, setDragging] = useState(false);
const popupRef = useRef<HTMLDivElement>(null);
const pos = useRef({
dragging: false,
@@ -32,6 +57,24 @@ export const FakeRelativeWindow = ({
y: 0
});
const populateWindow = () => {
windowManager.add({
name: windowName,
closed: false,
minimized: false,
offset: { x: 0, y: 0 }
})
}
useEffect(() => {
if (!windowManager.isLocalDataExists) {
if (!currentWindow) populateWindow();
return () => {
windowManager.remove(windowName);
}
}
}, []);
useEffect(() => {
if (!withAnim) return;
const node = popupRef.current;
@@ -56,56 +99,121 @@ export const FakeRelativeWindow = ({
return () => observer.disconnect();
}, []);
const toggleMinimize = () => setMinimize(!isMinimized);
useEffect(() => {
if (popupRef.current && currentWindow) {
const initPos = {
x: currentWindow.offset.x,
y: currentWindow.offset.y
}
offsetRef.current.x = initPos.x;
offsetRef.current.y = initPos.y;
popupRef.current.style.transform = `translate(${initPos.x}px, ${initPos.y}px)`;
}
}, [popupRef.current, currentWindow]);
const toggleMinimize = () => windowManager.toggleMinimize(windowName);
const handleClose = () => windowManager.close(windowName);
const onMouseDown = (e: React.MouseEvent) => {
if (!draggable) return;
if (!draggable || !currentWindow) return;
if (popupRef.current) {
pos.current.dragging = true;
pos.current.mouseX = e.clientX;
pos.current.mouseY = e.clientY;
pos.current.x = offset.x;
pos.current.y = offset.y;
pos.current.x = offsetRef.current.x;
pos.current.y = offsetRef.current.y;
document.body.style.userSelect = "none";
setDragging(true);
}
window.addEventListener("mousemove", onMouseMove);
window.addEventListener("mouseup", onMouseUp);
};
const onMouseUp = () => {
windowManager.move(windowName, {
x: offsetRef.current.x,
y: offsetRef.current.y
});
pos.current.dragging = false;
document.body.style.userSelect = "";
window.removeEventListener("mousemove", onMouseMove);
window.removeEventListener("mouseup", onMouseUp);
setDragging(false);
};
const onMouseMove = (e: MouseEvent) => {
if (!currentWindow) return;
if (pos.current.dragging && popupRef.current) {
const dx = e.clientX - pos.current.mouseX;
const dy = e.clientY - pos.current.mouseY;
const newX = pos.current.x + dx;
const newY = pos.current.y + dy;
popupRef.current.style.transform = `translate(${newX}px, ${newY}px)`;
setOffset({ x: newX, y: newY });
const x = pos.current.x + dx;
const y = pos.current.y + dy;
offsetRef.current = { x, y }
popupRef.current.style.transform = `translate(${x}px, ${y}px)`;
}
};
if (!currentWindow || currentWindow?.closed) return
return (
<div className={clsx("absolute hidden lg:block", className)}>
<div className={clsx("mx-auto md:border bg-background border-primary", withAnim && animation.window)} ref={popupRef}>
{/* Outline Window */}
{draggable && (
<div
className="hidden md:flex bg-primary p-2 justify-between text-background windowbar"
onMouseDown={onMouseDown}
className={clsx("absolute border-primary w-full z-10", isDragging && "md:border")}
ref={popupRef}
>
<div className="ms-1 pointer-events-none">
{windowText}
<div
className={clsx("hidden md:flex p-2 gap-2 justify-end text-background windowbar", isDragging ? "opacity-0" : "opacity-100")}
onMouseDown={onMouseDown}
>
<button
className={clsx("bg-primary border border-[#FFA826] border-outset p-1")}
onClick={toggleMinimize}
>
<Icon icon="lucide:minus"/>
</button>
<button
className={clsx("bg-primary border border-[#FFA826] border-outset p-1")}
onClick={handleClose}
>
<Icon icon="lucide:x"/>
</button>
</div>
<div className="flex gap-2">
<button className="bg-primary border border-[#FFA826] border-outset p-1" onClick={toggleMinimize}><Icon icon="lucide:minus"/></button>
<button className="bg-primary border border-[#FFA826] border-outset p-1"><Icon icon="lucide:x"/></button>
<div className={clsx("m-1", currentWindow?.minimized && "h-0")}>
<div className={clsx("md:p-4 opacity-0")}>
{children}
</div>
</div>
</div>
<div className={clsx("m-1 border border-primary", isMinimized ? "h-0 overflow-y-clip" : "h-fit")}>
)}
{/* Main window */}
<div
className={clsx("md:border bg-background border-primary", withAnim && animation.window)}
style={{
transform: `translate(${currentWindow.offset.x}px, ${currentWindow.offset.y}px)`
}}
>
<div className="hidden md:flex bg-primary p-2 justify-between text-background windowbar">
<div className="ms-1 pointer-events-none">
{currentWindow ? currentWindow.name : "Error!"}
</div>
<div className={clsx("flex gap-2", !isDragging ? "opacity-0" : "opacity-100")}>
<button
className="bg-primary border border-[#FFA826] border-outset p-1 pointer-events-none"
>
<Icon icon="lucide:minus"/>
</button>
<button
className="bg-primary border border-[#FFA826] border-outset p-1 pointer-events-none"
>
<Icon icon="lucide:x"/>
</button>
</div>
</div>
<div className={clsx("m-1 border border-primary", currentWindow?.minimized ? "h-0 overflow-y-clip" : "h-fit")}>
<div className={clsx("md:p-4", withAnim && animation.content)}>
{children}
</div>

View File

@@ -8,10 +8,8 @@ export const FloatingLabel = ({
children: React.ReactNode;
}) => {
return (
<div>
<PopoverText text={placeholder}>
{children}
</PopoverText>
</div>
<PopoverText text={placeholder}>
{children}
</PopoverText>
);
};

View File

@@ -1,69 +0,0 @@
import Image from "next/image"
import Link from "next/link";
import { FloatingLabel } from "@/components/floating-label";
Welcome!
This is our cozy little corner of the internet where we run a bunch of services and websites on my own servers.
We've got tools and resources for us but some we provide it for you, stuff that just works and doesn't burn our wallet.
## About Me
Nomi Nonszy (or also known as Nonszy, Nomi Nonsense, whatever, some ppl know my real name).
I write code and make sure the server doesn't catch on fire lol.
I build sick web apps with modern stacks (and trash).
Big fan of open-source stuff, CLI life, Arch 💅.
I only play indie games, and cooking up cursed mods just for fun.
<Image
className="mb-12 mx-auto"
alt="Coral"
src="https://media1.tenor.com/m/CpCvknTOMMwAAAAC/ena-ena-joel-g.gif"
width={250}
height={250}
unoptimized
/>
{new Date(Date.now()) < new Date("2026-02-16") && (
<p>
Pls add my <Link href="https://steamcommunity.com/id/nomi_nonsz" target="_blank" className="text-[#F48120] underline">Steam</Link>, I am so lonely 💔.
</p>
)}
## Vision
Developers who brings together web technology, AI, and game development to create innovative, meaningful, and impactful digital experiences.
We aspire to blend creativity and technical mastery to shape products that empower others and reflect our passion for independent, modern technology.
## Mission
- Gain a solid understanding of IT infrastructure, including how systems operate behind the scenes, how to independently manage servers, and how to ensure stability, security, and scalability throughout the development and deployment lifecycle.
- Develop self-hosted systems and applications, whether on local machines or remote environments, promoting digital independence, data ownership, and efficient resource control.
- Build the ability to design and develop web applications that are responsive, intuitive, fast, and visually compelling, with a strong focus on user experience and modern interface principles.
- Integrate artificial intelligence into digital products, creating smart, helpful, and engaging features that elevate the overall value and interactivity of applications.
## Why Nonsense
Nonszy is an absurd abbreviation of Nonsense, it's not that we don't understand the each other or its uses, it's just a word you've chosen to dismiss our existence.
Our work on web technologies has improved game development and art for anyone, but you still choose to see us as nothing more than senseless non-existent entities.
But you, who's life is centered around nothing but a shallow sense of being superior to others through your knowledge or skill?
We love what we do because it helps those in need, whether they realize it or not. It's a sense-less world you live in, but it's just us or someone who know how to keep things better.
Let's continue pushing ahead towards a brighter tomorrow where we can use technology for the greater good, including the ones who are on your side. We love you as much as we do for who you are, and we're just here to bring about positive change for all.
<FloatingLabel placeholder="Pat pat pat">
<Image
className="mb-12 mx-auto"
alt="Pat coral"
src="https://media.tenor.com/jZkB6qUnOQUAAAAi/coral-glasses-dream-bbq-ena.gif"
width={350}
height={350}
unoptimized
/>
</FloatingLabel>

View File

@@ -2,7 +2,7 @@ import Image from "next/image"
import { FloatingLabel } from "./floating-label"
export const LandingImage = () => (
<FloatingLabel placeholder="Coral Glasses ❤️. Alert: NOT MY WORK! character by JoelG, See terms and conditions">
<FloatingLabel placeholder="Coral Glasses ❤️. Alert: NOT MY WORK! See the end of the page">
<Image
className="mb-8 mx-auto"
alt="Coral <3"

14
src/components/link.tsx Normal file
View File

@@ -0,0 +1,14 @@
import clsx from "clsx";
import NextLink from "next/link"
function Link({ className, ...props }: React.ComponentProps<typeof NextLink>) {
return (
<NextLink
className={clsx("text-primary underline", className)}
{...props}
/>
)
}
export default Link;

View File

@@ -15,7 +15,7 @@ export const SimpleArticle = ({
Back
</ButtonPrimary>
</Link>
<article className="space-y-6 [&_p]:leading-relaxed relative [&_h1]:text-2xl [&_h2]:text-xl">
<article className="space-y-5 [&_p]:leading-relaxed [&_p]:text-sm [&_li]:text-sm relative [&_h1]:text-2xl [&_h2]:text-xl">
{children}
</article>
</div>

View File

@@ -0,0 +1,92 @@
import Image from "next/image"
import Link from "@/components/link";
import { FloatingLabel } from "@/components/floating-label";
Welcome!
This is our cozy little corner of the internet where we run services and websites on my own servers.
We've got tools, resources, game server and other stuff that just works and doesn't burn our wallet, maybe.
## About Me
Nomi Nonszy (also known as Nonszy, Nomi Nonsense, whatever).
I write code, do some art, and make sure our server doesn't catch on fire lol.
I build sick web apps with modern stacks. Big fan of open-source stuff.
Hate something that make things overengineered and boilerplate, but still use them anyway.
I only play indie games, and cooking up cursed mods just for fun.
Multifandom with Psychopomp, Deltarune, and ENA! I'm currently dedicated to the ENA SERIES!! Especially <Link href="https://enajoelg.fandom.com/wiki/Coral_Glasses" target="_blank">Coral Glasses</Link> my beloved wife ❤️
<Image
className="mb-12 mx-auto"
alt="Coral"
src="https://media1.tenor.com/m/CpCvknTOMMwAAAAC/ena-ena-joel-g.gif"
width={250}
height={250}
unoptimized
/>
{new Date(Date.now()) < new Date("2026-02-16") && (
<p>
Pls add my <Link href="https://steamcommunity.com/id/nomi_nonsz" target="_blank">Steam</Link>, I am so lonely 💔.
</p>
)}
{/* ## Vision
To contribute to the global developer ecosystem by sharing knowledge, conducting research, and crafting tools and systems that make technology more efficient, accessible, and affordable for everyone.
## Mission
Our mission is to explore, learn, and innovate across all layers of technology from app development to infrastructure management
- Learn the art of server management, containerization, cloud deployment, and resource monitoring to understand how platforms operate at scale.
- Explore how automation can simplify complex processes like provisioning, monitoring, scaling, and maintaining servers, allowing us to focus more on development and innovation.
- Study and implement security best practices to protect our systems from threats, while also ensuring high availability and fault tolerance across distributed environments.
- Conduct experiments and share findings, build open-source tools, and support fellow developers by creating systems and free platform that make development easier, safer, and more efficient.
- Delve into low-level programming and computer system fundamentals to understand how software interacts with hardware, empowering us to optimize systems from the ground up. */}
## Why Nonsense
Nonszy is an absurd abbreviation of Nonsense, it's not that we don't understand the each other or its uses, it's just a word you've chosen to dismiss our existence.
We love what we do because it helps those in need, whether they realize it or not. It's a sense-less world you live in, but it's just us or someone who know how to keep things better.
<FloatingLabel placeholder="Pat pat pat">
<Image
className="mb-12 mx-auto"
alt="Pat coral"
src="https://media.tenor.com/jZkB6qUnOQUAAAAi/coral-glasses-dream-bbq-ena.gif"
width={350}
height={350}
unoptimized
/>
</FloatingLabel>
## Coral Glasses
<Image
className="float-left mr-5 pb-1"
alt="Coral Dialogue"
src="/images/coral-dialogue.jpg"
width={200}
height={200}
/>
Coral Glasses is a supporting character from the video game
<Link href="https://store.steampowered.com/app/2134320/ENA_Dream_BBQ/" target="_blank">ENA: Dream BBQ</Link>,
developed by
<Link href="https://joelgc.com/" target="_blank">JoelG</Link>,
and published under the ENA Team. She speaks Korean in the game and is voiced by Kim Minsol
The game is part of the surreal and artistically distinct ENA universe, which expands upon his earlier animated web series of the same name.
She's supposed to handle business stuff, but she's sweating, faxing out of her hairline, and spiraling into mild panic every five minutes
She's cute, anxious, awkward, weird, beautiful and i swear, she's literally me at work sweating through every conversation ashdjakwoiqhkaslchmaujqk

View File

@@ -1,3 +0,0 @@
# Privacy Policy
This website ("nonszy.space") fully respects the privacy of its visitors. This document explains how we handle visitor information. The short answer is: **we do not collect, track, or store your personal information**.

View File

@@ -0,0 +1,5 @@
# Privacy Policy
This website ("nonszy.space") fully respects the privacy of its visitors. This page explains how we handle visitor information. The short answer is: **we do not collect, track, or store your personal information**.
However, future feature additions will update the privacy policy.

View File

@@ -1,21 +1,21 @@
# Terms and Conditions
# Terms
## 1. Acceptance of Terms
## Acceptance of Terms
By accessing and using this website (“nonszy.space”), you agree to be bound by these Terms and Conditions. If you do not agree with any part of these Terms and Conditions, you are advised not to use this Site.
## 2. Third Party Intellectual Property Rights
## Third Party Intellectual Property Rights
Some materials on this Site, **such as the Coral Glasses character, or the ENA Dream BBQ game and ENA Series, are the property of <a href='https://joelgc.com' className='text-primary underline'>JoelG</a>** and are used under fair use. The Site owner does not claim any rights to these materials. All copyrights and trademarks remain the property of their respective owners.
## 3. Content Ownership and Copyright
## Content Ownership and Copyright
Some materials on this Site, including but not limited to **applications, code, digital works, 2D illustrations, 3D works, designs, and OC (Original Characters) such as Nola, that owned by the site owner**, are protected by copyright and intellectual property rights in accordance with applicable laws and regulations.
- Content may only be used for personal and non-commercial purposes unless written permission is obtained.
- It is prohibited to reproduce, modify, distribute, sell, or utilize the content on this Site for commercial purposes without written permission.
## 4. Prohibited Uses for AI Training
## Prohibited Uses for AI Training
All content on this Site is **strictly prohibited from being used for training, developing, or improving artificial intelligence (AI) models**, including but not limited to:
@@ -25,7 +25,7 @@ All content on this Site is **strictly prohibited from being used for training,
Any violation of these terms may be subject to legal action in accordance with applicable copyright and intellectual property laws.
## 5. User Responsibility
## User Responsibility
Users are prohibited from:
@@ -33,14 +33,14 @@ Users are prohibited from:
- Uploading or distributing harmful material, including malware or illegal content.
- Using the Site to violate applicable laws or regulations.
## 6. External Links
## External Links
This Site may contain links to third-party sites. The Site owner is not responsible for the content, policies, or practices of such external sites.
## 7. Disclaimer
## Disclaimer
The Site is provided “as is” without warranty of any kind. The Site owner is not responsible for any direct or indirect losses resulting from the use of the Site.
## 8. Changes to Terms and Conditions
## Changes to Terms and Conditions
These Terms and Conditions are subject to change at any time without prior notice. The latest version will be published on this page and will be effective from the date of publication.

View File

@@ -1,6 +1,6 @@
import { Icon } from "@iconify/react";
import { FloatingLabel } from "@/components/floating-label";
import { FakeRelativeWindow } from "./client-windows";
import { FakeRelativeWindow, RestoreWindowsButton } from "./client-windows";
import Image from "next/image"
import Link from "next/link";
@@ -16,12 +16,17 @@ export const FakeWindow = ({
<div className="ms-1 pointer-events-none">
{windowText}
</div>
<FloatingLabel placeholder="Useless button btw">
<div className="flex gap-2">
<button className="bg-primary border border-[#FFA826] border-outset p-1"><Icon icon="lucide:minus"/></button>
<button className="bg-primary border border-[#FFA826] border-outset p-1"><Icon icon="lucide:x"/></button>
</div>
</FloatingLabel>
<div className="inline-flex">
<RestoreWindowsButton className="border-outset px-2 text-xs me-2">
Restore Windows
</RestoreWindowsButton>
<FloatingLabel placeholder="Useless button btw">
<div className="flex gap-2">
<button className="bg-primary border border-[#FFA826] border-outset p-1"><Icon icon="lucide:minus"/></button>
<button className="bg-primary border border-[#FFA826] border-outset p-1"><Icon icon="lucide:x"/></button>
</div>
</FloatingLabel>
</div>
</div>
</div>
<div className="m-1 md:border border-primary">
@@ -34,23 +39,6 @@ export const FakeWindow = ({
export const HomeWindows = () => (
<div className="relative">
{/* <FakeRelativeWindow
windowText="featured.exe"
className="left-[540px] top-0 z-20"
draggable
>
<div className="space-y-2" style={{ width: 300 }}>
<Image
className=""
alt="Left 4 Dead"
src="https://shared.fastly.steamstatic.com/store_item_assets/steam/apps/550/header.jpg?t=1745368562"
width={300}
height={200}
unoptimized
/>
<p>Join my Left 4 Dead 2 server!</p>
</div>
</FakeRelativeWindow> */}
<FakeRelativeWindow
windowText="nola.png"
className="-right-[73%] top-[1300px] z-20"
@@ -110,6 +98,7 @@ export const HomeWindows = () => (
width={240}
height={200}
quality={10}
priority={false}
unoptimized
/>
</FakeRelativeWindow>

View File

@@ -0,0 +1,152 @@
'use client'
import clsx from "clsx";
import Image from "next/image";
import { useCallback, useEffect, useRef, useState } from "react"
interface WobblingImageInterface {
images: {
idle: string;
aware?: string;
poked?: string;
weird?: string;
}
}
function WobblingImage ({
images
}: WobblingImageInterface) {
const size = 400;
const [isPoked, setPoked] = useState(false);
const [isAware, setAware] = useState(false);
const pokeTimeoutRef = useRef<NodeJS.Timeout | null>(null);
const [isAnimating, setIsAnimating] = useState(false);
const audioPath = "/sound/poke.wav";
const audioContextRef = useRef<AudioContext | null>(null);
const [audioBuffer, setAudioBuffer] = useState<AudioBuffer | null>(null);
const [audioLoaded, setAudioLoaded] = useState(false);
const [dummyAudio, setDummyAudio] = useState<HTMLAudioElement | null>(null);
useEffect(() => {
if (typeof Audio !== undefined) setDummyAudio(new Audio(audioPath))
return () => {
if (dummyAudio) dummyAudio.pause();
}
}, [])
const initializeAudioContext = useCallback((): AudioContext => {
if (!audioContextRef.current) {
audioContextRef.current = new (window.AudioContext || (window as any).webkitAudioContext)();
}
return audioContextRef.current;
}, []);
const loadAudio = useCallback(async (url: string): Promise<AudioBuffer> => {
const response = await fetch(url);
const arrayBuffer = await response.arrayBuffer();
const context = initializeAudioContext();
return await context.decodeAudioData(arrayBuffer);
}, [initializeAudioContext]);
const initializeAudio = useCallback(async (): Promise<void> => {
if (audioBuffer) return;
setAudioLoaded(false);
try {
const buffer = await loadAudio(audioPath);
setAudioBuffer(buffer);
} catch (error) {
console.error('Failed to load audio:', error);
}
finally {
setAudioLoaded(true);
}
}, [audioBuffer, loadAudio]);
const playRandomPitch = useCallback(async (): Promise<void> => {
await initializeAudio();
if (!audioBuffer || !audioContextRef.current) return;
const context = audioContextRef.current;
const changeToLowPitch = Math.floor(Math.random() * 66);
const randomPitch = Math.random() * 0.38 + (changeToLowPitch == 1 ? 0.25 : 0.75);
const source = context.createBufferSource();
source.buffer = audioBuffer;
source.playbackRate.value = randomPitch;
source.connect(context.destination);
source.start(0);
source.onended = () => {
source.disconnect();
};
}, [audioBuffer, initializeAudio]);
function handleClick() {
const pokedDuration = 700 + Math.floor(Math.random() * 100)
if (!isAware) setAware(true);
setIsAnimating(false);
requestAnimationFrame(() => setIsAnimating(true));
playRandomPitch();
if (dummyAudio && !audioLoaded) {
dummyAudio.currentTime = 0;
dummyAudio.play();
}
if (pokeTimeoutRef.current) {
clearTimeout(pokeTimeoutRef.current);
}
setPoked(true);
pokeTimeoutRef.current = setTimeout(() => {
setPoked(false);
}, pokedDuration);
}
function handleAnimationEnd() {
setIsAnimating(false);
}
return (
<div className="">
<div
className={clsx(
"relative mx-auto cursor-grab active:cursor-grabbing h-[400px] select-none",
isAnimating && "animate-[click-bounce_230ms_ease-out]"
)}
onClick={handleClick}
onAnimationEnd={handleAnimationEnd}
role="button"
tabIndex={0}
onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); handleClick(); } }}
onMouseDown={(e) => e.preventDefault()}
onPointerDown={(e) => e.preventDefault()}
>
<Image
className={clsx("absolute left-1/2 -translate-x-1/2 top-0 pointer-events-none", isPoked ? "opacity-0" : "opacity-100")}
alt="clip1"
src={isAware ? (images.aware || images.idle) : images.idle}
width={size}
height={size}
draggable={false}
/>
<Image
className={clsx("absolute left-1/2 -translate-x-1/2 top-0 pointer-events-none", isPoked ? "opacity-100" : "opacity-0")}
alt="clip2"
src={images.poked || images.idle}
width={size}
height={size}
draggable={false}
/>
</div>
</div>
)
}
export default WobblingImage;

View File

@@ -1,9 +1,91 @@
interface iFakeWindow {
'use client'
import React, { createContext, useContext, useEffect, useState } from "react";
export interface FakeWindow {
name: string;
minimized: boolean;
closed: boolean;
offset: {
x: number
y: number
x: number;
y: number;
}
}
interface WindowManagerContextType {
windows: FakeWindow[];
isLocalDataExists: boolean;
get: (name: string) => FakeWindow | undefined;
add: (window: FakeWindow) => void;
updateWindow: (name: string, changes: Partial<FakeWindow>) => void;
toggleMinimize: (name: string) => void;
close: (name: string) => void;
remove: (name: string) => void;
move: (name: string, offset: { x: number; y: number }) => void;
resetAll: () => void;
}
const WindowManagerContext = createContext<WindowManagerContextType | undefined>(undefined);
export const WindowManagerProvider: React.FC<{ children: React.ReactNode }> = ({ children }) => {
const [windows, setWindows] = useState<FakeWindow[]>([]);
const [isInit, setInit] = useState(false);
const [isLocalDataExists, setExists] = useState(false);
useEffect(() => {
const data = localStorage.getItem("fake-windows-data");
if (data) {
setWindows(JSON.parse(data));
setExists(true);
}
setInit(true);
}, []);
useEffect(() => {
if (isInit && typeof window !== 'undefined' && windows.length > 0) {
window.localStorage.setItem('fake-windows-data', JSON.stringify(windows));
}
}, [windows]);
const get = (name: string) => windows.find(window => window.name == name);
const add = (window: FakeWindow) => setWindows(w => [...w, window]);
const updateWindow = (name: string, changes: Partial<FakeWindow>) =>
setWindows(w =>
w.map(win => win.name === name ? { ...win, ...changes } : win)
);
const toggleMinimize = (name: string) =>
setWindows(w =>
w.map(win => win.name === name ? { ...win, minimized: !win.minimized } : win)
);
const open = (name: string) => updateWindow(name, { closed: false });
const close = (name: string) => updateWindow(name, { closed: true });
const move = (name: string, offset: { x: number; y: number }) =>
updateWindow(name, { offset });
const remove = (name: string) => setWindows(w => w.filter(win => win.name !== name));
const resetAll = () => setWindows(w =>
w.map(win => ({
name: win.name,
closed: false,
minimized: false,
offset: { x: 0, y: 0 }
}))
);
return (
<WindowManagerContext.Provider value={{
windows,
isLocalDataExists,
get, add, updateWindow, toggleMinimize, close, move, remove, resetAll
}}>
{children}
</WindowManagerContext.Provider>
);
};
export function useWindowManager() {
const ctx = useContext(WindowManagerContext);
if (!ctx) throw new Error("useWindowManager must be used within WindowManagerProvider");
return ctx;
}

View File

@@ -24,6 +24,7 @@ const config: Config = {
},
animation: {
"silly-bouncing": 'silly-bounce 0.8s infinite',
"click-bouncing": 'click-bounce 200ms',
'window-popup': 'window-popup 1s',
'window-popdown': 'window-popdown 1s'
},