Below is a complete, production-ready “front page” you can drop into an index.html file.
It’s written in plain HTML/CSS/JS—no build tools required—but it still shows off techniques employers like to see:
• CSS Grid + Flexbox layout
• Dark-mode toggle (CSS variables + JS)
• Intersection Observer reveal-on-scroll animations
• Project filtering (vanilla JS, no libraries)
• Lazy-loaded images
• A11y-friendly & responsive down to 320 px
Feel free to swap the dummy projects with your own repos, case-studies, or live URLs.
────────────────────────────────────────────────────────────
html Copy code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>John Dev — Portfolio</title>
<!-- ===== Google Fonts (optional) ===== -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap">
<style>
/* -------------- CSS Variables -------------- */
:root {
--clr-bg: #ffffff;
--clr-text: #1c1c1c;
--clr-accent: #0066ff;
--clr-card: #f4f4f4;
--transition: .3s ease;
}
[data-theme="dark"] {
--clr-bg: #1c1c1c;
--clr-text: #f1f1f1;
--clr-card: #242424;
}
/* -------------- Global Reset -------------- */
*, *::before, *::after { box-sizing: border-box; }
body {
margin: 0;
font-family: 'Inter', sans-serif;
background: var(--clr-bg);
color: var(--clr-text);
line-height: 1.6;
transition: background var(--transition), color var(--transition);
}
a { color: inherit; text-decoration: none; }
/* -------------- Layout Helpers -------------- */
.container { max-width: 1200px; margin-inline: auto; padding: 0 1rem; }
/* -------------- Header / Hero -------------- */
header {
min-height: 100vh;
display: grid;
place-items: center;
text-align: center;
position: relative;
overflow: hidden;
}
header::before { /* subtle radial background accent */
content: "";
position: absolute; inset: 0;
background: radial-gradient(circle at center, var(--clr-accent)15%, transparent 60%);
opacity: .05;
z-index: -1;
}
.hero-title { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; margin: 0; }
.hero-sub { font-size: 1.25rem; margin: .5rem 0 1.5rem; }
.btn-primary {
display: inline-block; padding: .9rem 2rem;
background: var(--clr-accent); color: #fff; border-radius: .4rem; font-weight: 600;
transition: transform .2s;
}
.btn-primary:hover { transform: translateY(-3px); }
/* -------------- Theme Toggle -------------- */
.theme-toggle {
position: absolute; top: 1rem; right: 1rem;
width: 42px; height: 42px; cursor: pointer;
display: grid; place-items: center;
border-radius: 50%; background: var(--clr-card);
transition: background var(--transition);
}
.theme-toggle svg { width: 24px; height: 24px; }
/* -------------- Projects Section -------------- */
section { padding: 5rem 0; }
.section-title { font-size: 2rem; margin-bottom: 2rem; text-align: center; }
/* Filter Buttons */
.filters { display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filter-btn {
padding: .5rem 1.1rem; border-radius: 20px; font-weight: 600;
border: 2px solid var(--clr-accent); cursor: pointer;
background: transparent; color: var(--clr-accent);
transition: background var(--transition), color var(--transition);
}
.filter-btn.active,
.filter-btn:hover { background: var(--clr-accent); color: #fff; }
/* Grid */
.projects-grid {
display: grid; gap: 1.5rem;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card {
background: var(--clr-card); border-radius: .8rem;
overflow: hidden; transform: translateY(20px); opacity: 0;
transition: transform .6s var(--transition), opacity .6s var(--transition);
}
.card.reveal { transform: none; opacity: 1; }
.card-img { width: 100%; height: 180px; object-fit: cover; }
.card-body { padding: 1.25rem; }
.card-tags { font-size: .75rem; opacity: .8; }
.card-title { font-size: 1.2rem; margin: .35rem 0; }
.card-action { font-size: .9rem; color: var(--clr-accent); font-weight: 600; }
/* -------------- About Section -------------- */
.about-grid {
display: grid; gap: 2rem;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
align-items: center;
}
.about-img { width: 100%; border-radius: 1rem; }
/* -------------- Footer -------------- */
footer {
background: var(--clr-card); padding: 2rem 0; text-align: center;
font-size: .9rem;
}
/* -------------- Media Queries -------------- */
@media (prefers-reduced-motion: reduce) {
* { transition: none !important; animation: none !important; }
}
</style>
</head>
<body>
<!-- === Theme toggle === -->
<button class="theme-toggle" aria-label="Toggle dark mode">
<svg viewBox="0 0 24 24" fill="currentColor">
<path d="M12 2a1 1 0 0 0 0 2 8 8 0 1 1-7.448 4.032 1 1 0 0 0-1.742-.986A10 10 0 1 0 12 2z"/>
</svg>
</button>
<!-- === HERO === -->
<header>
<div class="container">
<h1 class="hero-title">John Doe</h1>
<p class="hero-sub">Web Dev • Front-End Engineer • CSS Wizard</p>
<a href="#projects" class="btn-primary">See my work ↓</a>
</div>
</header>
<!-- === PROJECTS === -->
<section id="projects" class="container">
<h2 class="section-title">Featured Projects</h2>
<!-- Filters -->
<div class="filters">
<button class="filter-btn active" data-filter="all">All</button>
<button class="filter-btn" data-filter="react">React</button>
<button class="filter-btn" data-filter="node">Node</button>
<button class="filter-btn" data-filter="design">Design Systems</button>
</div>
<!-- Grid -->
<div class="projects-grid">
<!-- Project Card #1 -->
<article class="card" data-category="react">
<img class="card-img" loading="lazy" src="https://source.unsplash.com/random/800x600?dashboard" alt="Project screenshot">
<div class="card-body">
<div class="card-tags">React • Typescript • GraphQL</div>
<h3 class="card-title">SaaS Analytics Dashboard</h3>
<a class="card-action" href="#" target="_blank">Live Demo →</a>
</div>
</article>
<!-- Project Card #2 -->
<article class="card" data-category="node">
<img class="card-img" loading="lazy" src="https://source.unsplash.com/random/800x600?api" alt="Project screenshot">
<div class="card-body">
<div class="card-tags">Node • Express • MongoDB</div>
<h3 class="card-title">RESTful API Boilerplate</h3>
<a class="card-action" href="#" target="_blank">GitHub Repo →</a>
</div>
</article>
<!-- Project Card #3 -->
<article class="card" data-category="design">
<img class="card-img" loading="lazy" src="https://source.unsplash.com/random/800x600?styleguide" alt="Project screenshot">
<div class="card-body">
<div class="card-tags">Figma • Storybook • SCSS</div>
<h3 class="card-title">Design System v2.0</h3>
<a class="card-action" href="#" target="_blank">Case Study →</a>
</div>
</article>
<!-- …duplicate & customise as needed -->
</div>
</section>
<!-- === ABOUT === -->
<section id="about" class="container">
<h2 class="section-title">About Me</h2>
<div class="about-grid">
<img class="about-img" src="https://source.unsplash.com/random/600x600?portrait" alt="John photo">
<div>
<p>I'm John Doe, a front-end devotee who never met a CSS grid I didn't love. Over the past 5 years I've shipped production apps for fintechs, SaaS start-ups, and open-source communities.</p>
<p>When I'm not refactoring components, you’ll find me mentoring boot-camp grads or writing deep-dives on performance audits.</p>
<p>
<strong>Tech I enjoy:</strong><br>
React • Next.js • Node • GraphQL • Tailwind • Web Performance • A11y
</p>
<a href="mailto:hello@example.com" class="btn-primary">Let's build something</a>
</div>
</div>
</section>
<!-- === FOOTER === -->
<footer>
© 2024 John Doe. Built with vanilla HTML, CSS, and a hint of JS.
</footer>
<!-- === Main JS === -->
<script>
// ---------- Theme toggle ----------
const toggle = document.querySelector('.theme-toggle');
const storedTheme = localStorage.getItem('theme');
if (storedTheme) document.documentElement.dataset.theme = storedTheme;
toggle.addEventListener('click', () => {
const newTheme = document.documentElement.dataset.theme === 'dark' ? '' : 'dark';
document.documentElement.dataset.theme = newTheme;
localStorage.setItem('theme', newTheme);
});
// ---------- Intersection Observer (card reveal) ----------
const cards = document.querySelectorAll('.card');
const io = new IntersectionObserver(entries => {
entries.forEach(entry => {
if (entry.isIntersecting) entry.target.classList.add('reveal');
});
}, { threshold: 0.15 });
cards.forEach(card => io.observe(card));
// ---------- Project filtering ----------
const filterBtns = document.querySelectorAll('.filter-btn');
const grid = document.querySelector('.projects-grid');
filterBtns.forEach(btn => btn.addEventListener('click', () => {
filterBtns.forEach(b => b.classList.toggle('active', b === btn));
const filter = btn.dataset.filter;
cards.forEach(card => {
const match = filter === 'all' || card.dataset.category.includes(filter);
card.style.display = match ? 'block' : 'none';
});
}));
</script>
</body>
</html>
────────────────────────────────────────────────────────────
How to customise quickly
Replace “John Doe” and bio copy.
Swap images (or embed GIFs!) in the <img> tags.
For each project, change data-category, tags, title, and links.
Add more cards by duplicating the <article class="card">…</article> block.
Deploy:
• GitHub Pages → push straight to a main branch.
• Netlify → drag-n-drop the folder.
• Vercel → vercel CLI defaults work out of the box.
Pro tips to “show hard work”
• Embed a live CodeSandbox or custom iframe demo.
• Add Lighthouse scores or bundle-size badges on each card.
• Attach blog posts as case studies (what problem, how you solved it, metrics).
• Use the GitHub API to pull latest commits automatically and display commit heat-map.
Now you’ve got a front page that screams 🔥 “I build real things” 🔥—go impress that hiring manager!