From afdc982863b6cca573f1db58e1795aa8c45fabca Mon Sep 17 00:00:00 2001 From: schererleander Date: Fri, 30 May 2025 01:01:17 +0200 Subject: rewrite site --- src/pages/404Page.tsx | 21 +++++++++++++++ src/pages/Gear.tsx | 43 +++++++++++++++++++++++++++++++ src/pages/Home.tsx | 31 ++++++++++++++++++++++ src/pages/Homelab.tsx | 52 +++++++++++++++++++++++++++++++++++++ src/pages/Printing.tsx | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/pages/Projects.tsx | 24 +++++++++++++++++ 6 files changed, 241 insertions(+) create mode 100644 src/pages/404Page.tsx create mode 100644 src/pages/Gear.tsx create mode 100644 src/pages/Home.tsx create mode 100644 src/pages/Homelab.tsx create mode 100644 src/pages/Printing.tsx create mode 100644 src/pages/Projects.tsx (limited to 'src/pages') diff --git a/src/pages/404Page.tsx b/src/pages/404Page.tsx new file mode 100644 index 0000000..3eabe6b --- /dev/null +++ b/src/pages/404Page.tsx @@ -0,0 +1,21 @@ +import { useNavigate } from "react-router-dom"; +import notFoundImg from "../assets/404.png"; +import { useEffect } from "react"; + +export default function NotFoundPage() { + const navigate = useNavigate(); + + useEffect(() => { + const timer = setTimeout(() => { + navigate('/', { replace: true }); + }, 4000); + + return () => clearTimeout(timer); + }, [navigate]); + return( + <> +

404 - Not found

+ + + ); +} \ No newline at end of file diff --git a/src/pages/Gear.tsx b/src/pages/Gear.tsx new file mode 100644 index 0000000..dbbcdfb --- /dev/null +++ b/src/pages/Gear.tsx @@ -0,0 +1,43 @@ +import CardLink from '../components/CardLink'; + +import { + dailyDrivers, + desktopParts, + nasParts, + type Part, +} from '../data/gear'; + +function PartsGroup({ title, parts }: { title?: string; parts: Part[] }) { + return ( + <> + {title &&

{title}

} + + + ); +} + +export default function GearPage() { + return ( + <> + ߸ gear +

Gear

+ + + + + + + + ); +} \ No newline at end of file diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx new file mode 100644 index 0000000..912b0c5 --- /dev/null +++ b/src/pages/Home.tsx @@ -0,0 +1,31 @@ +import ImageGalleryGrid from "../components/ImageGalleryGrid"; + +import dsImg from "../assets/3ds.jpeg"; +import esp32Img from "../assets/esp32.jpeg"; +import riceImg from "../assets/rice.jpg"; +import setupImg from "../assets/setup.jpg"; + +export default function HomePage() { + return ( + <> + ߸ hi +

Hi, I'm Leander.

+ +

+ I have a passion for hardware and software, studying computer science. Currently building own 3d printing projects and learning nix. +

+ + + +

A few things I'm interrested in:

+ +
    +
  • Digital minimalism
  • +
  • *nix systems
  • +
  • 3D printing
  • +
  • Homelab / self-hosting
  • +
  • Seinen manga
  • +
+ + ); +} \ No newline at end of file diff --git a/src/pages/Homelab.tsx b/src/pages/Homelab.tsx new file mode 100644 index 0000000..580babc --- /dev/null +++ b/src/pages/Homelab.tsx @@ -0,0 +1,52 @@ +import nasImg from '../assets/nas.png'; +import piImg from '../assets/pi.png'; +import LinkWithIcon from '../components/LinkWithIcon'; + +const nasServices = [ + "Jellyfin: Media library", + "Kavita: Ebooks and manga", + "AdGuard Home: Ad blocking", + "Nginx: Reverse proxy", + "Ollama: Enough for small LLM testing", +]; + +export default function HomelabPage() { + return ( + <> + ߸ homelab +

Home lab

+ +
+

NAS

+ NAS +

+ My custom-built NAS running Unraid hosts the following services. See gear for specs. +

+
    + {nasServices.map((svc) => ( +
  • {svc}
  • + ))} +
+

+ For remote access, I use a VPN to connect to the machine. I also back up my MacBook using Time Machine, and for my desktop and VPS I use rsync. +

+
+ +
+

Raspberry Pi

+ Raspberry Pi 5 +

+ Raspberry Pi 5 (8GB) running Homebridge to integrate non-HomeKit devices. It also serves as a precision NTP server using a Uputronics GPS module. +

+
+ + {/* VPS */} +
+

VPS

+

+ Cheap Ionos VPS for services exposed to the internet. Mainly using it for hosting this website and Nextcloud. +

+
+ + ); +} \ No newline at end of file diff --git a/src/pages/Printing.tsx b/src/pages/Printing.tsx new file mode 100644 index 0000000..61dbe71 --- /dev/null +++ b/src/pages/Printing.tsx @@ -0,0 +1,70 @@ +import a1Img from "../assets/a1.png"; +import CodeSnippet from "../components/CodeSnippet"; +import LinkWithIcon from "../components/LinkWithIcon"; + +export default function PrintingPage() { + const roboArmCode = `#include +#include + +#define DEADZONE 30 +#define BASE_PIN 15 +#define SHOULDER_PIN 2 +#define ELBOW_PIN 4 +#define WRIST_PIN 16 +#define HAND_PIN 17 + +Servo base, shoulder, elbow, wrist, hand; +ControllerPtr pad; + +void onConnectedGamepad(ControllerPtr ctl) { + Serial.printf("Gamepad #%d verbunden\n", ctl->index()); + pad = ctl; +} + +void onDisconnectedGamepad(ControllerPtr ctl) { + Serial.printf("Gamepad getrennt\n"); +} + +int16_t mapAxis(int16_t v) { + if (abs(v) < DEADZONE) v = 0; + return map(v, -512, 512, 0, 180); +} +void setup() { + BP32.setup(&onConnectedGamepad, &onDisconnectedGamepad); + BP32.enableNewBluetoothConnections(true); + + base.attach(BASE_PIN); + shoulder.attach(SHOULDER_PIN); + elbow.attach(ELBOW_PIN); + wrist.attach(WRIST_PIN); + hand.attach(HAND_PIN); +} + +void loop() { + BP32.update(); + if (pad && pad->isConnected()) { + base.write(mapAxis(pad->axisX())); + shoulder.write(mapAxis(-pad->axisY())); + elbow.write(mapAxis(-pad->axisRY())); + hand.write(mapAxis(pad->throttle() - pad->brake())); + + if (pad->l1()) wrist.write(0); + else if (pad->r1()) wrist.write(180); + else wrist.write(90); + } + delay(15); +}`; + return ( + <> + ߸ 3d printing +

3D Printing

+ Bambu Lab A1 +

Projects

+

Robot Arm

+

3D Model changed the model to work with my servo motors.

+ +

Diy Drone

+

WIP

+ + ); +} \ No newline at end of file diff --git a/src/pages/Projects.tsx b/src/pages/Projects.tsx new file mode 100644 index 0000000..d49a3d2 --- /dev/null +++ b/src/pages/Projects.tsx @@ -0,0 +1,24 @@ +import CardLink from '../components/CardLink'; +import { projects, type Project } from '../data/projects'; + +export default function ProjectsPage() { + return ( + <> + ߸ projects +

Projects

+ +
    + {projects.map((p: Project) => ( +
  • + +
  • + ))} +
+ + ); +} \ No newline at end of file -- cgit v1.3.1