From 1cd07b9dd5c8555c064d30cf8743742f871e7a87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20S=C3=B6derberg?= Date: Wed, 11 Mar 2026 20:47:07 +0100 Subject: [PATCH] Optimized images and linting --- app/components/MatrixRain.tsx | 3 +-- app/components/Navbar.tsx | 9 ++++++++- app/contact/page.tsx | 5 ++++- app/layout.tsx | 11 +++++++++-- app/page.tsx | 28 +++++++++++++++------------- app/projects/code/page.tsx | 23 ++++++++++++----------- app/projects/design/page.tsx | 9 ++++++++- next.config.ts | 9 ++++++++- 8 files changed, 65 insertions(+), 32 deletions(-) diff --git a/app/components/MatrixRain.tsx b/app/components/MatrixRain.tsx index b64fbed..9eaaefc 100644 --- a/app/components/MatrixRain.tsx +++ b/app/components/MatrixRain.tsx @@ -19,7 +19,6 @@ export default function MatrixRain({ color = '#84c0a0', fps = 15 }: MatrixRainPr const ctx = canvas.getContext('2d'); if (!ctx) return; - let intervalId: NodeJS.Timeout; const fontSize = 16; let columns = 0; let drops: number[] = []; @@ -60,7 +59,7 @@ export default function MatrixRain({ color = '#84c0a0', fps = 15 }: MatrixRainPr } }; - intervalId = setInterval(draw, 1000 / fps); + const intervalId = setInterval(draw, 1000 / fps); const handleResize = () => { if (window.innerWidth !== lastWidth.current) { diff --git a/app/components/Navbar.tsx b/app/components/Navbar.tsx index 2212040..4f00d4f 100644 --- a/app/components/Navbar.tsx +++ b/app/components/Navbar.tsx @@ -4,6 +4,7 @@ import Link from 'next/link'; import { useState } from 'react'; +import Image from 'next/image'; export default function Navbar() { const [isExpanded, setIsExpanded] = useState(false); @@ -17,7 +18,13 @@ export default function Navbar() {
- Wiking + Wiking
SODERBERG TECH diff --git a/app/contact/page.tsx b/app/contact/page.tsx index 29fbd2b..f1b8437 100644 --- a/app/contact/page.tsx +++ b/app/contact/page.tsx @@ -1,15 +1,18 @@ // app/contact/page.tsx import { FaInstagram, FaLinkedin, FaDiscord, FaEnvelope, FaMapMarkerAlt } from 'react-icons/fa'; +import Image from 'next/image'; export default function ContactPage() { return (
{/* 1. Immersive Mountain Background */} - Snowy Mountains {/* Dark blur overlay so the text and cards remain perfectly readable */} diff --git a/app/layout.tsx b/app/layout.tsx index c97d916..065c872 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -2,10 +2,17 @@ import Navbar from './components/Navbar'; import './globals.css'; +import Link from 'next/link'; export const metadata = { title: 'Soderberg Tech', description: 'William Söderberg, Technical high school engineer from Höganäs, Sweden', + icons: { + icon: '/assets/logos/logo.svg', + shortcut: '/assets/logos/logo.svg', + apple: '/assets/logos/logo.svg', + }, + }; export default function RootLayout({ @@ -24,9 +31,9 @@ export default function RootLayout({ diff --git a/app/page.tsx b/app/page.tsx index 61ba6e0..ff051ce 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -2,11 +2,10 @@ 'use client'; -import React from 'react'; import Link from 'next/link'; -import MatrixRain from '@/app/components/MatrixRain'; -import { FaInstagram, FaLinkedin, FaDiscord, FaEnvelope, FaCamera, FaVolleyballBall, FaTree, FaCode } from 'react-icons/fa'; +import { FaCamera, FaCode, FaTree, FaVolleyballBall } from 'react-icons/fa'; import { TbCube3dSphere } from 'react-icons/tb'; +import Image from 'next/image'; export default function Home() { @@ -35,7 +34,7 @@ export default function Home() {
- Logo + Logo

@@ -69,9 +68,11 @@ export default function Home() { {/* Left Column: Profile with "Scanning" Effect */}
- William Söderberg
@@ -88,7 +89,7 @@ export default function Home() {

DATA CARD

- My name is William Söderberg and I'm {calculateAge("2002-07-17")} years old. I have a degree in technical high school engineering specialized in design and industrial manufacturing, with heavy influence from IT and coding. I love problem solving and finding new ways to solve the most complicated problems. + My name is William Söderberg and I'm {calculateAge("2002-07-17")} years old. I have a degree in technical high school engineering specialized in design and industrial manufacturing, with heavy influence from IT and coding. I love problem solving and finding new ways to solve the most complicated problems.

@@ -108,7 +109,7 @@ export default function Home() { {/* 3. WHAT DO I DO SECTION */}
{/* Subtle Background Image Integration */} - Leaves + Leaves
@@ -147,7 +148,7 @@ export default function Home() { {/* My Photos (Ynni Image) */}
- My Photos + My Photos

My Photos

@@ -155,7 +156,7 @@ export default function Home() { {/* Night Sky Collection */}
- Night Sky + Night Sky

My Photography collection

@@ -169,7 +170,7 @@ export default function Home() { {/* Singapore Full Width wrapper */}

- Singapore + Singapore
@@ -190,10 +191,11 @@ export default function Home() { {/* 5. CONTACT CALL-TO-ACTION (Compact Banner) */}
{/* Immersive Mountain Background */} - Snowy Mountains {/* Dark overlay */} @@ -204,7 +206,7 @@ export default function Home() {

- Let's Connect + Let's Connect

Transmission & Socials diff --git a/app/projects/code/page.tsx b/app/projects/code/page.tsx index d7886ca..9145e5a 100644 --- a/app/projects/code/page.tsx +++ b/app/projects/code/page.tsx @@ -2,6 +2,7 @@ import MatrixRain from '@/app/components/MatrixRain'; import { FaCodeBranch, FaGithub, FaGitlab, FaGlobe, FaStar } from 'react-icons/fa'; +import Image from 'next/image'; interface GithubProfile { html_url: string; @@ -38,7 +39,7 @@ async function getProfile(): Promise { const res = await fetch('https://api.github.com/users/WilliamSoderberg', { next: { revalidate: 60 } }); if (!res.ok) return null; return res.json(); - } catch (e) { + } catch { return null; } } @@ -48,7 +49,7 @@ async function getGithubRepos(): Promise { const res = await fetch('https://api.github.com/users/WilliamSoderberg/repos?sort=updated', { next: { revalidate: 60 } }); if (!res.ok) return []; return res.json(); - } catch (e) { + } catch { return []; } } @@ -73,7 +74,7 @@ async function getGitlabRepos(): Promise { const topLanguage = Object.keys(languages).sort((a, b) => languages[b] - languages[a])[0]; return { ...repo, language: topLanguage }; } - } catch (e) { + } catch { console.error(`Failed to fetch language for GitLab repo: ${repo.id}`); } return repo; @@ -81,7 +82,7 @@ async function getGitlabRepos(): Promise { ); return projectsWithLanguages; - } catch (e) { + } catch { console.error("GitLab fetch failed, returning empty array"); return []; } @@ -122,7 +123,7 @@ export default async function CodePage() {

- Avatar + Avatar

@@ -257,16 +258,16 @@ export default async function CodePage() { {/* Changed from Flex to Grid for perfect centering! */} diff --git a/app/projects/design/page.tsx b/app/projects/design/page.tsx index 9b953a4..7106540 100644 --- a/app/projects/design/page.tsx +++ b/app/projects/design/page.tsx @@ -7,6 +7,7 @@ import { Canvas, useThree } from '@react-three/fiber'; import { Suspense, useEffect, useState, useTransition } from 'react'; import { TbCube3dSphere } from 'react-icons/tb'; import * as THREE from 'three'; +import Image from 'next/image'; const models = [ { name: 'Wallet', src: 'Wallet' }, @@ -122,7 +123,13 @@ export default function DesignPage() { /> - AR Preview + AR Preview View in AR

diff --git a/next.config.ts b/next.config.ts index 5f5cf0b..315c454 100644 --- a/next.config.ts +++ b/next.config.ts @@ -4,7 +4,14 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { images: { - qualities: [75, 80, 85, 90, 95, 100], // Add 90 here! + qualities: [75, 80, 85, 90, 95, 100], + remotePatterns: [ + { + protocol: 'https', + hostname: 'avatars.githubusercontent.com', + pathname: '/**', + }, + ], }, };