UNSW Computer Enthusiasts Society website built on Next.js
- Built with Next.js 16 and React
- Styled with Tailwind CSS
- Static site generation for GitHub Pages
- Automatic deployment via GitHub Actions
- Node.js 20 or higher
- npm
- Install dependencies:
npm install- Run the development server:
npm run dev- Open http://localhost:3000 in your browser
Build the static site:
npm run buildThe static files will be generated in the out/ directory.
The site automatically deploys to GitHub Pages when you push to the master branch.
If you need to deploy manually:
- Build the site:
npm run build - The
out/directory contains the static files - These will be deployed via GitHub Actions
├── app/ # Next.js App Router pages
│ ├── page.tsx # Home page
│ ├── events/ # Events page
│ ├── layout.tsx # Root layout
│ └── globals.css # Global styles
├── components/ # React components
│ ├── Navigation.tsx # Navigation bar
│ └── Footer.tsx # Footer
├── public/ # Static assets
│ └── img/ # Images
└── next.config.ts # Next.js configuration
Edit app/events/page.tsx to add event information.
The website features an easy-to-use gallery system. Just drop photos in a folder, rename them sequentially, and update the config file.
1. Prepare Your Photos
Create a folder and add your photos:
mkdir -p public/img/gallery/your-event-name
# Copy your photos here (they can have any names)2. Rename and Compress Photos Automatically
Use the included script to rename all photos to 1.jpg, 2.jpg, 3.jpg, etc. and compress them for faster loading:
./rename-gallery-photos.sh public/img/gallery/your-event-nameRequires ImageMagick:
sudo apt install imagemagick # Ubuntu/Debian
brew install imagemagick # macOSThe script will:
- Find all image files (JPG, JPEG, PNG)
- Ask for confirmation before processing
- Safely rename them in alphabetical order
- Convert all to .jpg extension
- Resize to max 1920px (without upscaling)
- Compress at quality 85 and strip EXIF metadata
3. Update Gallery Configuration
Edit two files to add your gallery:
File 1: app/gallery/[slug]/page.tsx (around line 6)
const galleryConfig = {
// Add your new gallery:
'your-event-name': {
title: 'Your Event Name',
description: 'Event description',
photoCount: 15, // Number of photos you added
folder: 'your-event-name' // Folder name
}
};File 2: app/gallery/page.tsx (around line 5)
const galleries = [
// Add your new gallery:
{
title: "Your Event Name",
description: "Event description",
imageCount: 15, // Number of photos
thumbnail: "/img/gallery/your-event-name/1.jpg", // First photo
slug: "your-event-name" // Must match slug in File 1
}
];4. Rebuild and Deploy
npm run build
git add .
git commit -m "Add your-event-name gallery"
git push- Automatic Photo Loading: Photos are loaded as 1.jpg, 2.jpg, 3.jpg automatically
- Lightbox Viewer: Click any photo for full-screen view with arrow navigation
- Responsive Grid: Mobile-friendly layout
# 1. You have photos: IMG_1234.JPG, IMG_1235.JPG, DSC_9876.png
mkdir -p public/img/gallery/megalan-2025
cp ~/Downloads/*.{jpg,png} public/img/gallery/megalan-2025/
# 2. Rename and compress them sequentially
./rename-gallery-photos.sh public/img/gallery/megalan-2025
# Output: Found 3 image files
# Processed: DSC_9876.png -> 1.jpg
# Processed: IMG_1234.JPG -> 2.jpg
# Processed: IMG_1235.JPG -> 3.jpg
# 3. Update configs (see above)
# 4. Deploy
npm run build
git add . && git commit -m "Add MegaLAN 2025 gallery" && git pushEdit app/team/page.tsx to update executive and director information.
Update the links in app/page.tsx in the "Join Us" section.
Edit the contact section in app/page.tsx.
- Next.js - React framework
- React - UI library
- Tailwind CSS - CSS framework
- TypeScript - Type safety
See LICENSE file for details.