Portfolio Website
Introduction
This documentation provides a comprehensive guide to the Portfolio Website template. It explains how to customize the website, add your own content, and make basic modifications to suit your needs.
Table of Contents
File Structure
The website has the following main files and directories:
src/index.php- The main PHP (HTML) file containing the website structuresrc/assets/css/styles.css- CSS styles for the websitesrc/assets/js/scripts.js- JavaScript functionalitysrc/assets/portfolio.json- JSON file containing portfolio projects datasrc/assets/skills.json- JSON file containing skills datasrc/contact-process.php- PHP script for processing contact form submissionssrc/assets/images/- Directory for storing images
Customizing Content
Basic Information
To customize the basic information on the website:
- Open
src/index.php - Update the following sections:
- Title and meta tags (lines 8-36)
- Hero section content (lines 180-190)
- About section content (lines 280-290)
- Footer copyright information (line 1197)
The year in the footer is automatically updated to the current year using JavaScript.
Navigation
To modify the navigation menu:
- Desktop navigation is located around line 70
- Mobile navigation is located around line 150
- Update the links and text as needed
Adding Projects
Projects are managed through the portfolio.json file:
- Open
src/assets/portfolio.json - Each project follows this structure:
{"id": "unique-project-id","title": "Project Title","description": "Detailed description of the project.","images": ["./assets/images/project1.jpg", "./assets/images/project1.jpg"]}
- To add a new project:
- Create a new JSON object following the structure above
- Add it to the array in
portfolio.json - Place the project images in the
src/assets/images/directory
The projects will automatically appear in the Portfolio section of the website.
Modifying Skills
Skills are managed through the skills.json file:
- Open
src/assets/skills.json - Each skill follows this structure:
{"name": "Skill Name","percentage": 75}
- To add or modify skills:
- Update the name and percentage values
- The percentage determines the fill of the circular progress indicator
Contact Form Setup
The contact form sends messages to a Discord webhook:
- Open
src/contact-process.php - Update the Discord webhook URL on line 13:
$DISCORD_WEBHOOK_URL = 'your-discord-webhook-url';
- Customize the form fields in
index.phpif needed (around line 580)
The form collects Discord username, subject, and message, then sends them to the specified Discord channel.
Theme Customization
Colors
The website uses a color scheme defined in Tailwind CSS classes:
- Primary colors: Classes with
primary-400,primary-500, etc. - Accent colors: Classes with
accent-400,accent-500, etc. - Dark/light mode is toggled with the theme button in the navigation
Dark Mode
The website supports automatic dark mode detection and manual toggling:
- Dark mode preferences are saved in localStorage
- The toggle functionality is in
scripts.js(around line 30)
Responsive Design
The website is fully responsive with different layouts for:
- Mobile devices (< 768px)
- Tablets (768px - 1024px)
- Desktop (> 1024px)
Responsive behavior is handled through Tailwind CSS classes and some JavaScript adjustments in scripts.js.
Troubleshooting
Images Not Loading
- Check that image paths in
portfolio.jsonare correct - Verify that images exist in the specified directory
- Check browser console for 404 errors
Contact Form Not Working
- Verify the Discord webhook URL is correct
- Check server logs for PHP errors
- Ensure the server supports PHP
- Test the webhook URL directly
Animation Issues
If animations aren’t working:
- Check that Motion.js is properly loaded
- Verify browser compatibility
- Check browser console for JavaScript errors