-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
101 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { useTranslation } from "react-i18next"; | ||
import { useStore } from "@nanostores/react"; | ||
import { aboutModalOpen } from "@/stores/modalStore"; | ||
import { FancyLogo } from "@/components/About/FancyLogo.jsx"; | ||
import CustomModal from "@/components/ui/CustomModal.jsx"; | ||
|
||
export default function AboutModal() { | ||
const { t } = useTranslation(); | ||
const $aboutModalOpen = useStore(aboutModalOpen); | ||
|
||
return ( | ||
<CustomModal | ||
open={$aboutModalOpen} | ||
onOpenChange={() => aboutModalOpen.set(false)} | ||
title={t("about.title")} | ||
content={ | ||
<div className="px-4 pb-4 space-y-6"> | ||
<FancyLogo since="2025"/> | ||
</div> | ||
} | ||
/> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { useRef } from "react"; | ||
import logo from "@/assets/logo.png"; | ||
import { Image } from "@heroui/react"; | ||
|
||
export const FancyLogo = ({ since }) => { | ||
const boundingRef = useRef(null); | ||
|
||
return ( | ||
<div className="flex flex-col [perspective:800px] p-5 bg-content2 rounded-md"> | ||
<div | ||
onMouseLeave={() => { | ||
boundingRef.current = null; | ||
}} | ||
onMouseEnter={(ev) => { | ||
boundingRef.current = ev.currentTarget.getBoundingClientRect(); | ||
}} | ||
onMouseMove={(ev) => { | ||
if (!boundingRef.current) return; | ||
const x = ev.clientX - boundingRef.current.left; | ||
const y = ev.clientY - boundingRef.current.top; | ||
const xPercentage = x / boundingRef.current.width; | ||
const yPercentage = y / boundingRef.current.height; | ||
const xRotation = (xPercentage - 0.5) * 20; | ||
const yRotation = (0.5 - yPercentage) * 20; | ||
|
||
ev.currentTarget.style.setProperty("--x-rotation", `${yRotation}deg`); | ||
ev.currentTarget.style.setProperty("--y-rotation", `${xRotation}deg`); | ||
ev.currentTarget.style.setProperty("--x", `${xPercentage * 100}%`); | ||
ev.currentTarget.style.setProperty("--y", `${yPercentage * 100}%`); | ||
}} | ||
className="group relative w-full flex flex-col gap-6 py-6 items-center overflow-hidden rounded-md bg-gradient-to-b from-[#EAFFED] to-[#C6F7C9] p-4 text-[#01A977] transition-transform ease-out hover:[transform:rotateX(var(--x-rotation))_rotateY(var(--y-rotation))_scale(1.05)]" | ||
> | ||
<Image src={logo} alt="logo" classNames={{ wrapper: "size-24", image: "aspect-square" }} /> | ||
<footer className="flex items-end"> | ||
<span className="flex rounded-sm border border-current px-1 py-px text-xs uppercase"> | ||
NEXTFLUX{" "} | ||
<span className="-my-px mx-1 inline-block w-4 border-l border-r border-current bg-[repeating-linear-gradient(-45deg,currentColor,currentColor_1px,transparent_1px,transparent_2px)]" />{" "} | ||
{since} | ||
</span> | ||
</footer> | ||
<div className="z-10 pointer-events-none absolute inset-0 group-hover:bg-[radial-gradient(at_var(--x)_var(--y),rgba(255,255,255,0.3)_20%,transparent_80%)]" /> | ||
</div> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters