Refine PS1/PS2/PS3/NDS themes and add decorative background field
Rework console theme stylesheets and add opt-in .rb-bg cube field (used by PS2 BIOS bobbing-cube background) wired through Shell. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import Link from "next/link";
|
||||
import type { ReactNode } from "react";
|
||||
import type { CSSProperties, ReactNode } from "react";
|
||||
import { THEMES, type ThemeId } from "@/themes/registry";
|
||||
import { getSettings } from "@/lib/settings";
|
||||
import { isAdmin } from "@/lib/auth";
|
||||
@@ -29,6 +29,30 @@ export default async function Shell({
|
||||
|
||||
return (
|
||||
<div className="rb-desktop">
|
||||
{/* Decorative background field. Hidden by default; themes opt in
|
||||
(PS2 uses it for the BIOS bobbing-cube field). */}
|
||||
<div className="rb-bg" aria-hidden>
|
||||
<div className="rb-bg-grid">
|
||||
{Array.from({ length: 15 * 13 }).map((_, i) => {
|
||||
// deterministic pseudo-random thickness + bob phase per cube
|
||||
const h = 34 + ((i * 53) % 78);
|
||||
const delay = (((i * 37) % 100) / 100) * 4;
|
||||
return (
|
||||
<span
|
||||
key={i}
|
||||
className="rb-cube"
|
||||
style={
|
||||
{
|
||||
"--cube-h": `${h}px`,
|
||||
"--cube-delay": `${delay.toFixed(2)}s`,
|
||||
} as CSSProperties
|
||||
}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="rb-window" role="application">
|
||||
<div className="rb-titlebar">
|
||||
<span className="rb-titlebar-icon" aria-hidden />
|
||||
|
||||
Reference in New Issue
Block a user