Skip to content

Commit 75ec3e0

Browse files
committed
fix performance issues
1 parent b39b30a commit 75ec3e0

12 files changed

Lines changed: 865 additions & 710 deletions

File tree

.vscode/settings.json

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,29 @@
11
{
22
"workbench.colorCustomizations": {
3+
"editor.findMatchHighlightBorder": "#ff0000",
4+
"editor.selectionHighlightBackground": "#006eff55",
5+
"editor.selectionBackground": "#006effA5",
6+
"highlight": "#ff0000",
7+
"editor.findMatchBackground": "#3cff0085",
8+
"editor.findMatchHighlightForeground": "#000000ea",
9+
"editorLineNumber.foreground": "#9e95ffdf",
310
"activityBar.background": "#3060fd",
4-
"activityBar.inactiveForeground": "#a9a9a9",
5-
"activityBar.foreground": "#fdfdfd",
611
"titleBar.activeBackground": "#3060fd",
712
"titleBar.activeForeground": "#FBFBFE",
13+
"editor.lineHighlightBorder": "#9fced11f",
814
"tab.activeBackground": "#232635",
915
"tab.hoverBackground": "#2d3144",
1016
"editorIndentGuide.activeBackground1": "#95ff00",
1117
"editorUnnecessaryCode.border": "#ff0000",
1218
"list.activeSelectionBackground": "#0f74e098",
1319
"list.activeSelectionForeground": "#ffffff",
1420
"list.inactiveSelectionBackground": "#0f74e083",
15-
"list.hoverBackground": "#0f74e0d8"
21+
"list.hoverBackground": "#0f74e0d8",
22+
"terminal.background": "#00000000",
23+
"activityBar.inactiveForeground": "#a9a9a9",
24+
"activityBar.foreground": "#fdfdfd",
25+
"titleBar.inactiveBackground": "#0F2A64",
26+
"titleBar.inactiveForeground": "#F8FAFE"
1627
},
1728
"typescript.tsdk": "node_modules/typescript/lib",
1829
"postman.settings.dotenv-detection-notification-visibility": false,

app/(site)/page.tsx

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,11 @@ import { RecruiterContact } from "../components/RecruiterContact"
66
import { Metadata } from "next"
77
import { SITE_CONFIG, SITE_SLUGS } from "@/config/siteConfig"
88
import { homeGraph } from "@/config/schemas"
9-
import Script from "next/script"
109

1110
export const metadata: Metadata = {
1211
title: SITE_CONFIG.title,
1312
description:
14-
"Explore the web developer portfolio of Austin Serb, a full-stack engineer building fast, modern web applications. See what a professional coding portfolio looks like, featuring projects in React, Next.js, and the custom-built React-Zero-UI library.",
15-
16-
keywords: [
17-
"Austin Serb",
18-
"Web Developer Portfolio",
19-
"Serbyte",
20-
"React Zero-UI",
21-
"Next.js",
22-
"React",
23-
"TypeScript",
24-
"Full-Stack Engineer",
25-
"Seattle",
26-
27-
"React Developer Portfolio",
28-
],
13+
"Explore the web developer portfolio of Austin Serb, a full-stack engineer building fast, modern web applications. See what a professional coding portfolio looks like, featuring projects in React, Next.js, and a custom-built React-Zero-UI library.",
2914
authors: [{ name: "Austin Serb" }],
3015
creator: "Austin Serb",
3116
alternates: {
@@ -36,7 +21,7 @@ export const metadata: Metadata = {
3621
const PortfolioPage: React.FC = () => {
3722
return (
3823
<main className="overflow-hidden">
39-
<Script
24+
<script
4025
id="id-site-schema"
4126
type="application/ld+json"
4227
dangerouslySetInnerHTML={{

app/(site)/projects/ProjectsStatic.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ export const ProjectsStatic: React.FC = () => {
118118
<div className="inside-container-small">
119119
<div className="relative z-4 grid grid-cols-1 grid-rows-1 gap-4 md:grid-cols-2 md:grid-rows-2">
120120
{STATIC_PROJECTS.map((project) => {
121-
const ProjectWrapper = project.isExternal ? "a" : Link
122-
const wrapperProps = project.isExternal
121+
const Tag = project.isExternal ? "a" : Link
122+
const tagProps = project.isExternal
123123
? {
124124
href: project.href,
125125
target: "_blank",
@@ -135,9 +135,9 @@ export const ProjectsStatic: React.FC = () => {
135135
}
136136

137137
return (
138-
<ProjectWrapper key={project.id} {...wrapperProps}>
138+
<Tag key={project.id} {...tagProps}>
139139
<Card src={project.src} alt={project.alt} color={project.color} type={project.type} reveal={false} text={project.text} />
140-
</ProjectWrapper>
140+
</Tag>
141141
)
142142
})}
143143
</div>

app/(site)/projects/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from "react"
21
import { WorkHero } from "./WorkHero"
32
import { ProjectsStatic } from "./ProjectsStatic"
43
import { RecruiterContact } from "@/app/components/RecruiterContact"
@@ -18,6 +17,7 @@ const page = () => {
1817
return (
1918
<main className="relative z-1">
2019
<script
20+
id="id-projects-schema"
2121
type="application/ld+json"
2222
dangerouslySetInnerHTML={{
2323
__html: JSON.stringify(projectsGraph),

app/components/AnimatedText.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,10 @@ const letter: Variants = {
2323
hidden: {
2424
opacity: 0,
2525
y: 20,
26-
filter: "blur(4px)",
2726
},
2827
visible: {
2928
opacity: 1,
3029
y: 0,
31-
filter: "blur(0px)",
3230
},
3331
}
3432

app/components/DotCursor.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// app/_components/DotCursor.tsx
22
"use client"
3-
import { useEffect, useRef } from "react"
3+
import { useEffect, useRef, useState } from "react"
44
import { frame, useSpring } from "motion/react"
55
import { MotionDiv, MotionSpan } from "../utils/lazy-ui"
66

@@ -12,6 +12,7 @@ const MAX_W = 260 // hard cap so long labels don't get silly-wide
1212
const spring = { stiffness: 400, damping: 50, restDelta: 0.001 }
1313

1414
export function DotCursor() {
15+
const [enabled, setEnabled] = useState(false)
1516
const labelRef = useRef<HTMLSpanElement>(null)
1617
const lastTargetRef = useRef<HTMLElement | null>(null)
1718

@@ -23,6 +24,11 @@ export function DotCursor() {
2324
const labelOpacity = useSpring(0, { stiffness: 300, damping: 40 })
2425

2526
useEffect(() => {
27+
const isFinePointer = typeof window !== "undefined" && window.matchMedia("(pointer: fine)").matches
28+
const reduceMotion = typeof window !== "undefined" && window.matchMedia("(prefers-reduced-motion: reduce)").matches
29+
if (!isFinePointer || reduceMotion) return
30+
setEnabled(true)
31+
2632
const onMove = (ev: PointerEvent) => {
2733
const { clientX, clientY } = ev
2834
frame.read(() => {
@@ -80,7 +86,9 @@ export function DotCursor() {
8086
window.removeEventListener("pointermove", onMove)
8187
window.removeEventListener("pointerleave", onLeaveWindow)
8288
}
83-
}, [x, y, w, h, labelOpacity])
89+
}, [enabled, x, y, w, h, labelOpacity])
90+
91+
if (!enabled) return null
8492

8593
return (
8694
<MotionDiv

app/components/ProjectSection/ProjectDisplay.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ import { LargeReview } from "../LargeReview"
66
import { MoreProjectsSection } from "./MoreProjectsSection"
77
import { ProjectData } from "../../data/project-data"
88
import { RecruiterContact } from "../RecruiterContact"
9-
import Script from "next/script"
109
import { buildProjectGraphMinimal } from "@/config/schemas"
1110

1211
const ProjectDisplay: React.FC<{ projectData: ProjectData }> = ({ projectData }) => {
1312
return (
1413
<main className="overflow-hidden">
15-
<Script
14+
<script
1615
id="id-project-schema"
1716
type="application/ld+json"
1817
dangerouslySetInnerHTML={{

app/components/TopBar/TopBarV2.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const TopBarV2: React.FC = () => {
2727
<ul className="md:scrolled-up:opacity-0 md:scrolled-up:max-w-0 md:scrolled-down:opacity-100 md:scrolled-down:max-w-96 hidden items-center gap-4 font-medium transition-all duration-300 ease-in-out md:flex">
2828
{navItems.map((item) => (
2929
<li key={item.name} className="flex">
30-
<Link href={item.href} className="bubble-hover p-1 px-2">
30+
<Link prefetch={false} href={item.href} className="bubble-hover p-1 px-2">
3131
{item.name}
3232
</Link>
3333
</li>

app/layout.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { MotionWrapper } from "./utils/lazy-ui"
88
import { Analytics } from "@vercel/analytics/next"
99
import { bodyAttributes } from "@zero-ui/attributes"
1010
import { ViewTransitions } from "./utils/ViewTransition"
11-
import { BottomBlurOverlay } from "./ui/BlurBottomOverlay"
11+
// import { BottomBlurOverlay } from "./ui/BlurBottomOverlay"
1212
// import { LazySplashCursor } from "./utils/lazy-splash-cursor"
1313
// import { DesktopCursor } from "./utils/lazy-dot-cursor"
1414
import { siteGraph } from "@/config/schemas"
@@ -37,10 +37,10 @@ const RootLayout = ({ children }: { children: React.ReactNode }) => {
3737
{/* <DesktopCursor /> */}
3838
<ViewTransitions />
3939

40-
<div className="custom:mx-auto xxs:mx-3.5 pointer-events-none absolute inset-0 z-1 max-w-6xl [background-image:url('/assets/framer-noise.png')] [background-size:128px] bg-repeat opacity-6 md:mx-5 lg:mx-8" />
40+
<div className="custom:mx-auto xxs:mx-3.5 pointer-events-none absolute inset-0 z-1 max-w-6xl [background-image:url('/assets/framer-noise.png')] bg-size-[128px] bg-repeat opacity-6 md:mx-5 lg:mx-8" />
4141
<div className={`${switzer.variable} font-switzer subpixel-antialiased`}>
4242
<div className="custom:mx-auto xxs:border-x pointer-events-none absolute inset-0 z-0 mx-3.5 max-w-6xl border-gray-200 md:mx-5 lg:mx-8" />
43-
<BottomBlurOverlay />
43+
{/* <BottomBlurOverlay /> */}
4444
<TopBarV2 />
4545
{children}
4646

config/siteConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export const DOMAIN_URL = "https://www.austinserb.com"
22

33
export const SITE_CONFIG = {
4-
title: "Austin Serb - Web Developer Portfolio | React & Next.js",
4+
title: "Austin Serb - Web Developer Portfolio",
55
description: "Portfolio of Austin Serb, Seattle-based full-stack engineer. Specializing in Next.js, React, TypeScript, and Tailwind CSS.",
66
url: DOMAIN_URL ?? "http://localhost:3000",
77
siteName: "Austin Serb",

0 commit comments

Comments
 (0)