Welcome to your modernized portfolio! This project includes a beautiful frontend with modern UI/UX, smooth animations, and a fully functional backend for form submissions.
portfolio/
βββ portfolio.html # Home/About page
βββ projects.html # Projects showcase page
βββ qurey.html # Contact form page
βββ style.css # Modern styles with animations
βββ server.py # Flask backend server
βββ requirements.txt # Python dependencies
βββ form_submissions.json # Stored form submissions (auto-created)
βββ images/
βββ me.jpeg # Profile picture
βββ rebot.png # Project screenshot
βββ Resume.pdf # Resume file
β¨ Modern UI/UX Design
- Clean, professional layout with gradient backgrounds
- Responsive grid layouts that work on all devices
- Professional color scheme (indigo & purple gradients)
- Smooth transitions and hover effects
π¬ Smooth Animations
- Fade-in animations on page load
- Slide-up animations for content sections
- Pulse animation on profile image
- Hover effects on cards and buttons
- Button elevation on click
π± Responsive Design
- Mobile-first approach
- Tablet optimized
- Desktop enhanced layout
- Breakpoints at 768px and 480px
π§ Form Submission Handler
- POST endpoint to receive form data
- Email validation
- Required field validation
- Stores submissions in JSON file
- CORS enabled for frontend communication
π Admin Features
- View all submissions: GET
/api/submissions - View single submission: GET
/api/submissions/<id> - Delete submission: DELETE
/api/submissions/<id>
- Python 3.8 or higher
- Modern web browser
- Text editor or IDE
Open PowerShell in your project directory and run:
pip install -r requirements.txtIn PowerShell, run:
python server.pyYou should see:
==================================================
Portfolio Website Backend Server
==================================================
Server starting on http://localhost:5000
Contact form endpoint: http://localhost:5000/api/submit-query
View submissions: http://localhost:5000/api/submissions
==================================================
- Open your browser
- Navigate to:
file:///C:/Users/godwi/html exercise/portfolio.html - (Or open
portfolio.htmldirectly)
Note: Keep the Python server running in the background while using the website for form submissions to work.
- Hero section with profile image
- About me with three key areas
- Skills grid showing frontend, backend, database, and tools
- Call-to-action section
- Project showcase with cards
- Live demo and code links
- Technology stack display
- Resume download link
- Contact information section
- Modern contact form with validation
- Form fields:
- Name (required)
- Email (required)
- Age (optional)
- Address (optional)
- Department (optional)
- Message (required)
- Success/error feedback
- User fills out the form on the contact page
- JavaScript validates required fields
- Data is sent to the backend server via HTTP POST
- Server validates email format and required fields
- Submission is stored in
form_submissions.json - User receives success or error message
Open your browser and go to:
http://localhost:5000/api/submissions
This shows all submitted forms in JSON format.
Edit the CSS variables at the top of style.css:
:root {
--primary-color: #6366f1; /* Change this */
--secondary-color: #8b5cf6; /* And this */
--accent-color: #ec4899; /* And this */
/* ... */
}Edit the HTML files directly to update:
- Your name and title
- About section content
- Skills list
- Project information
- Contact information
- Place your image in the
images/folder - Update the
srcattribute in HTML files:
<img src="images/your-image.jpg" alt="description">- Chrome/Edge 90+
- Firefox 88+
- Safari 14+
- Mobile browsers (iOS Safari, Chrome Mobile)
To use a real database instead of JSON:
- Install database driver:
pip install pymongoorpip install mysql-connector-python - Modify
server.pyto connect to your database - Update submission storage logic
To send email when form is submitted:
- Install email library:
pip install python-dotenv - Add to
server.py:
import smtplib
from email.mime.text import MIMEText
# Configure in server.py to send emailsDeploy Frontend:
- Upload HTML, CSS, and images to Netlify or GitHub Pages
Deploy Backend:
- Use Render, Heroku, or Railway
- Set environment variables for database credentials
Problem: "Connection refused" when submitting form
- Solution: Make sure
server.pyis running on port 5000
Problem: CORS error in browser console
- Solution: Backend CORS is enabled, verify server is running
Problem: Form submissions not saving
- Solution: Check write permissions in the project directory
Problem: Styling looks broken
- Solution: Clear browser cache (Ctrl+Shift+Delete) and reload
POST http://localhost:5000/api/submit-query
Content-Type: application/json
{
"name": "John Doe",
"email": "john@example.com",
"message": "Hello!",
"age": "25",
"address": "123 Main St",
"department": "CSE"
}
Response:
{
"success": true,
"message": "Your message has been received!",
"submission_id": 1
}
GET http://localhost:5000/api/submissions
Response:
{
"success": true,
"total": 5,
"submissions": [...]
}
- Dark mode toggle
- Multi-language support
- Blog section
- Project filtering
- Real-time notifications
- User authentication
- Admin dashboard
- Email notifications on form submission
If you encounter any issues or have questions, refer to the server logs in PowerShell for debugging information.
Happy coding! πβ¨