rework the site: gruvbox editorial default with a desktop-mode toggle; drop the terminal layout and phone desktop
This commit is contained in:
parent
976fc362ff
commit
86692637de
19 changed files with 1350 additions and 1664 deletions
|
|
@ -1,32 +1,25 @@
|
|||
"use client";
|
||||
|
||||
import { useTheme } from "./useTheme";
|
||||
import TerminalLayout from "./TerminalLayout";
|
||||
import EditorialSite from "./EditorialSite";
|
||||
import WindowsDesktop from "./WindowsDesktop";
|
||||
import MobileHome from "./MobileHome";
|
||||
|
||||
// The gruvbox editorial site is the default. Phones can never reach the KDE
|
||||
// desktop: ThemeScript forces gruvbox there (ignoring a stored "skeuo") and CSS
|
||||
// hides the Desktop-mode buttons, so `theme === "skeuo"` is desktop-only.
|
||||
//
|
||||
// The editorial page stays mounted (hidden) while the desktop is up, so its
|
||||
// scroll position survives a round-trip. The desktop mounts on demand.
|
||||
export default function ThemeRoot() {
|
||||
const { theme } = useTheme();
|
||||
const terminal = theme === "terminal";
|
||||
const desktop = theme === "skeuo";
|
||||
|
||||
// The desktop is kept mounted (just hidden) while the Gruvbox/terminal theme
|
||||
// is active. That way the Welcome window is only created on a fresh page
|
||||
// load and isn't reopened by toggling themes.
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
className="skeuo-desktop-root"
|
||||
style={terminal ? { display: "none" } : undefined}
|
||||
>
|
||||
<WindowsDesktop />
|
||||
<div style={desktop ? { display: "none" } : undefined}>
|
||||
<EditorialSite />
|
||||
</div>
|
||||
<div
|
||||
className="skeuo-mobile-root"
|
||||
style={terminal ? { display: "none" } : undefined}
|
||||
>
|
||||
<MobileHome />
|
||||
</div>
|
||||
{terminal && <TerminalLayout />}
|
||||
{desktop ? <WindowsDesktop /> : null}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue