Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
44cbc48860
|
|||
|
98cd4c465c
|
|||
|
0e8a6d9e98
|
|||
|
d95ec6e036
|
|||
|
219857106c
|
|||
|
89f9194420
|
|||
|
53fa9c815f
|
|||
|
25e55272d9
|
|||
|
2a1258a820
|
|||
|
01ac4d61cf
|
|||
|
a6190c2694
|
+24
-9
@@ -1,26 +1,41 @@
|
|||||||
|
FROM node:lts-alpine AS builder
|
||||||
ARG APP_VERSION=dev
|
ARG APP_VERSION=dev
|
||||||
FROM node:lts-alpine AS deps
|
ENV NEXT_PUBLIC_APP_VERSION=$APP_VERSION
|
||||||
ARG APP_VERSION
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN corepack enable && corepack prepare yarn@4.9.1 --activate
|
RUN corepack enable && corepack prepare yarn@4.9.1 --activate
|
||||||
|
|
||||||
COPY package.json yarn.lock .yarnrc.yml ./
|
COPY package.json yarn.lock .yarnrc.yml ./
|
||||||
RUN yarn install --immutable
|
RUN yarn install --immutable
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
RUN yarn build
|
||||||
|
|
||||||
FROM node:lts-alpine AS runner
|
FROM node:lts-alpine AS runner
|
||||||
ARG APP_VERSION=dev
|
ARG APP_VERSION=dev
|
||||||
ENV NEXT_PUBLIC_APP_VERSION=$APP_VERSION \
|
ENV NEXT_PUBLIC_APP_VERSION=$APP_VERSION \
|
||||||
APP_VERSION=$APP_VERSION \
|
APP_VERSION=$APP_VERSION \
|
||||||
NODE_ENV=production \
|
NODE_ENV=production \
|
||||||
NEXT_TELEMETRY_DISABLED=1 \
|
NEXT_TELEMETRY_DISABLED=1
|
||||||
PORT=3000
|
|
||||||
LABEL org.opencontainers.image.version=$APP_VERSION
|
LABEL org.opencontainers.image.version=$APP_VERSION
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN corepack enable && corepack prepare yarn@4.9.1 --activate \
|
RUN corepack enable && corepack prepare yarn@4.9.1 --activate \
|
||||||
&& addgroup -S nodejs -g 1001 \
|
&& addgroup -S nodejs -g 1001 \
|
||||||
&& adduser -S nextjs -u 1001
|
&& adduser -S nextjs -u 1001
|
||||||
COPY --from=deps /app/node_modules ./node_modules
|
|
||||||
COPY --from=deps /app/package.json ./package.json
|
COPY --from=builder /app/yarn.lock ./yarn.lock
|
||||||
COPY . .
|
COPY --from=builder /app/.yarnrc.yml ./.yarnrc.yml
|
||||||
RUN chown -R nextjs:nodejs /app
|
COPY --from=builder /app/.next ./.next
|
||||||
|
COPY --from=builder /app/public ./public
|
||||||
|
COPY --from=builder /app/node_modules ./node_modules
|
||||||
|
COPY --from=builder /app/package.json ./package.json
|
||||||
|
|
||||||
|
RUN mkdir -p /app/.yarn && chown -R nextjs:nodejs /app/.yarn
|
||||||
|
|
||||||
USER nextjs
|
USER nextjs
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
CMD ["sh", "-c", "yarn build && yarn start -p $PORT"]
|
|
||||||
|
CMD ["yarn", "start"]
|
||||||
|
|||||||
@@ -1,36 +1,40 @@
|
|||||||
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
|
# Portfolio Website v2
|
||||||
|
|
||||||
## Getting Started
|
## Setup
|
||||||
|
|
||||||
First, run the development server:
|
### Domain Records
|
||||||
|
|
||||||
```bash
|
- Create one A record
|
||||||
npm run dev
|
|
||||||
# or
|
### Reverse Proxy
|
||||||
yarn dev
|
|
||||||
# or
|
- It doesn't matter what reverse proxy you use (Nginx, Apache, Traefik, Caddy, etc)
|
||||||
pnpm dev
|
- Point the record to the web port (default: 3000)
|
||||||
# or
|
|
||||||
bun dev
|
### [Docker Compose](./docker-compose.yml)
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
services:
|
||||||
|
portfolio:
|
||||||
|
container_name: portfolio
|
||||||
|
image: git.altaiar.dev/ahmed/portfolio-2:latest
|
||||||
|
network_mode: bridge
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- config:/app/public/config
|
||||||
|
- images:/app/public/images
|
||||||
|
ports:
|
||||||
|
- 3000:3000
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
config: # Place config.json and resume.pdf here
|
||||||
|
images: # Place images here
|
||||||
```
|
```
|
||||||
|
|
||||||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
(Optional) Replace volumes with bind mounts according to your setup
|
||||||
|
|
||||||
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
|
## Configuration
|
||||||
|
|
||||||
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
|
- The only required field is `name`, a two string array for first and last
|
||||||
|
- See [instrumentation.ts](./src/instrumentation.ts#L18-L89) or [config.d.ts](./src/types/config.d.ts) for possible values
|
||||||
## Learn More
|
- Validation is performed on container start, and will exit if anything is invalid
|
||||||
|
|
||||||
To learn more about Next.js, take a look at the following resources:
|
|
||||||
|
|
||||||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
|
||||||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
|
||||||
|
|
||||||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
|
|
||||||
|
|
||||||
## Deploy on Vercel
|
|
||||||
|
|
||||||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
|
||||||
|
|
||||||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
|
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
services:
|
||||||
|
portfolio:
|
||||||
|
container_name: portfolio
|
||||||
|
image: git.altaiar.dev/ahmed/portfolio-2:latest
|
||||||
|
network_mode: bridge
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- config:/app/public/config
|
||||||
|
- images:/app/public/images
|
||||||
|
ports:
|
||||||
|
- 3000:3000
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
config: # Place config.json and resume.pdf here
|
||||||
|
images: # Place images here
|
||||||
@@ -19,6 +19,7 @@
|
|||||||
"ajv": "^8.17.1",
|
"ajv": "^8.17.1",
|
||||||
"ajv-formats": "^3.0.1",
|
"ajv-formats": "^3.0.1",
|
||||||
"awesome-ajv-errors": "^5.1.0",
|
"awesome-ajv-errors": "^5.1.0",
|
||||||
|
"lodash": "^4.17.21",
|
||||||
"next": "15.3.0",
|
"next": "15.3.0",
|
||||||
"react": "^19.1.0",
|
"react": "^19.1.0",
|
||||||
"react-dom": "^19.1.0",
|
"react-dom": "^19.1.0",
|
||||||
@@ -28,6 +29,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/eslintrc": "^3",
|
"@eslint/eslintrc": "^3",
|
||||||
"@tailwindcss/postcss": "^4",
|
"@tailwindcss/postcss": "^4",
|
||||||
|
"@types/lodash": "^4",
|
||||||
"@types/node": "^20",
|
"@types/node": "^20",
|
||||||
"@types/react": "^19",
|
"@types/react": "^19",
|
||||||
"@types/react-dom": "^19",
|
"@types/react-dom": "^19",
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
-5
@@ -1,7 +1,6 @@
|
|||||||
import type { Metadata } from "next";
|
import type { Metadata } from "next";
|
||||||
import { Inter } from "next/font/google";
|
import { Inter } from "next/font/google";
|
||||||
import "./globals.css";
|
import "./globals.css";
|
||||||
import config from "../../public/config/config.json";
|
|
||||||
|
|
||||||
const inter = Inter({
|
const inter = Inter({
|
||||||
variable: "--font-inter",
|
variable: "--font-inter",
|
||||||
@@ -9,10 +8,7 @@ const inter = Inter({
|
|||||||
preload: true,
|
preload: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = { title: "Portfolio" };
|
||||||
title: config.name.join(" "),
|
|
||||||
description: "Portfolio",
|
|
||||||
};
|
|
||||||
|
|
||||||
export default function RootLayout({
|
export default function RootLayout({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@@ -106,9 +106,6 @@ export const Buttons = ({
|
|||||||
: 0,
|
: 0,
|
||||||
});
|
});
|
||||||
|
|
||||||
const printerMenuSpring = useThreeSpring<MeshStandardMaterial>({
|
|
||||||
opacity: currentView === View.PrinterView ? 1 : 0,
|
|
||||||
});
|
|
||||||
const desktopViewSpring = useThreeSpring<BufferGeometry>({
|
const desktopViewSpring = useThreeSpring<BufferGeometry>({
|
||||||
scale: hovered === View.DesktopView ? 1.25 : 1,
|
scale: hovered === View.DesktopView ? 1.25 : 1,
|
||||||
});
|
});
|
||||||
@@ -398,45 +395,6 @@ export const Buttons = ({
|
|||||||
/>
|
/>
|
||||||
</animated.mesh>
|
</animated.mesh>
|
||||||
</group>
|
</group>
|
||||||
{/* Printer Menu */}
|
|
||||||
<group>
|
|
||||||
<Billboard position={[-3.25, 6.65, -2.75]}>
|
|
||||||
<AnimatedText
|
|
||||||
maxWidth={4.5}
|
|
||||||
font="/assets/inter.ttf"
|
|
||||||
fontSize={0.25}
|
|
||||||
outlineWidth={1 / 60}
|
|
||||||
fillOpacity={printerMenuSpring.opacity}
|
|
||||||
outlineOpacity={printerMenuSpring.opacity}
|
|
||||||
>
|
|
||||||
CAD and 3D printing
|
|
||||||
</AnimatedText>
|
|
||||||
</Billboard>
|
|
||||||
<Billboard position={[-2.75, 5.25, -2.25]}>
|
|
||||||
<AnimatedText
|
|
||||||
maxWidth={3}
|
|
||||||
textAlign="center"
|
|
||||||
font="/assets/inter.ttf"
|
|
||||||
fontSize={0.25}
|
|
||||||
outlineWidth={1 / 60}
|
|
||||||
fillOpacity={printerMenuSpring.opacity}
|
|
||||||
outlineOpacity={printerMenuSpring.opacity}
|
|
||||||
>
|
|
||||||
Building with electronics
|
|
||||||
</AnimatedText>
|
|
||||||
</Billboard>
|
|
||||||
<Billboard position={[-5.5, 3.175, -3]}>
|
|
||||||
<AnimatedText
|
|
||||||
font="/assets/inter.ttf"
|
|
||||||
fontSize={0.25}
|
|
||||||
outlineWidth={1 / 60}
|
|
||||||
fillOpacity={printerMenuSpring.opacity}
|
|
||||||
outlineOpacity={printerMenuSpring.opacity}
|
|
||||||
>
|
|
||||||
Gaming
|
|
||||||
</AnimatedText>
|
|
||||||
</Billboard>
|
|
||||||
</group>
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
+104
-62
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { SpotLight } from "three";
|
import { MeshStandardMaterial, SpotLight } from "three";
|
||||||
import {
|
import {
|
||||||
useGLTF,
|
useGLTF,
|
||||||
PerspectiveCamera,
|
PerspectiveCamera,
|
||||||
@@ -8,7 +8,8 @@ import {
|
|||||||
Text,
|
Text,
|
||||||
Html,
|
Html,
|
||||||
type PerspectiveCameraProps,
|
type PerspectiveCameraProps,
|
||||||
useProgress,
|
PerformanceMonitor,
|
||||||
|
Billboard,
|
||||||
} from "@react-three/drei";
|
} from "@react-three/drei";
|
||||||
import {
|
import {
|
||||||
animated as threeAnimated,
|
animated as threeAnimated,
|
||||||
@@ -26,12 +27,12 @@ import {
|
|||||||
Suspense,
|
Suspense,
|
||||||
useCallback,
|
useCallback,
|
||||||
type JSX,
|
type JSX,
|
||||||
type Dispatch,
|
|
||||||
type SetStateAction,
|
|
||||||
} from "react";
|
} from "react";
|
||||||
|
import round from "lodash/round";
|
||||||
import Stack from "@/util/stack";
|
import Stack from "@/util/stack";
|
||||||
import { Canvas, useFrame } from "@react-three/fiber";
|
import isMobile from "@/util/isMobile";
|
||||||
import { mdiArrowLeftBold } from "@mdi/js";
|
import { Canvas } from "@react-three/fiber";
|
||||||
|
import { mdiArrowLeftBold, mdiOpenInNew } from "@mdi/js";
|
||||||
import { Icon } from "@mdi/react";
|
import { Icon } from "@mdi/react";
|
||||||
import { PDF } from "../util/PDF";
|
import { PDF } from "../util/PDF";
|
||||||
import { CellphoneUI } from "../ui/CellphoneUI";
|
import { CellphoneUI } from "../ui/CellphoneUI";
|
||||||
@@ -45,42 +46,24 @@ import { Credits } from "../ui/Credits";
|
|||||||
import { isWebGL2Available } from "@react-three/drei";
|
import { isWebGL2Available } from "@react-three/drei";
|
||||||
import { useWindowSize } from "../hooks/useWindowSize";
|
import { useWindowSize } from "../hooks/useWindowSize";
|
||||||
import { Info } from "../util/Info";
|
import { Info } from "../util/Info";
|
||||||
|
import { Loader } from "../ui/Loader";
|
||||||
|
import { MobileMenu } from "../ui/MobileMenu";
|
||||||
|
|
||||||
|
const AnimatedText = threeAnimated(Text);
|
||||||
const AnimatedCam = threeAnimated(PerspectiveCamera);
|
const AnimatedCam = threeAnimated(PerspectiveCamera);
|
||||||
const AnimatedButton = webAnimated.button as React.ComponentType<
|
const AnimatedButton = webAnimated.button as React.ComponentType<
|
||||||
React.ButtonHTMLAttributes<HTMLButtonElement> & { children?: React.ReactNode }
|
React.ButtonHTMLAttributes<HTMLButtonElement> & { children?: React.ReactNode }
|
||||||
>;
|
>;
|
||||||
|
|
||||||
function FpsUpdater({
|
|
||||||
onUpdate,
|
|
||||||
}: {
|
|
||||||
onUpdate: Dispatch<SetStateAction<number>>;
|
|
||||||
}) {
|
|
||||||
const fpsRef = useRef([0]);
|
|
||||||
useFrame((_, delta) => fpsRef.current.push(1 / delta));
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
const id = setInterval(() => {
|
|
||||||
const avg =
|
|
||||||
fpsRef.current.reduce((a, b) => a + b, 0) / fpsRef.current.length;
|
|
||||||
fpsRef.current = [];
|
|
||||||
onUpdate(avg);
|
|
||||||
}, 1000);
|
|
||||||
|
|
||||||
return () => clearInterval(id);
|
|
||||||
}, [onUpdate]);
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function Scene(props: JSX.IntrinsicElements["group"]) {
|
export function Scene(props: JSX.IntrinsicElements["group"]) {
|
||||||
const { nodes, materials } = useGLTF("/scene.glb") as unknown as GLTFResult;
|
const { nodes, materials } = useGLTF("/scene.glb") as unknown as GLTFResult;
|
||||||
const { progress } = useProgress();
|
|
||||||
const { width, height } = useWindowSize();
|
const { width, height } = useWindowSize();
|
||||||
const config = useConfig();
|
const config = useConfig();
|
||||||
|
const mobile = isMobile();
|
||||||
|
|
||||||
// States
|
// States
|
||||||
const [fps, setFps] = useState(0);
|
const [fps, setFps] = useState(0);
|
||||||
|
const [dpr, setDpr] = useState(2);
|
||||||
const [pendingView, setPendingView] = useState<View | null>(null);
|
const [pendingView, setPendingView] = useState<View | null>(null);
|
||||||
const [backHovered, setBackHovered] = useState(false);
|
const [backHovered, setBackHovered] = useState(false);
|
||||||
const [backClicked, setBackClicked] = useState(false);
|
const [backClicked, setBackClicked] = useState(false);
|
||||||
@@ -135,10 +118,13 @@ export function Scene(props: JSX.IntrinsicElements["group"]) {
|
|||||||
precision: 0.0001,
|
precision: 0.0001,
|
||||||
friction: 80,
|
friction: 80,
|
||||||
mass: 10,
|
mass: 10,
|
||||||
clamp: true,
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const printerMenuSpring = useThreeSpring<MeshStandardMaterial>({
|
||||||
|
opacity: currentView === View.PrinterView ? 1 : 0,
|
||||||
|
});
|
||||||
|
|
||||||
const { backScale, backOpacity } = useWebSpring({
|
const { backScale, backOpacity } = useWebSpring({
|
||||||
backScale: backHovered ? 1.25 : 1,
|
backScale: backHovered ? 1.25 : 1,
|
||||||
backOpacity: menuTraversal.size() > 1 ? 1 : 0,
|
backOpacity: menuTraversal.size() > 1 ? 1 : 0,
|
||||||
@@ -151,7 +137,18 @@ export function Scene(props: JSX.IntrinsicElements["group"]) {
|
|||||||
{isWebGL2Available() ? (
|
{isWebGL2Available() ? (
|
||||||
width >= 1.5 * height ? (
|
width >= 1.5 * height ? (
|
||||||
<>
|
<>
|
||||||
|
<Loader />
|
||||||
<div className="pointer-events-none fixed z-[999999999] size-full">
|
<div className="pointer-events-none fixed z-[999999999] size-full">
|
||||||
|
{mobile ? (
|
||||||
|
<MobileMenu
|
||||||
|
menuTraversal={menuTraversal}
|
||||||
|
setMenuTraversal={setMenuTraversal}
|
||||||
|
pendingView={pendingView}
|
||||||
|
setPendingView={setPendingView}
|
||||||
|
goPreviousView={goPreviousView}
|
||||||
|
currentView={currentView}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
<AnimatedButton
|
<AnimatedButton
|
||||||
style={{
|
style={{
|
||||||
transform: backScale.to(
|
transform: backScale.to(
|
||||||
@@ -161,7 +158,7 @@ export function Scene(props: JSX.IntrinsicElements["group"]) {
|
|||||||
pointerEvents: menuTraversal.size() > 1 ? "auto" : "none",
|
pointerEvents: menuTraversal.size() > 1 ? "auto" : "none",
|
||||||
cursor: backHovered ? "pointer" : "auto",
|
cursor: backHovered ? "pointer" : "auto",
|
||||||
}}
|
}}
|
||||||
className="m-4"
|
className="m-2"
|
||||||
onMouseEnter={() => setBackHovered(true)}
|
onMouseEnter={() => setBackHovered(true)}
|
||||||
onMouseLeave={() => setBackHovered(false)}
|
onMouseLeave={() => setBackHovered(false)}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -176,36 +173,45 @@ export function Scene(props: JSX.IntrinsicElements["group"]) {
|
|||||||
className="stroke-[0.75] stroke-black"
|
className="stroke-[0.75] stroke-black"
|
||||||
/>
|
/>
|
||||||
</AnimatedButton>
|
</AnimatedButton>
|
||||||
|
)}
|
||||||
<div className="min-w-12 text-white bottom-0 right-0 absolute m-3 p-1 text-xs text-right text-stroke-2 text-stroke-black paint-sfm">
|
<div className="min-w-12 text-white bottom-0 right-0 absolute m-3 p-1 text-xs text-right text-stroke-2 text-stroke-black paint-sfm">
|
||||||
<Info />
|
<Info />
|
||||||
{isNaN(fps) ? "-" : fps.toFixed(0)} fps
|
{fps > 0 && (
|
||||||
|
<p>
|
||||||
|
{fps.toFixed(0)} fps | {dpr}x
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
{config.fallbackUrl && (
|
||||||
|
<div className="flex gap-1 justify-end items-center">
|
||||||
|
<Icon path={mdiOpenInNew} className="h-3" />
|
||||||
|
<a
|
||||||
|
href={config.fallbackUrl}
|
||||||
|
target="_blank"
|
||||||
|
className="hover:underline pointer-events-auto"
|
||||||
|
>
|
||||||
|
fallback
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Canvas
|
<Canvas
|
||||||
shadows
|
shadows
|
||||||
|
dpr={dpr}
|
||||||
gl={{ localClippingEnabled: true, antialias: true, alpha: true }}
|
gl={{ localClippingEnabled: true, antialias: true, alpha: true }}
|
||||||
>
|
>
|
||||||
<Suspense
|
<Suspense fallback={null}>
|
||||||
fallback={
|
|
||||||
<Html fullscreen>
|
|
||||||
<div className="pt-10 w-screen h-screen flex flex-col space-y-6 justify-center items-center text-white text-4xl pointer-events-none">
|
|
||||||
<p>Loading...</p>
|
|
||||||
<div className="w-48 bg-neutral-700 h-4 rounded-lg">
|
|
||||||
<div
|
|
||||||
className="h-full rounded-lg bg-neutral-100"
|
|
||||||
style={{
|
|
||||||
width: `${progress.toFixed(0)}%`,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</Html>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<group {...props} dispose={null}>
|
<group {...props} dispose={null}>
|
||||||
<FpsUpdater onUpdate={setFps} />
|
<PerformanceMonitor
|
||||||
|
ms={100}
|
||||||
|
onChange={(api) => {
|
||||||
|
setFps(api.fps);
|
||||||
|
setDpr(round(1.5 * api.factor + 0.5, 1));
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Environment preset="apartment" />
|
<Environment preset="apartment" />
|
||||||
<AnimatedCam makeDefault {...cameraSpring} />
|
<AnimatedCam makeDefault {...cameraSpring} />
|
||||||
|
{!mobile && (
|
||||||
<Buttons
|
<Buttons
|
||||||
menuTraversal={menuTraversal}
|
menuTraversal={menuTraversal}
|
||||||
setMenuTraversal={setMenuTraversal}
|
setMenuTraversal={setMenuTraversal}
|
||||||
@@ -214,6 +220,7 @@ export function Scene(props: JSX.IntrinsicElements["group"]) {
|
|||||||
goPreviousView={goPreviousView}
|
goPreviousView={goPreviousView}
|
||||||
currentView={currentView}
|
currentView={currentView}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
<group>
|
<group>
|
||||||
<primitive
|
<primitive
|
||||||
object={spotlight}
|
object={spotlight}
|
||||||
@@ -244,21 +251,17 @@ export function Scene(props: JSX.IntrinsicElements["group"]) {
|
|||||||
currentView === View.PCView ? "auto" : "none"
|
currentView === View.PCView ? "auto" : "none"
|
||||||
}
|
}
|
||||||
occlude="blending"
|
occlude="blending"
|
||||||
className="w-[1452px] h-[810px] bg-neutral-400"
|
className="w-[1452px] h-[810px] bg-[#0e1838]"
|
||||||
scale={10}
|
scale={10}
|
||||||
position={[0, 170, 0.25]}
|
position={[0, 170, 0.5]}
|
||||||
raycast={
|
raycast={
|
||||||
currentView === View.DesktopView
|
currentView === View.DesktopView
|
||||||
? () => null
|
? () => null
|
||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
distanceFactor={10}
|
distanceFactor={10}
|
||||||
style={{
|
|
||||||
backgroundImage: "url(/assets/pc-bg.webp)",
|
|
||||||
backgroundColor: "#111535",
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<div className="w-full h-full backdrop-blur-md">
|
<div className="size-full">
|
||||||
<PCUI />
|
<PCUI />
|
||||||
</div>
|
</div>
|
||||||
</Html>
|
</Html>
|
||||||
@@ -333,7 +336,7 @@ export function Scene(props: JSX.IntrinsicElements["group"]) {
|
|||||||
}
|
}
|
||||||
occlude="blending"
|
occlude="blending"
|
||||||
className="w-[1008px] h-[1614px] bg-blue-100"
|
className="w-[1008px] h-[1614px] bg-blue-100"
|
||||||
position={[0, 2.8, 0]}
|
position={[0, 2.85, 0]}
|
||||||
rotation={[-Math.PI / 2, 0, Math.PI / 2]}
|
rotation={[-Math.PI / 2, 0, Math.PI / 2]}
|
||||||
raycast={
|
raycast={
|
||||||
currentView === View.CellphoneView
|
currentView === View.CellphoneView
|
||||||
@@ -352,7 +355,7 @@ export function Scene(props: JSX.IntrinsicElements["group"]) {
|
|||||||
</group>
|
</group>
|
||||||
<Text
|
<Text
|
||||||
position={[-2.415, 12.5, -6]}
|
position={[-2.415, 12.5, -6]}
|
||||||
font="/assets/inter-bold.ttf"
|
font="/assets/clashdisplay.ttf"
|
||||||
color="black"
|
color="black"
|
||||||
fontSize={3}
|
fontSize={3}
|
||||||
>
|
>
|
||||||
@@ -360,7 +363,7 @@ export function Scene(props: JSX.IntrinsicElements["group"]) {
|
|||||||
</Text>
|
</Text>
|
||||||
<Text
|
<Text
|
||||||
position={[5.185, 12.5, 1.592]}
|
position={[5.185, 12.5, 1.592]}
|
||||||
font="/assets/inter-bold.ttf"
|
font="/assets/clashdisplay.ttf"
|
||||||
rotation={[0, -Math.PI / 2, 0]}
|
rotation={[0, -Math.PI / 2, 0]}
|
||||||
color="black"
|
color="black"
|
||||||
fontSize={3}
|
fontSize={3}
|
||||||
@@ -390,6 +393,45 @@ export function Scene(props: JSX.IntrinsicElements["group"]) {
|
|||||||
</Text>
|
</Text>
|
||||||
)}
|
)}
|
||||||
<StaticMeshes nodes={nodes} materials={materials} />
|
<StaticMeshes nodes={nodes} materials={materials} />
|
||||||
|
<group>
|
||||||
|
<Billboard position={[-3.25, 6.65, -2.75]}>
|
||||||
|
<AnimatedText
|
||||||
|
maxWidth={4.5}
|
||||||
|
font="/assets/inter.ttf"
|
||||||
|
fontSize={0.25}
|
||||||
|
outlineWidth={1 / 60}
|
||||||
|
fillOpacity={printerMenuSpring.opacity}
|
||||||
|
outlineOpacity={printerMenuSpring.opacity}
|
||||||
|
>
|
||||||
|
CAD and 3D printing
|
||||||
|
</AnimatedText>
|
||||||
|
</Billboard>
|
||||||
|
<Billboard position={[-2.75, 5.25, -2.25]}>
|
||||||
|
<AnimatedText
|
||||||
|
maxWidth={3}
|
||||||
|
textAlign="center"
|
||||||
|
font="/assets/inter.ttf"
|
||||||
|
fontSize={0.25}
|
||||||
|
outlineWidth={1 / 60}
|
||||||
|
fillOpacity={printerMenuSpring.opacity}
|
||||||
|
outlineOpacity={printerMenuSpring.opacity}
|
||||||
|
>
|
||||||
|
Building with electronics
|
||||||
|
</AnimatedText>
|
||||||
|
</Billboard>
|
||||||
|
<Billboard position={[-5.5, 3.175, -3]}>
|
||||||
|
<AnimatedText
|
||||||
|
font="/assets/inter.ttf"
|
||||||
|
fontSize={0.25}
|
||||||
|
outlineWidth={1 / 60}
|
||||||
|
fillOpacity={printerMenuSpring.opacity}
|
||||||
|
outlineOpacity={printerMenuSpring.opacity}
|
||||||
|
>
|
||||||
|
Gaming
|
||||||
|
</AnimatedText>
|
||||||
|
</Billboard>
|
||||||
|
</group>
|
||||||
|
</PerformanceMonitor>
|
||||||
</group>
|
</group>
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</Canvas>
|
</Canvas>
|
||||||
@@ -400,9 +442,9 @@ export function Scene(props: JSX.IntrinsicElements["group"]) {
|
|||||||
config.fallbackUrl ? "pt-12" : ""
|
config.fallbackUrl ? "pt-12" : ""
|
||||||
} flex flex-col space-y-6 w-screen h-screen text-center justify-center items-center text-white text-4xl`}
|
} flex flex-col space-y-6 w-screen h-screen text-center justify-center items-center text-white text-4xl`}
|
||||||
>
|
>
|
||||||
<p>Screen too small, please rotate</p>
|
<p className="mx-8">Screen too small, please rotate</p>
|
||||||
{config.fallbackUrl && (
|
{config.fallbackUrl && (
|
||||||
<p className="text-base">
|
<p className="text-base mx-8">
|
||||||
or visit the{" "}
|
or visit the{" "}
|
||||||
<a
|
<a
|
||||||
href={config.fallbackUrl}
|
href={config.fallbackUrl}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export const Credits = ({ currentView }: CreditsProps) => {
|
|||||||
occlude="blending"
|
occlude="blending"
|
||||||
className="w-[1452px] h-[810px] bg-neutral-400"
|
className="w-[1452px] h-[810px] bg-neutral-400"
|
||||||
scale={10}
|
scale={10}
|
||||||
position={[0, 170, 0.25]}
|
position={[0, 170, 0.5]}
|
||||||
raycast={currentView === View.CreditsView ? () => null : undefined}
|
raycast={currentView === View.CreditsView ? () => null : undefined}
|
||||||
distanceFactor={10}
|
distanceFactor={10}
|
||||||
>
|
>
|
||||||
@@ -60,14 +60,6 @@ export const Credits = ({ currentView }: CreditsProps) => {
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li className="mb-4 text-black">
|
<li className="mb-4 text-black">
|
||||||
<a
|
|
||||||
className="hover:underline text-blue-800"
|
|
||||||
href="https://poly.pizza/m/YxfMuchpUF"
|
|
||||||
target="_blank"
|
|
||||||
>
|
|
||||||
Office Phone
|
|
||||||
</a>
|
|
||||||
{" and "}
|
|
||||||
<a
|
<a
|
||||||
className="hover:underline text-blue-800"
|
className="hover:underline text-blue-800"
|
||||||
href="https://poly.pizza/m/S5sNqsyyOs"
|
href="https://poly.pizza/m/S5sNqsyyOs"
|
||||||
|
|||||||
@@ -0,0 +1,92 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import { useProgress } from "@react-three/drei";
|
||||||
|
import { animated, useSpring, useTransition } from "@react-spring/web";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
import { createPortal } from "react-dom";
|
||||||
|
|
||||||
|
export const Loader = ({ minDuration = 750, fadeMs = 600 }) => {
|
||||||
|
const [barDone, setBarDone] = useState(false);
|
||||||
|
const barStyles = useSpring({
|
||||||
|
from: { width: "0%" },
|
||||||
|
to: { width: "100%" },
|
||||||
|
config: { duration: minDuration },
|
||||||
|
onRest: () => setBarDone(true),
|
||||||
|
});
|
||||||
|
|
||||||
|
const { progress } = useProgress();
|
||||||
|
const [assetsDone, setAssetsDone] = useState(false);
|
||||||
|
useEffect(() => {
|
||||||
|
if (progress === 100) setAssetsDone(true);
|
||||||
|
}, [progress]);
|
||||||
|
|
||||||
|
const [visible, setVisible] = useState(true);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (barDone && assetsDone) {
|
||||||
|
const id = setTimeout(() => setVisible(false), fadeMs);
|
||||||
|
return () => clearTimeout(id);
|
||||||
|
}
|
||||||
|
}, [barDone, assetsDone, fadeMs]);
|
||||||
|
|
||||||
|
const overlay = useTransition(visible, {
|
||||||
|
from: { opacity: 1 },
|
||||||
|
leave: { opacity: 0 },
|
||||||
|
config: { duration: fadeMs, easing: (t) => t * t },
|
||||||
|
});
|
||||||
|
|
||||||
|
return createPortal(
|
||||||
|
overlay(
|
||||||
|
(styles, show) =>
|
||||||
|
show && (
|
||||||
|
<div>
|
||||||
|
{/* @ts-expect-error children not typed bug */}
|
||||||
|
<animated.div
|
||||||
|
style={{
|
||||||
|
...styles,
|
||||||
|
position: "fixed",
|
||||||
|
inset: 0,
|
||||||
|
background: "#1b1b1b",
|
||||||
|
zIndex: 1e9,
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
gap: "1.5rem",
|
||||||
|
fontSize: "2.25rem",
|
||||||
|
color: "#fff",
|
||||||
|
pointerEvents: "none",
|
||||||
|
paddingTop: "2.5rem",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<p>Loading…</p>
|
||||||
|
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
width: 192,
|
||||||
|
height: 16,
|
||||||
|
background: "#4b4b4b",
|
||||||
|
borderRadius: 8,
|
||||||
|
overflow: "hidden",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{/* @ts-expect-error children not typed bug */}
|
||||||
|
<animated.div
|
||||||
|
style={{ ...barStyles, height: "100%", background: "#fff" }}
|
||||||
|
>
|
||||||
|
{/* @ts-expect-error children not typed bug */}
|
||||||
|
<animated.div className="text-[#1b1b1b] text-xs flex h-full items-center justify-center">
|
||||||
|
{barStyles.width.to((w) => {
|
||||||
|
const p = parseInt(w) || 0;
|
||||||
|
return p > 5 ? p : "";
|
||||||
|
})}
|
||||||
|
</animated.div>
|
||||||
|
</animated.div>
|
||||||
|
</div>
|
||||||
|
</animated.div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
),
|
||||||
|
document.body
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,113 @@
|
|||||||
|
import type Stack from "@/util/stack";
|
||||||
|
import {
|
||||||
|
useCallback,
|
||||||
|
useEffect,
|
||||||
|
useState,
|
||||||
|
type Dispatch,
|
||||||
|
type SetStateAction,
|
||||||
|
} from "react";
|
||||||
|
import { View, viewToHash } from "../scene/consts";
|
||||||
|
import { animated, useSpring } from "@react-spring/web";
|
||||||
|
import Icon from "@mdi/react";
|
||||||
|
import { mdiMenu } from "@mdi/js";
|
||||||
|
|
||||||
|
interface MobileMenuProps {
|
||||||
|
menuTraversal: Stack<View>;
|
||||||
|
setMenuTraversal: Dispatch<SetStateAction<Stack<View>>>;
|
||||||
|
pendingView: View | null;
|
||||||
|
setPendingView: Dispatch<SetStateAction<View | null>>;
|
||||||
|
goPreviousView(): void;
|
||||||
|
currentView: View;
|
||||||
|
}
|
||||||
|
|
||||||
|
const AnimatedButton = animated.button as React.ComponentType<
|
||||||
|
React.ButtonHTMLAttributes<HTMLButtonElement> & { children?: React.ReactNode }
|
||||||
|
>;
|
||||||
|
|
||||||
|
export const MobileMenu = ({
|
||||||
|
menuTraversal,
|
||||||
|
setMenuTraversal,
|
||||||
|
pendingView,
|
||||||
|
setPendingView,
|
||||||
|
goPreviousView,
|
||||||
|
currentView,
|
||||||
|
}: MobileMenuProps) => {
|
||||||
|
const [menuOpen, setMenuOpen] = useState(false);
|
||||||
|
|
||||||
|
const goToView = useCallback(
|
||||||
|
(view: View) => {
|
||||||
|
setMenuTraversal((prev) => {
|
||||||
|
const next = prev.clone();
|
||||||
|
next.push(view);
|
||||||
|
return next;
|
||||||
|
});
|
||||||
|
setPendingView(view);
|
||||||
|
},
|
||||||
|
[setMenuTraversal, setPendingView]
|
||||||
|
);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const onPop = () => {
|
||||||
|
goPreviousView();
|
||||||
|
};
|
||||||
|
window.addEventListener("popstate", onPop);
|
||||||
|
return () => window.removeEventListener("popstate", onPop);
|
||||||
|
}, [goPreviousView]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (pendingView === null) return;
|
||||||
|
window.history.pushState(
|
||||||
|
{ depth: menuTraversal.size() },
|
||||||
|
"",
|
||||||
|
viewToHash[pendingView] ? `#${viewToHash[pendingView]}` : "/"
|
||||||
|
);
|
||||||
|
setPendingView(null);
|
||||||
|
}, [menuTraversal, pendingView, setPendingView]);
|
||||||
|
|
||||||
|
const slideProps = useSpring({
|
||||||
|
x: menuOpen ? 0 : -128,
|
||||||
|
config: { tension: 200, friction: 20 },
|
||||||
|
});
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="w-min">
|
||||||
|
<AnimatedButton
|
||||||
|
className="m-2 pointer-events-auto"
|
||||||
|
onClick={() => setMenuOpen((prev) => !prev)}
|
||||||
|
>
|
||||||
|
<Icon
|
||||||
|
path={mdiMenu}
|
||||||
|
size={1.5}
|
||||||
|
color="white"
|
||||||
|
className="stroke-[0.75] stroke-black"
|
||||||
|
/>
|
||||||
|
</AnimatedButton>
|
||||||
|
{/* @ts-expect-error children not typed bug */}
|
||||||
|
<animated.div
|
||||||
|
style={{
|
||||||
|
transform: slideProps.x.to((x) => `translateX(${x}%)`),
|
||||||
|
}}
|
||||||
|
className="text-white flex flex-col w-min gap-2 text-stroke-2 text-stroke-black paint-sfm ml-2"
|
||||||
|
>
|
||||||
|
{[
|
||||||
|
{ label: "Home", view: View.MainView },
|
||||||
|
{ label: "Projects", view: View.PCView },
|
||||||
|
{ label: "Socials", view: View.CellphoneView },
|
||||||
|
{ label: "Resume", view: View.ResumeView },
|
||||||
|
{ label: "Hobbies", view: View.PrinterView },
|
||||||
|
{ label: "Credits", view: View.CreditsView },
|
||||||
|
].map(({ label, view }) => (
|
||||||
|
<button
|
||||||
|
key={view}
|
||||||
|
className={`${
|
||||||
|
currentView === view ? "bg-neutral-700/50" : "bg-neutral-500/50"
|
||||||
|
} px-2 py-1 transition-all duration-300 hover:bg-neutral-700/50 hover:scale-110 rounded pointer-events-auto`}
|
||||||
|
onClick={() => goToView(view)}
|
||||||
|
>
|
||||||
|
{label}
|
||||||
|
</button>
|
||||||
|
))}
|
||||||
|
</animated.div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
+13
-13
@@ -308,11 +308,11 @@ const Window: FC<HTMLAttributes<HTMLDivElement>> = ({ children, ...props }) => {
|
|||||||
<div className="flex h-full space-x-1">
|
<div className="flex h-full space-x-1">
|
||||||
<Icon
|
<Icon
|
||||||
path={mdiFolder}
|
path={mdiFolder}
|
||||||
className="text-neutral-400 h-full w-fit rounded-tl-lg rounded-br-lg transition-all hover:bg-blue-800 hover:ring-blue-500 hover:ring-1 p-1.5"
|
className="text-neutral-400 size-8 rounded-tl-lg rounded-br-lg transition-all hover:bg-blue-800 hover:ring-blue-500 hover:ring-1 p-1.5"
|
||||||
/>
|
/>
|
||||||
<Icon
|
<Icon
|
||||||
path={mdiPin}
|
path={mdiPin}
|
||||||
className="text-neutral-400 h-full w-fit rounded-b-lg transition-all hover:bg-blue-800 hover:ring-blue-500 hover:ring-1 p-1.5"
|
className="text-neutral-400 size-8 rounded-b-lg transition-all hover:bg-blue-800 hover:ring-blue-500 hover:ring-1 p-1.5"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<p className="absolute left-1/2 transform -translate-x-1/2 text-white">
|
<p className="absolute left-1/2 transform -translate-x-1/2 text-white">
|
||||||
@@ -321,21 +321,21 @@ const Window: FC<HTMLAttributes<HTMLDivElement>> = ({ children, ...props }) => {
|
|||||||
<div className="flex h-full space-x-1 ml-auto justify-end">
|
<div className="flex h-full space-x-1 ml-auto justify-end">
|
||||||
<Icon
|
<Icon
|
||||||
path={mdiWindowMinimize}
|
path={mdiWindowMinimize}
|
||||||
className="text-neutral-100 h-full w-fit rounded-b-lg transition-all hover:bg-amber-800 hover:ring-amber-500 hover:ring-1 p-1.5"
|
className="text-neutral-100 size-8 rounded-b-lg transition-all hover:bg-amber-800 hover:ring-amber-500 hover:ring-1 p-1.5"
|
||||||
/>
|
/>
|
||||||
<Icon
|
<Icon
|
||||||
path={mdiWindowRestore}
|
path={mdiWindowRestore}
|
||||||
className="text-neutral-100 h-full w-fit rounded-b-lg transition-all hover:bg-green-800 hover:ring-green-500 hover:ring-1 p-1.5"
|
className="text-neutral-100 size-8 rounded-b-lg transition-all hover:bg-green-800 hover:ring-green-500 hover:ring-1 p-1.5"
|
||||||
/>
|
/>
|
||||||
<Icon
|
<Icon
|
||||||
path={mdiWindowClose}
|
path={mdiWindowClose}
|
||||||
className="text-neutral-100 h-full w-fit rounded-tr-lg rounded-bl-lg transition-all hover:bg-red-800 hover:ring-red-500 hover:ring-1 p-1.5"
|
className="text-neutral-100 size-8 rounded-tr-lg rounded-bl-lg transition-all hover:bg-red-800 hover:ring-red-500 hover:ring-1 p-1.5"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex bg-neutral-950 size-full rounded-b-lg text-white">
|
<div className="flex bg-neutral-950 size-full rounded-b-lg text-white">
|
||||||
<div className="h-full w-fit bg-neutral-950 flex flex-col rounded-bl-lg">
|
<div className="h-full w-fit bg-neutral-950 flex flex-col rounded-bl-lg">
|
||||||
<div className="h-14 p-2 pr-1 flex justify-center w-fit space-x-1">
|
<div className="h-14 p-2 pr-1 flex justify-center w-36 space-x-1">
|
||||||
<Icon
|
<Icon
|
||||||
path={mdiArrowLeft}
|
path={mdiArrowLeft}
|
||||||
className="text-neutral-100 h-full w-fit rounded-md transition-all hover:ring-neutral-500 hover:ring-1 p-2"
|
className="text-neutral-100 h-full w-fit rounded-md transition-all hover:ring-neutral-500 hover:ring-1 p-2"
|
||||||
@@ -402,7 +402,7 @@ const Window: FC<HTMLAttributes<HTMLDivElement>> = ({ children, ...props }) => {
|
|||||||
>
|
>
|
||||||
<Icon
|
<Icon
|
||||||
path={mdiHelp}
|
path={mdiHelp}
|
||||||
className="text-neutral-100 h-full w-fit rounded-md transition-all hover:ring-neutral-500 hover:ring-1 p-2"
|
className="text-neutral-100 size-11 rounded-md transition-all hover:ring-neutral-500 hover:ring-1 p-2"
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -417,7 +417,7 @@ const Window: FC<HTMLAttributes<HTMLDivElement>> = ({ children, ...props }) => {
|
|||||||
defaultValue="/home/ahmed/Desktop/projects"
|
defaultValue="/home/ahmed/Desktop/projects"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex justify-center h-full w-fit space-x-1">
|
<div className="flex justify-center h-full w-36 space-x-1">
|
||||||
<Icon
|
<Icon
|
||||||
path={mdiBackspace}
|
path={mdiBackspace}
|
||||||
className="text-neutral-100 h-full w-fit rounded-md transition-all hover:ring-neutral-500 hover:ring-1 p-2"
|
className="text-neutral-100 h-full w-fit rounded-md transition-all hover:ring-neutral-500 hover:ring-1 p-2"
|
||||||
@@ -446,7 +446,7 @@ const Taskbar = () => {
|
|||||||
<div className="flex space-x-4 h-full w-fit items-center">
|
<div className="flex space-x-4 h-full w-fit items-center">
|
||||||
<SiArchlinux
|
<SiArchlinux
|
||||||
color={SiArchlinuxHex}
|
color={SiArchlinuxHex}
|
||||||
className="h-full w-fit transition-transform hover:scale-110"
|
className="size-10 transition-transform hover:scale-110"
|
||||||
/>
|
/>
|
||||||
<div className="w-8 h-full">
|
<div className="w-8 h-full">
|
||||||
<div className="w-full h-1/2 bg-blue-900 outline-1 outline-blue-600 transition-all hover:bg-blue-700 hover:outline-blue-400" />
|
<div className="w-full h-1/2 bg-blue-900 outline-1 outline-blue-600 transition-all hover:bg-blue-700 hover:outline-blue-400" />
|
||||||
@@ -454,19 +454,19 @@ const Taskbar = () => {
|
|||||||
</div>
|
</div>
|
||||||
<Icon
|
<Icon
|
||||||
path={mdiFolder}
|
path={mdiFolder}
|
||||||
className="text-blue-500 h-full w-fit transition-transform hover:scale-110 border-b-2"
|
className="text-blue-500 size-10 transition-transform hover:scale-110 border-b-2"
|
||||||
/>
|
/>
|
||||||
<SiVscodium
|
<SiVscodium
|
||||||
color={SiVscodiumHex}
|
color={SiVscodiumHex}
|
||||||
className="h-full w-fit transition-transform hover:scale-110"
|
className="size-10 transition-transform hover:scale-110"
|
||||||
/>
|
/>
|
||||||
<Icon
|
<Icon
|
||||||
path={mdiConsole}
|
path={mdiConsole}
|
||||||
className="text-neutral-400 h-full w-fit transition-transform hover:scale-110"
|
className="text-neutral-400 size-10 transition-transform hover:scale-110"
|
||||||
/>
|
/>
|
||||||
<SiFirefoxbrowser
|
<SiFirefoxbrowser
|
||||||
color={SiFirefoxbrowserHex}
|
color={SiFirefoxbrowserHex}
|
||||||
className="h-full w-fit transition-transform hover:scale-110"
|
className="size-10 transition-transform hover:scale-110"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex space-x-2 h-full w-fit items-center">
|
<div className="flex space-x-2 h-full w-fit items-center">
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { prettify } from "awesome-ajv-errors";
|
|||||||
|
|
||||||
export async function register() {
|
export async function register() {
|
||||||
if (process.env.NEXT_RUNTIME === "nodejs") {
|
if (process.env.NEXT_RUNTIME === "nodejs") {
|
||||||
|
console.info(`Portfolio v2 ${process.env.NEXT_PUBLIC_APP_VERSION}`);
|
||||||
const phoneRegex = /^(\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]\d{3}[\s.-]\d{4}$/;
|
const phoneRegex = /^(\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]\d{3}[\s.-]\d{4}$/;
|
||||||
|
|
||||||
const ajv = new Ajv({ allErrors: true });
|
const ajv = new Ajv({ allErrors: true });
|
||||||
|
|||||||
Vendored
-8
@@ -26,10 +26,6 @@ export type GLTFResult = GLTF & {
|
|||||||
PenBody: Mesh;
|
PenBody: Mesh;
|
||||||
PenTip: Mesh;
|
PenTip: Mesh;
|
||||||
CellphoneMesh: Mesh;
|
CellphoneMesh: Mesh;
|
||||||
Top: Mesh;
|
|
||||||
OfficePhoneBody: Mesh;
|
|
||||||
Screen: Mesh;
|
|
||||||
Buttons: Mesh;
|
|
||||||
Handle: Mesh;
|
Handle: Mesh;
|
||||||
HeadphonesBody: Mesh;
|
HeadphonesBody: Mesh;
|
||||||
HeadphonesAccent: Mesh;
|
HeadphonesAccent: Mesh;
|
||||||
@@ -74,10 +70,6 @@ export type GLTFResult = GLTF & {
|
|||||||
PenBodyMaterial: MeshStandardMaterial;
|
PenBodyMaterial: MeshStandardMaterial;
|
||||||
TipMaterial: MeshStandardMaterial;
|
TipMaterial: MeshStandardMaterial;
|
||||||
CellphoneMaterial: MeshStandardMaterial;
|
CellphoneMaterial: MeshStandardMaterial;
|
||||||
TopMaterial: MeshStandardMaterial;
|
|
||||||
OfficePhoneBodyMaterial: MeshStandardMaterial;
|
|
||||||
ScreenMaterial: MeshStandardMaterial;
|
|
||||||
HandleAndButtonsMaterial: MeshStandardMaterial;
|
|
||||||
HeadphonesBodyMaterial: MeshStandardMaterial;
|
HeadphonesBodyMaterial: MeshStandardMaterial;
|
||||||
HeadphonesAccentMaterial: MeshStandardMaterial;
|
HeadphonesAccentMaterial: MeshStandardMaterial;
|
||||||
CoverMaterial: MeshStandardMaterial;
|
CoverMaterial: MeshStandardMaterial;
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
export default function isMobile(): boolean {
|
||||||
|
return typeof window === "undefined"
|
||||||
|
? false
|
||||||
|
: window.matchMedia?.("(pointer: coarse)").matches;
|
||||||
|
}
|
||||||
@@ -1021,6 +1021,13 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"@types/lodash@npm:^4":
|
||||||
|
version: 4.17.16
|
||||||
|
resolution: "@types/lodash@npm:4.17.16"
|
||||||
|
checksum: 10c0/cf017901b8ab1d7aabc86d5189d9288f4f99f19a75caf020c0e2c77b8d4cead4db0d0b842d009b029339f92399f49f34377dd7c2721053388f251778b4c23534
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"@types/node@npm:^20":
|
"@types/node@npm:^20":
|
||||||
version: 20.17.30
|
version: 20.17.30
|
||||||
resolution: "@types/node@npm:20.17.30"
|
resolution: "@types/node@npm:20.17.30"
|
||||||
@@ -3868,6 +3875,13 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"lodash@npm:^4.17.21":
|
||||||
|
version: 4.17.21
|
||||||
|
resolution: "lodash@npm:4.17.21"
|
||||||
|
checksum: 10c0/d8cbea072bb08655bb4c989da418994b073a608dffa608b09ac04b43a791b12aeae7cd7ad919aa4c925f33b48490b5cfe6c1f71d827956071dae2e7bb3a6b74c
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"loose-envify@npm:^1.0.0, loose-envify@npm:^1.4.0":
|
"loose-envify@npm:^1.0.0, loose-envify@npm:^1.4.0":
|
||||||
version: 1.4.0
|
version: 1.4.0
|
||||||
resolution: "loose-envify@npm:1.4.0"
|
resolution: "loose-envify@npm:1.4.0"
|
||||||
@@ -4535,6 +4549,7 @@ __metadata:
|
|||||||
"@react-three/drei": "npm:^10.0.7"
|
"@react-three/drei": "npm:^10.0.7"
|
||||||
"@react-three/fiber": "npm:^9.1.2"
|
"@react-three/fiber": "npm:^9.1.2"
|
||||||
"@tailwindcss/postcss": "npm:^4"
|
"@tailwindcss/postcss": "npm:^4"
|
||||||
|
"@types/lodash": "npm:^4"
|
||||||
"@types/node": "npm:^20"
|
"@types/node": "npm:^20"
|
||||||
"@types/react": "npm:^19"
|
"@types/react": "npm:^19"
|
||||||
"@types/react-dom": "npm:^19"
|
"@types/react-dom": "npm:^19"
|
||||||
@@ -4544,6 +4559,7 @@ __metadata:
|
|||||||
awesome-ajv-errors: "npm:^5.1.0"
|
awesome-ajv-errors: "npm:^5.1.0"
|
||||||
eslint: "npm:^9"
|
eslint: "npm:^9"
|
||||||
eslint-config-next: "npm:15.3.0"
|
eslint-config-next: "npm:15.3.0"
|
||||||
|
lodash: "npm:^4.17.21"
|
||||||
next: "npm:15.3.0"
|
next: "npm:15.3.0"
|
||||||
react: "npm:^19.1.0"
|
react: "npm:^19.1.0"
|
||||||
react-dom: "npm:^19.1.0"
|
react-dom: "npm:^19.1.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user