A dynamic, one-page portfolio website built with Astro, Svelte, and WebGL, featuring interactive effects and smooth animations.
/
├── public/ # Static assets
├── src/
│ ├── assets/ # Project images and videos
│ ├── components/ # Svelte components
│ │ ├── Sidebar.svelte
│ │ ├── ProjectCard.svelte
│ │ ├── ProjectImage.svelte
│ │ ├── LiveSiteLink.svelte
│ │ └── SocialLinks.svelte
│ ├── content/ # Content Collections
│ │ ├── config.ts # Schema definitions
│ │ ├── websites/ # Website projects
│ │ ├── branding/ # Branding projects
│ │ └── others/ # Other projects
│ ├── layouts/ # Astro layouts
│ ├── lib/ # Utilities and WebGL code
│ ├── pages/ # Routes
│ └── styles/ # Global CSS
├── astro.config.mjs # Astro configuration
└── package.json
Clone the repository (or you already have it!)
Install dependencies:
npm install
Start the development server:
npm run dev
Open http://localhost:4321 in your browser
| Command | Action |
|---|---|
npm run dev |
Starts local dev server at localhost:4321 |
npm run build |
Build your production site to ./dist/ |
npm run preview |
Preview your build locally before deploying |
npm run astro |
Run Astro CLI commands |
Projects are managed through Astro Content Collections. To add a new project:
Create a new .md file in the appropriate category folder:
src/content/websites/ for website projectssrc/content/branding/ for branding projectssrc/content/others/ for other projectsUse this template:
---
title: Project Title
description: "Project description here..."
media:
src: "/project photo and video/your-image.png"
type: image # or 'video'
alt: "Image description"
tags:
- Tag 1
- Tag 2
url: "https://your-project-url.com"
category: website # or 'branding' or 'others'
order: 1 # Optional: for custom ordering
---
Place your project images/videos in the public/project photo and video/ folder
The site will automatically rebuild and display your new project!
To use your actual project photos and videos:
Place all media files in /public/project photo and video/
Update each project's markdown file with the correct media.src path
Set media.type to either image or video
Edit site configuration in src/lib/utils/constants.ts:
Design tokens are defined in src/styles/global.css:
This project is pre-configured for Vercel deployment:
Push your code to GitHub
Import the repository in Vercel
Vercel will automatically detect the Astro framework and deploy
Your site will be live at your-project.vercel.app
npm run build
The static site will be generated in the ./dist/ folder, ready for deployment.
WebGL effects require WebGL 1.0+ support.
src/lib/utils/textScramble.tssrc/lib/webgl/fluidShader.tssrc/components/LiveSiteLink.svelteResponsive breakpoints and layout dimensions are defined in CSS variables in src/styles/global.css.
ISC
Jiu Fang