Skip to content

Commit c16d432

Browse files
committed
Added new WebGL background, updated clock for PSP theme, and more
1 parent 2db1bb8 commit c16d432

24 files changed

Lines changed: 892 additions & 239 deletions
3.56 MB
Binary file not shown.

‎public/image/psp_full_battery.png‎

4.01 KB
Loading

‎public/psp.svg‎

Lines changed: 83 additions & 0 deletions
Loading

‎src/app/error.tsx‎

Lines changed: 46 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
import React, { Suspense, useEffect, useState } from "react";
44
import { unstable_catchError as catchError, type ErrorInfo } from 'next/error';
5-
import Background from "@components/background/background";
5+
//import Background from "@components/background/background";
6+
import WebGlBackground from "@components/background/webGlBackground";
67
import Clock from "@components/clock/Clock";
78
//import dynamic from "next/dynamic";
89
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
@@ -70,10 +71,10 @@ export default function ErrorPage({
7071
return (
7172
<div className="root-container">
7273
<Suspense>
73-
<Background />
74+
<WebGlBackground />
7475
<Clock />
7576
</Suspense>
76-
<div className="grid content-center z-100 overflow-hidden absolute left-0 top-0 w-full h-screen text-white">
77+
<div className="grid content-center z-100 w-full h-full text-white">
7778
{error && (
7879
<>
7980
<button
@@ -82,41 +83,51 @@ export default function ErrorPage({
8283
() => unstable_retry()
8384
}
8485
aria-label="Return to the home page">
85-
<div className="flex flex-row justify-center items-center text-4xl hover:animate-pulse gap-4">
86-
<FontAwesomeIcon icon={faBug} className="object-contain justify-self-center" />
87-
<span className="text-center">
88-
{error.name}
89-
</span>
90-
</div>
91-
<hr className="w-[80%] md:w-[60%] mx-auto my-1 md:my-5 border-gray-500 opacity-50" />
92-
<div className="flex flex-row justify-center items-center text-2xl select-all">
93-
<p>{error.message}</p>
94-
</div>
95-
{stackTrace && (
96-
<div className="m-5">
97-
<hr className="w-[80%] md:w-[60%] mx-auto my-1 md:my-5 border-gray-500 opacity-50" />
98-
<div className="text-xl text-left m-2">
99-
Stacktrace:
86+
<div className="flex flex-col mt-[30%]">
87+
<div className="grid grid-cols-2 text-center text-lg lg:text-4xl hover:animate-pulse gap-1 lg:gap-4 px-auto">
88+
<FontAwesomeIcon icon={faBug} className="" />
89+
<div className="text-center">
90+
{error.name}
10091
</div>
101-
<div className="grid w-full overflow-scroll mx-auto max-h-[60%]">
102-
{stackTrace.map((line) => {
103-
return (
104-
<>
105-
<tr className="flex" key={line.id}>
106-
<td className="text-center opacity-50 inline-block w-8">{line.id}</td>
107-
<td className="text-right select-all overflow-clip text-ellipsis text-nowrap max-w-[80%] mx-2"
108-
dir="rtl"
109-
title={line.line}>
110-
{line.file}
111-
</td>
112-
<td className="text-left select-all inline-block w-8">{line.lineNo}</td>
92+
</div>
93+
<hr className="w-[80%] md:w-[60%] mx-auto my-1 md:my-5 border-gray-500 opacity-50" />
94+
<div className="grid text-center lg:text-2xl select-all">
95+
<p>{error.message}</p>
96+
</div>
97+
{stackTrace && (
98+
<div className="m-5">
99+
<hr className="w-[80%] md:w-[60%] mx-auto my-1 md:my-5 border-gray-500 opacity-50" />
100+
<div className="text-xl text-left m-2">
101+
Stacktrace:
102+
</div>
103+
<div className="grid w-full mx-auto">
104+
<table className="table-auto border border-collapse">
105+
<thead>
106+
<tr>
107+
<th className="border border-gray-400/25"> </th>
108+
<th className="border border-gray-400/25">File</th>
109+
<th className="border border-gray-400/25">Line</th>
113110
</tr>
114-
</>
115-
);
116-
})}
111+
</thead>
112+
<tbody>
113+
{stackTrace.map((line) => {
114+
return (
115+
<tr key={line.id}>
116+
<td className="text-center opacity-50 inline-block w-8">{line.id}</td>
117+
<td className="text-left select-all overflow-clip text-ellipsis text-nowrap mx-2"
118+
title={line.line}>
119+
{line.file}
120+
</td>
121+
<td className="text-left select-all inline-block">{line.lineNo}</td>
122+
</tr>
123+
);
124+
})}
125+
</tbody>
126+
</table>
127+
</div>
117128
</div>
118-
</div>
119-
)}
129+
)}
130+
</div>
120131
</button>
121132
</>
122133
)}

‎src/app/layout.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import { fab } from '@fortawesome/free-brands-svg-icons';
99
import Providers from "@app/providers";
1010
import '@fortawesome/fontawesome-svg-core/styles.css';
1111
import "@styles/global.scss";
12-
//import localFont from 'next/font/local';
12+
import { useSecret } from "@src/context/SecretContext";
13+
import localFont from 'next/font/local';
1314

1415
config.autoAddCss = false;
1516

@@ -48,6 +49,7 @@ export default function RootLayout({
4849
}: Readonly<{
4950
children: React.ReactNode;
5051
}>) {
52+
5153
return (
5254
<html lang="en">
5355
<body id="body" className={`${inter.className} text-white`}>

‎src/app/not-found.tsx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
import React, { Suspense } from "react";
44
import Image from "next/image";
55
import Link from "next/link";
6-
import Background from "@components/background/background";
6+
//import Background from "@components/background/background";
77
import Clock from "@components/clock/Clock";
8+
import WebGlBackground from "@components/background/webGlBackground";
89
//import dynamic from "next/dynamic";
910
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
1011
import { faBug } from "@fortawesome/free-solid-svg-icons";
@@ -18,7 +19,7 @@ export default function NotFound() {
1819
return (
1920
<div className="root-container">
2021
<Suspense>
21-
<Background />
22+
<WebGlBackground />
2223
<Clock />
2324
</Suspense>
2425
<div className="grid content-center z-100 overflow-hidden absolute left-0 top-0 w-full h-screen text-white">

‎src/app/page.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ import { useBoot } from '@context/BootContext';
66
import Clock from "@components/clock/Clock";
77
import Menu from "@components/xmb-menu/xmb-menu";
88
import Modal from "@components/modal/Modal";
9+
import WebGlBackground from "@components/background/webGlBackground";
910

1011
export default function Home() {
1112
const { isBootVisible, isBootTransitioningOut } = useBoot();
1213

1314
return (
1415
<div className="root-container">
15-
<Background />
16+
<WebGlBackground />
1617
{!isBootVisible && !isBootTransitioningOut && (
1718
<>
1819
<Clock />

‎src/components/background/background.css‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@
5454

5555
.wave {
5656
background: rgb(255 255 255 / 25%);
57-
border-radius: 200% 300% 0 0;
57+
border-radius: 400% 500% 0 0;
5858
position: fixed;
59-
width: 450%;
59+
width: 750%;
6060
height: 30%;
6161
animation: wave 12s -3s linear infinite;
6262
transform: translate3d(0, 0, 0);

‎src/components/background/background.tsx‎

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,28 @@ import './background.css';
66

77
export default function Background() {
88

9-
const { isKonamiSecretActive } = useSecret();
9+
const { isKonamiSecretActive, isPspSecretActive } = useSecret();
1010

1111
return (
1212
<>
13-
<div className={`background ${isKonamiSecretActive && 'secret'} absolute top-0 left-0 overflow-hidden h-dvh -z-50`}>
14-
<div className='wave' />
15-
<div className='wave' />
16-
<div className='wave' />
17-
</div>
13+
{isPspSecretActive && (
14+
<>
15+
<object
16+
type="image/svg+xml"
17+
data="/psp.svg"
18+
className="w-full h-full -z-50 absolute top-0 left-0 overflow-hidden"
19+
></object>
20+
</>
21+
)}
22+
{!isPspSecretActive && (
23+
<>
24+
<div className={`background ${isKonamiSecretActive && 'secret'} absolute top-0 left-0 overflow-hidden h-dvh -z-50`}>
25+
<div className='wave' />
26+
<div className='wave' />
27+
<div className='wave' />
28+
</div>
29+
</>
30+
)}
1831
</>
1932
);
2033
};

0 commit comments

Comments
 (0)