feat: update dependencies and add Nix code highlighting feature
This commit is contained in:
parent
e396d5a947
commit
a126b84165
5 changed files with 163 additions and 32 deletions
|
|
@ -60,30 +60,30 @@ export default function Top() {
|
|||
|
||||
const handleBackgroundTouchClick = () => {
|
||||
if (!isMobile) return;
|
||||
|
||||
|
||||
setClickCount((prev) => {
|
||||
const newCount = prev + 1;
|
||||
|
||||
|
||||
// Clear existing timeout
|
||||
if (clickTimeoutRef.current) {
|
||||
clearTimeout(clickTimeoutRef.current);
|
||||
}
|
||||
|
||||
|
||||
// Check if required clicks reached
|
||||
if (newCount >= REQUIRED_CLICKS) {
|
||||
const newValue = !isMagicalGirlEnabled;
|
||||
setIsMagicalGirlEnabled(newValue);
|
||||
|
||||
|
||||
document.cookie = `MagicalGirl=${newValue}; path=/; max-age=${60 * 60 * 24 * 365}`;
|
||||
window.location.reload();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// Reset click count after 1 second if not enough clicks
|
||||
clickTimeoutRef.current = setTimeout(() => {
|
||||
setClickCount(0);
|
||||
}, 1000);
|
||||
|
||||
|
||||
return newCount;
|
||||
});
|
||||
};
|
||||
|
|
@ -131,17 +131,15 @@ export default function Top() {
|
|||
}
|
||||
}}
|
||||
>
|
||||
{isMagicalGirlEnabled && (
|
||||
<Image
|
||||
src={"/char.avif"}
|
||||
alt="character"
|
||||
width={4740}
|
||||
height={7584}
|
||||
className="w-[50vh] lg:w-[30vw] translate-y-[10%] transition-transform duration-100 ease-out"
|
||||
unoptimized
|
||||
onClick={requestPermission}
|
||||
/>
|
||||
)}
|
||||
<Image
|
||||
src={"/char.avif"}
|
||||
alt="character"
|
||||
width={4740}
|
||||
height={7584}
|
||||
className="w-[50vh] lg:w-[30vw] translate-y-[10%] transition-transform duration-100 ease-out"
|
||||
unoptimized
|
||||
onClick={requestPermission}
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue