A modern portfolio website for a programmer! Here's a fully functional, responsive, and sleek design concept. I'll provide you with:
- HTML (structure)
- CSS (styling, using SCSS for better organization)
- JavaScript (interactivity)
- A few assets (images, icons)
Our programmer friend's name is "Alex Doe" (feel free to replace it with your own details). Alex is a skilled full-stack developer with expertise in Web Development, Mobile App Development, and Machine Learning.
Website Features:
- Hero Section with animated background
- About Section with profile picture and bio
- Skills Section with progress bars and tech icons
- Portfolio Section with project cards and modals
- Experience Section with a timeline
- Contact Section with a form and social links
- Responsive Design (works on desktop, tablet, and mobile)
- Smooth scrolling and animations
Let's get started!
Folder Structure:
portfolio-website/
├── index.html
├── assets/
│ ├── images/
│ │ ├── profile-picture.jpg
│ │ ├── project1.jpg
│ │ ├── project2.jpg
│ │ └── project3.jpg
│ ├── icons/
│ │ ├── html5.svg
│ │ ├── css3.svg
│ │ ├── js.svg
│ │ └── ... (other tech icons)
│ └── styles/
│ ├── main.scss
│ ├── _variables.scss
│ ├── _mixins.scss
│ └── _responsive.scss
├── scripts/
│ └── main.js
└── package.json (optional, for SCSS compilation)
1. HTML (index.html)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Alex Doe | Full-Stack Developer</title>
<link rel="stylesheet" href="assets/styles/main.css">
<link rel="icon" href="assets/icons/favicon.ico">
</head>
<body>
<!-- Hero Section -->
<section id="hero" class="hero">
<canvas id="canvas" class="hero-canvas"></canvas>
<div class="hero-content">
<h1>Hi, I'm <span>Alex Doe</span></h1>
<p>Full-Stack Developer | Web Enthusiast | ML Explorer</p>
<a href="#about" class="btn">Know More</a>
</div>
</section>
<!-- About Section -->
<section id="about" class="about">
<div class="container">
<div class="about-profile">
<img src="assets/images/profile-picture.jpg" alt="Alex Doe">
</div>
<div class="about-bio">
<h2>About Me</h2>
<p>I'm a passionate developer with 5+ years of experience in building scalable web applications, mobile apps, and exploring machine learning. I love solving problems and learning new technologies.</p>
<p>When I'm not coding, you'll find me hiking or reading tech blogs.</p>
</div>
</div>
</section>
<!-- Skills Section -->
<section id="skills" class="skills">
<div class="container">
<h2>Skills</h2>
<div class="skills-list">
<div class="skill">
<img src="assets/icons/html5.svg" alt="HTML5">
<span>HTML5</span>
<progress value="90" max="100"></progress>
</div>
<!-- Repeat for CSS3, JS, React, Node, Python, etc. -->
</div>
</div>
</section>
<!-- Portfolio Section -->
<section id="portfolio" class="portfolio">
<div class="container">
<h2>My Projects</h2>
<div class="portfolio-grid">
<div class="project-card">
<img src="assets/images/project1.jpg" alt="Project 1">
<h3>Project 1: E-commerce Website</h3>
<p>Built with React, Node, and MongoDB.</p>
<button class="btn" data-modal="project1-modal">View Details</button>
</div>
<!-- Repeat for Project 2, 3, etc. -->
</div>
</div>
</section>
<!-- Modals for Projects -->
<div class="modal" id="project1-modal">
<div class="modal-content">
<span class="close">×</span>
<h2>Project 1: E-commerce Website</h2>
<p>Detailed description of the project...</p>
<a href="#" target="_blank" class="btn">Visit Live Site</a>
</div>
</div>
<!-- Experience Section -->
<section id="experience" class="experience">
<div class="container">
<h2>Experience</h2>
<div class="timeline">
<div class="timeline-item">
<span>2018 - Present</span>
<h3>Senior Developer, ABC Company</h3>
<p>Leading the web development team...</p>
</div>
<!-- Repeat for other experiences -->
</div>
</div>
</section>
<!-- Contact Section -->
<section id="contact" class="contact">
<div class="container">
<h2>Get In Touch</h2>
<form id="contact-form">
<input type="text" name="name" placeholder="Name">
<input type="email" name="email" placeholder="Email">
<textarea name="message" placeholder="Message"></textarea>
<button type="submit" class="btn">Send Message</button>
</form>
<div class="social-links">
<a href="#" target="_blank"><i class="fab fa-github"></i></a>
<a href="#" target="_blank"><i class="fab fa-linkedin"></i></a>
<a href="#" target="_blank"><i class="fab fa-twitter"></i></a>
</div>
</div>
</section>
<script src="scripts/main.js"></script>
<script src="https://kit.fontawesome.com/a076d05399.js"></script> <!-- For FontAwesome Icons -->
</body>
</html>
2. CSS (using SCSS, in assets/styles/main.scss)
// Variables
@import 'variables';
// Mixins
@import 'mixins';
// Global Styles
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: 'Open Sans', sans-serif;
line-height: 1.6;
color: $text-color;
background-color: $bg-color;
}
// Hero Section
.hero {
position: relative;
height: 100vh;
background-color: $primary-color;
&-canvas {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
&-content {
position: relative;
z-index: 1;
text-align: center;
top: 50%;
transform: translateY(-50%);
h1 {
font-size: 3rem;
color: $white;
span {
color: $secondary-color;
}
}
p {
font-size: 1.2rem;
color: $white;
}
.btn {
@include button($secondary-color, $white);
}
}
}
// About Section
.about {
padding: 5rem 0;
&-profile {
text-align: center;
img {
width: 150px;
height: 150px;
border-radius: 50%;
margin: 1rem;
}
}
&-bio {
max-width: 600px;
margin: 0 auto;
h2 {
font-size: 2rem;
margin-bottom: 1rem;
}
}
}
// Skills Section
.skills {
padding: 5rem 0;
background-color: $light-bg;
&-list {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.skill {
margin: 1rem;
text-align: center;
img {
width: 40px;
height: 40px;
margin-bottom: 0.5rem;
}
span {
display: block;
font-size: 0.9rem;
}
progress {
width: 100px;
height: 10px;
-webkit-appearance: none;
appearance: none;
&::-webkit-progress-bar {
background-color: $progress-bg;
}
&::-webkit-progress-value {
background-color: $progress-value;
}
}
}
}
// Portfolio Section
.portfolio {
padding: 5rem 0;
&-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1rem;
}
.project-card {
background-color: $white;
padding: 1rem;
border: 1px solid $border-color;
img {
width: 100%;
height: 150px;
object-fit: cover;
border-radius: 0.5rem 0.5rem 0 0;
}
h3 {
font-size: 1.2rem;
margin: 0.5rem 0;
}
.btn {
@include button($primary-color, $white);
}
}
}
// Modals
.modal {
display: none;
position: fixed;
z-index: 10;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
&-content {
background-color: $white;
margin: 10% auto;
padding: 2rem;
width: 80%;
max-width: 600px;
border-radius: 0.5rem;
.close {
float: right;
font-size: 2rem;
cursor: pointer;
}
}
}
// Experience Section
.experience {
padding: 5rem 0;
background-color: $light-bg;
.timeline {
position: relative;
padding: 1rem 0;
&:before {
content: '';
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
height: 100%;
width: 2px;
background-color: $primary-color;
}
&-item {
position: relative;
margin: 2rem 0;
span {
position: absolute;
left: 50%;
transform: translateX(-50%);
background-color: $primary-color;
color: $white;
padding: 0.2rem 0.5rem;
border-radius: 0.2rem;
}
h3 {
margin-top: 2rem;
font-size: 1.2rem;
}
}
}
}
// Contact Section
.contact {
padding: 5rem 0;
#contact-form {
max-width: 600px;
margin: 0 auto;
input, textarea {
width: 100%;
padding: 0.5rem;
margin-bottom: 1rem;
border: 1px solid $border-color;
}
.btn {
@include button($primary-color, $white);
}
}
.social-links {
text-align: center;
margin-top: 2rem;
a {
margin: 0 0.5rem;
font-size: 1.5rem;
color: $text-color;
&:hover {
color: $primary-color;
}
}
}
}
// Responsive Design
@import 'responsive';
assets/styles/_variables.scss
// Colors
$primary-color: #3498db;
$secondary-color: #f1c40f;
$text-color: #333;
$bg-color: #f9f9f9;
$light-bg: #f2f2f2;
$white: #fff;
$progress-bg: #ccc;
$progress-value: $primary-color;
$border-color: #ddd;
// Fonts
$font-family: 'Open Sans', sans-serif;
assets/styles/_mixins.scss
// Button Mixin
@mixin button($bg-color, $text-color) {
background-color: $bg-color;
color: $text-color;
border: none;
padding: 0.5rem 1rem;
font-size: 1rem;
cursor: pointer;
border-radius: 0.2rem;
&:hover {
opacity: 0.9;
}
}
assets/styles/_responsive.scss
// Responsive Breakpoints
$breakpoint-tablet: 768px;
$breakpoint-mobile: 480px;
// Tablet and Below
@media (max-width: $breakpoint-tablet) {
.portfolio-grid {
grid-template-columns: repeat(2, 1fr);
}
}
// Mobile and Below
@media (max-width: $breakpoint-mobile) {
.hero-content {
h1 {
font-size: 2rem;
}
}
.portfolio-grid {
grid-template-columns: 1fr;
}
.timeline {
&:before {
left: 0;
}
&-item {
span {
left: 0;
}
}
}
}
3. JavaScript (scripts/main.js)
// Hero Canvas Animation
const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
function draw() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.beginPath();
ctx.moveTo(0, canvas.height / 2);
for (let i = 0; i < canvas.width; i++) {
ctx.lineTo(i, canvas.height / 2 + Math.sin(i * 0.01) * 50);
}
ctx.strokeStyle = '#3498db';
ctx.stroke();
}
draw();
setInterval(draw, 1000 / 60); // 60 FPS
// Smooth Scrolling
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
// Modal Functionality
document.querySelectorAll('.project-card button').forEach(button => {
button.addEventListener('click', () => {
const modalId = button.getAttribute('data-modal');
document.getElementById(modalId).style.display = 'block';
});
});
document.querySelectorAll('.modal .close').forEach(closeBtn => {
closeBtn.addEventListener('click', () => {
closeBtn.closest('.modal').style.display = 'none';
});
});
// Contact Form Submission (example, you'll need backend for actual submission)
document.getElementById('contact-form').addEventListener('submit', (e) => {
e.preventDefault();
const formData = new FormData(e.target);
console.log('Form submitted:', formData.get('name'), formData.get('email'), formData.get('message'));
// Here you'd send formData to your server using fetch or XMLHttpRequest
});
Assets:
- Profile Picture: Place a square image (e.g., 400x400 pixels) in
assets/images/profile-picture.jpg.
- Project Images: Add images for each project (e.g.,
project1.jpg, project2.jpg) in assets/images/.
- Tech Icons: Download SVG icons for HTML5, CSS3, JavaScript, React, Node, etc., and place them in
assets/icons/. You can find icons on IconFinder or use FontAwesome/Devicon classes in HTML.
Optional Setup for SCSS Compilation:
If you want to compile SCSS to CSS automatically:
- Install Node.js and npm.
- Run
npm init -y in your project folder.
- Install
node-sass by running npm install node-sass.
- Add a script in
package.json: "scss": "node-sass assets/styles/main.scss assets/styles/main.css -w" (this watches for SCSS changes and compiles to CSS).
- Run
npm run scss in your terminal.
Now, Open index.html in Your Browser!
You should see a beautiful, modern portfolio website. Customize the content, links, and styles to reflect your own personality and projects.
Happy coding!