Introduction to the Weekend Project
Welcome to the Module 6 weekend project! This culminating activity will allow you to apply everything we've learned this week about modern CSS layouts, responsive design, animations, and CSS architecture. You'll build a complete multi-page website that showcases your ability to create responsive, animated, and well-structured CSS.
To guide your process, we'll use George Polya's famous 4-step problem-solving procedure:
This approach will ensure that you tackle this complex project systematically, rather than diving straight into code. Let's explore each step in detail as it applies to our website project.
Step 1: Understand the Problem
Project Requirements
You'll be building a responsive multi-page website for a fictional business or organization of your choice. The website should include:
- At least 4 distinct pages (e.g., Home, About, Services/Products, Contact)
- Responsive layout that works well on mobile, tablet, and desktop
- Modern layout techniques (Flexbox and/or Grid)
- CSS animations to enhance user experience
- Well-organized CSS using one of the methodologies we studied (BEM, SMACSS, or OOCSS)
- Custom properties (CSS variables) for consistent design
Technical Requirements
- Semantic HTML5 markup
- Mobile-first CSS with media queries
- CSS custom properties for theming
- At least 3 different CSS animations
- CSS Grid for at least one major layout component
- Flexbox for component-level layouts
- One form with styled inputs and validation feedback
- No external CSS frameworks (build everything from scratch)
- Cross-browser compatibility (latest versions of major browsers)
Project Constraints
- Time constraint: This is a weekend project, so scope appropriately
- No JavaScript required (focus on CSS, but you may add JavaScript if time permits)
- No preprocessors required (vanilla CSS only)
- Only use techniques covered in the course so far
Success Criteria
Your project will be successful if it:
- Meets all the requirements listed above
- Displays correctly across different screen sizes (320px to 1440px width)
- Has visually pleasing design with consistent styling
- Contains well-organized, maintainable CSS
- Demonstrates mastery of the concepts covered in Module 6
Clarifying Questions
Before moving forward, ask yourself the following questions:
- What type of business or organization will my website represent?
- What content needs to be included on each page?
- What are the key user journeys through the website?
- What CSS organization method will work best for this project?
- What animations would enhance the user experience rather than distract from it?
Having clear answers to these questions will help you create a more focused and coherent website.
Step 2: Devise a Plan
Project Planning
Choosing a Website Theme
Select a theme for your website that you can realistically implement over a weekend. Some ideas include:
- Portfolio website for a photographer or designer
- Local restaurant or café
- Small business service provider (consultant, craftsperson, etc.)
- Non-profit organization
- Educational resource or tutorial site
Sitemap and Page Structure
Plan the structure of your website, including:
- Home page: Introduction and key calls to action
- About page: Information about the business/organization
- Services/Products page: What the business offers
- Contact page: Contact form and information
- Optional additional pages: Blog, gallery, testimonials, etc.
Content Planning
For each page, outline the major content sections. For example:
Design System Planning
Plan your design system elements:
/* CSS Variables (Custom Properties) */
:root {
/* Colors */
--color-primary: #3498db;
--color-secondary: #2ecc71;
--color-accent: #e74c3c;
--color-text: #333333;
--color-text-light: #666666;
--color-background: #ffffff;
--color-background-alt: #f5f7fa;
/* Typography */
--font-primary: 'Roboto', sans-serif;
--font-secondary: 'Playfair Display', serif;
--font-size-base: 16px;
--font-size-h1: 2.5rem;
--font-size-h2: 2rem;
--font-size-h3: 1.5rem;
--font-size-h4: 1.25rem;
/* Spacing */
--spacing-xs: 0.25rem;
--spacing-sm: 0.5rem;
--spacing-md: 1rem;
--spacing-lg: 2rem;
--spacing-xl: 3rem;
/* Layout */
--container-max-width: 1200px;
--border-radius: 4px;
/* Animations */
--transition-fast: 0.2s ease;
--transition-medium: 0.3s ease;
--transition-slow: 0.5s ease;
}
CSS Organization
Choose and plan your CSS organization method. For example, using BEM:
/* Component: Header */
.header {}
.header__logo {}
.header__nav {}
.header__nav-item {}
.header__nav-link {}
.header__nav-link--active {}
/* Component: Hero */
.hero {}
.hero__content {}
.hero__title {}
.hero__subtitle {}
.hero__button {}
/* Component: Feature */
.feature {}
.feature__icon {}
.feature__title {}
.feature__text {}
CSS File Structure
Plan how to organize your CSS files:
css/
├── reset.css /* CSS reset or normalize */
├── variables.css /* CSS custom properties */
├── typography.css /* Base typography styles */
├── layout.css /* Layout components */
├── components.css /* UI components */
├── animations.css /* Animation definitions */
├── utilities.css /* Utility classes */
└── pages/ /* Page-specific styles */
├── home.css
├── about.css
├── services.css
└── contact.css
Responsive Breakpoints
Plan your responsive breakpoints:
/* Mobile-first approach */
/* Base styles for mobile */
/* Tablet and up */
@media (min-width: 768px) {
/* Tablet styles */
}
/* Desktop and up */
@media (min-width: 1024px) {
/* Desktop styles */
}
/* Large desktop and up */
@media (min-width: 1200px) {
/* Large desktop styles */
}
Animation Plan
Plan at least three animations:
- Navigation hover/active effects: Subtle transitions for interactive elements
- Page transition or entrance animations: Elements animating into place on page load
- Interactive component animation: Such as expanding cards, accordion effects, or form feedback
- Optional decorative animation: Background elements or subtle ambient motion
Implementation Timeline
Break the project into manageable chunks:
- Day 1 Morning: Set up project structure, create basic HTML for all pages
- Day 1 Afternoon: Implement CSS foundation (reset, variables, typography) and global components (header, footer)
- Day 1 Evening: Create home page layout and styles
- Day 2 Morning: Build remaining page layouts and styles
- Day 2 Afternoon: Implement responsive design adjustments and animations
- Day 2 Evening: Testing, refinement, and documentation
Step 3: Execute the Plan
Setting Up the Project
-
Create the project folder structure:
project-folder/ ├── index.html ├── about.html ├── services.html ├── contact.html ├── css/ │ ├── reset.css │ ├── variables.css │ ├── main.css │ └── animations.css └── img/ └── (image files) -
Set up the basic HTML template with proper meta tags and CSS links:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>[Page Title] | [Site Name]</title> <meta name="description" content="[Page description]"> <link rel="stylesheet" href="css/reset.css"> <link rel="stylesheet" href="css/variables.css"> <link rel="stylesheet" href="css/main.css"> <link rel="stylesheet" href="css/animations.css"> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Playfair+Display:wght@700&display=swap" rel="stylesheet"> </head> <body> <header class="header"> <!-- Header content --> </header> <main> <!-- Main content --> </main> <footer class="footer"> <!-- Footer content --> </footer> </body> </html>
Implementing the CSS Foundation
Reset CSS
Start with a minimal CSS reset:
/* reset.css */
*, *::before, *::after {
box-sizing: border-box;
}
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, ul, ol, dl, dd {
margin: 0;
}
ul, ol {
padding: 0;
list-style: none;
}
body {
min-height: 100vh;
line-height: 1.5;
}
img, picture {
max-width: 100%;
display: block;
}
input, button, textarea, select {
font: inherit;
}
CSS Variables
Define your design tokens as CSS custom properties:
/* variables.css */
:root {
/* Colors */
--color-primary: #3498db;
--color-primary-dark: #2980b9;
--color-secondary: #2ecc71;
--color-secondary-dark: #27ae60;
--color-accent: #e74c3c;
--color-accent-dark: #c0392b;
--color-text: #333333;
--color-text-light: #666666;
--color-text-lighter: #999999;
--color-background: #ffffff;
--color-background-alt: #f5f7fa;
--color-border: #e1e1e1;
/* Typography */
--font-primary: 'Roboto', sans-serif;
--font-secondary: 'Playfair Display', serif;
--font-size-base: 16px;
--font-size-sm: 0.875rem;
--font-size-lg: 1.125rem;
--font-size-xl: 1.25rem;
--font-size-h1: 2.5rem;
--font-size-h2: 2rem;
--font-size-h3: 1.5rem;
--font-size-h4: 1.25rem;
--font-weight-normal: 400;
--font-weight-medium: 500;
--font-weight-bold: 700;
/* Spacing */
--spacing-xs: 0.25rem;
--spacing-sm: 0.5rem;
--spacing-md: 1rem;
--spacing-lg: 2rem;
--spacing-xl: 3rem;
--spacing-xxl: 5rem;
/* Layout */
--container-max-width: 1200px;
--container-padding: var(--spacing-md);
--border-radius-sm: 4px;
--border-radius-md: 8px;
--border-radius-lg: 16px;
/* Animations */
--transition-fast: 0.2s ease;
--transition-medium: 0.3s ease;
--transition-slow: 0.5s ease;
/* Z-index levels */
--z-index-dropdown: 100;
--z-index-sticky: 200;
--z-index-fixed: 300;
--z-index-modal: 400;
}
/* Dark theme (optional) */
@media (prefers-color-scheme: dark) {
:root {
--color-background: #121212;
--color-background-alt: #1e1e1e;
--color-text: #f5f5f5;
--color-text-light: #e0e0e0;
--color-text-lighter: #a0a0a0;
--color-border: #333333;
/* Adjust other colors as needed for dark mode */
}
}
Main CSS
Implement your base styles and components:
/* main.css */
/* Base Typography */
body {
font-family: var(--font-primary);
font-size: var(--font-size-base);
color: var(--color-text);
background-color: var(--color-background);
}
h1, h2, h3, h4, h5, h6 {
font-family: var(--font-secondary);
font-weight: var(--font-weight-bold);
line-height: 1.2;
margin-bottom: var(--spacing-md);
}
h1 {
font-size: var(--font-size-h1);
}
h2 {
font-size: var(--font-size-h2);
}
h3 {
font-size: var(--font-size-h3);
}
h4 {
font-size: var(--font-size-h4);
}
p, ul, ol {
margin-bottom: var(--spacing-md);
}
a {
color: var(--color-primary);
text-decoration: none;
transition: color var(--transition-fast);
}
a:hover, a:focus {
color: var(--color-primary-dark);
text-decoration: underline;
}
/* Layout Components */
.container {
width: 100%;
max-width: var(--container-max-width);
margin: 0 auto;
padding: 0 var(--container-padding);
}
.section {
padding: var(--spacing-xl) 0;
}
.section--alt {
background-color: var(--color-background-alt);
}
/* Grid and Flexbox Layouts */
.grid {
display: grid;
gap: var(--spacing-md);
grid-template-columns: 1fr;
}
@media (min-width: 768px) {
.grid {
grid-template-columns: repeat(2, 1fr);
}
}
@media (min-width: 1024px) {
.grid {
grid-template-columns: repeat(3, 1fr);
}
}
.flex {
display: flex;
flex-wrap: wrap;
}
.flex-center {
justify-content: center;
align-items: center;
}
.flex-between {
justify-content: space-between;
align-items: center;
}
/* Component: Header */
.header {
padding: var(--spacing-md) 0;
border-bottom: 1px solid var(--color-border);
position: sticky;
top: 0;
background-color: var(--color-background);
z-index: var(--z-index-sticky);
}
.header__inner {
display: flex;
justify-content: space-between;
align-items: center;
}
.header__logo {
font-family: var(--font-secondary);
font-size: var(--font-size-xl);
font-weight: var(--font-weight-bold);
}
.header__nav {
display: none;
}
@media (min-width: 768px) {
.header__nav {
display: flex;
gap: var(--spacing-md);
}
}
.header__nav-link {
color: var(--color-text);
font-weight: var(--font-weight-medium);
padding: var(--spacing-xs) var(--spacing-sm);
position: relative;
}
.header__nav-link--active,
.header__nav-link:hover {
color: var(--color-primary);
text-decoration: none;
}
.header__nav-link--active::after {
content: '';
position: absolute;
left: var(--spacing-sm);
right: var(--spacing-sm);
bottom: 0;
height: 2px;
background-color: var(--color-primary);
}
.header__nav-toggle {
display: block;
cursor: pointer;
}
@media (min-width: 768px) {
.header__nav-toggle {
display: none;
}
}
/* Continue with other components... */
Animations CSS
Create your animations:
/* animations.css */
/* Keyframe Animations */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes pulse {
0% {
transform: scale(1);
}
50% {
transform: scale(1.05);
}
100% {
transform: scale(1);
}
}
@keyframes slideInLeft {
from {
transform: translateX(-100%);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}
@keyframes slideInRight {
from {
transform: translateX(100%);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}
/* Animation Utility Classes */
.animate-fade-in {
animation: fadeIn 0.6s ease-out forwards;
}
.animate-pulse {
animation: pulse 2s ease-in-out infinite;
}
.animate-slide-left {
animation: slideInLeft 0.4s ease-out forwards;
}
.animate-slide-right {
animation: slideInRight 0.4s ease-out forwards;
}
/* Staggered delays for lists */
.stagger-fade-in > * {
opacity: 0;
animation: fadeIn 0.5s ease-out forwards;
}
.stagger-fade-in > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-fade-in > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-fade-in > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-fade-in > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-fade-in > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-fade-in > *:nth-child(6) { animation-delay: 0.6s; }
/* Interactive Animations */
.btn {
transition: transform var(--transition-fast),
box-shadow var(--transition-fast);
}
.btn:hover {
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.btn:active {
transform: translateY(0);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* Respect user preferences */
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
.animate-fade-in,
.animate-pulse,
.animate-slide-left,
.animate-slide-right,
.stagger-fade-in > * {
animation: none !important;
opacity: 1 !important;
transform: none !important;
}
}
Building the Pages
For each page, you'll follow a similar pattern:
- Create the HTML structure with semantic elements
- Apply your CSS classes according to your chosen methodology
- Add responsive adaptations for different screen sizes
- Implement animations where appropriate
Example: Home Page Hero Section
<section class="hero">
<div class="container">
<div class="hero__content">
<h1 class="hero__title animate-fade-in">Creative Solutions for Your Business</h1>
<p class="hero__subtitle animate-fade-in" style="animation-delay: 0.2s;">
We help businesses like yours grow through innovative digital strategies.
</p>
<div class="hero__buttons" style="animation-delay: 0.4s;">
<a href="services.html" class="btn btn--primary animate-fade-in">Our Services</a>
<a href="contact.html" class="btn btn--secondary animate-fade-in">Contact Us</a>
</div>
</div>
<div class="hero__image animate-slide-right">
<img src="img/hero-image.jpg" alt="Business team collaborating">
</div>
</div>
</section>
Example: Services Grid with CSS Grid
<section class="section section--alt">
<div class="container">
<h2 class="section__title">Our Services</h2>
<div class="services-grid">
<div class="service-card animate-fade-in">
<div class="service-card__icon">
<svg>...</svg>
</div>
<h3 class="service-card__title">Web Design</h3>
<p class="service-card__description">
Beautiful, responsive websites that engage your audience.
</p>
<a href="#" class="service-card__link">Learn more</a>
</div>
<!-- More service cards... -->
</div>
</div>
</section>
/* CSS for Services Grid */
.services-grid {
display: grid;
grid-template-columns: 1fr;
gap: var(--spacing-lg);
}
@media (min-width: 768px) {
.services-grid {
grid-template-columns: repeat(2, 1fr);
}
}
@media (min-width: 1024px) {
.services-grid {
grid-template-columns: repeat(3, 1fr);
}
}
.service-card {
background-color: var(--color-background);
border-radius: var(--border-radius-md);
padding: var(--spacing-lg);
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
transition: transform var(--transition-medium),
box-shadow var(--transition-medium);
}
.service-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}
Example: Contact Form with Validation
<section class="section">
<div class="container">
<h2 class="section__title">Contact Us</h2>
<div class="contact-grid">
<div class="contact-info animate-fade-in">
<h3>Get in Touch</h3>
<p>We'd love to hear from you. Fill out the form or use the contact information below.</p>
<div class="contact-info__item">
<svg>...</svg>
<span>123 Business Street, City, Country</span>
</div>
<div class="contact-info__item">
<svg>...</svg>
<span>info@example.com</span>
</div>
<div class="contact-info__item">
<svg>...</svg>
<span>+1 (555) 123-4567</span>
</div>
</div>
<form class="contact-form animate-fade-in">
<div class="form-group">
<label for="name" class="form-label">Your Name</label>
<input type="text" id="name" class="form-control" required>
</div>
<div class="form-group">
<label for="email" class="form-label">Email Address</label>
<input type="email" id="email" class="form-control" required>
</div>
<div class="form-group">
<label for="message" class="form-label">Your Message</label>
<textarea id="message" class="form-control" rows="5" required></textarea>
</div>
<button type="submit" class="btn btn--primary">Send Message</button>
</form>
</div>
</div>
</section>
/* CSS for Contact Form */
.contact-grid {
display: grid;
grid-template-columns: 1fr;
gap: var(--spacing-xl);
}
@media (min-width: 768px) {
.contact-grid {
grid-template-columns: 1fr 2fr;
}
}
.contact-info__item {
display: flex;
align-items: center;
margin-bottom: var(--spacing-md);
}
.contact-info__item svg {
width: 24px;
height: 24px;
margin-right: var(--spacing-sm);
color: var(--color-primary);
}
.form-group {
margin-bottom: var(--spacing-md);
}
.form-label {
display: block;
margin-bottom: var(--spacing-xs);
font-weight: var(--font-weight-medium);
}
.form-control {
width: 100%;
padding: var(--spacing-sm);
border: 1px solid var(--color-border);
border-radius: var(--border-radius-sm);
transition: border-color var(--transition-fast),
box-shadow var(--transition-fast);
}
.form-control:focus {
border-color: var(--color-primary);
box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
outline: none;
}
.form-control.has-error {
border-color: var(--color-accent);
}
.form-error {
margin-top: var(--spacing-xs);
font-size: var(--font-size-sm);
color: var(--color-accent);
animation: fadeIn 0.3s ease-out;
}
Testing and Iteration
Throughout the implementation process, you should:
- Test your site in different browsers
- Check responsiveness at various screen sizes
- Verify that animations work as expected
- Test form validation and user interactions
- Make adjustments and refinements as you go
Step 4: Look Back and Refine
Review Your Implementation
After completing the initial implementation, take time to review your work:
- Requirement verification: Make sure you've met all the project requirements
- Code review: Check for consistency, redundancy, and opportunities for improvement
- User experience testing: Test the site from a user's perspective
- Performance analysis: Check for any performance issues
Optimizations
Look for opportunities to improve your implementation:
CSS Optimizations
- Remove unused CSS: Delete any styles that aren't being used
- Consolidate duplicate styles: Look for patterns that could be abstracted into utility classes
- Check selector specificity: Ensure you're not using overly specific selectors
- Optimize animations: Ensure animations use properties that don't trigger layout recalculations (transform and opacity)
Accessibility Improvements
- Color contrast: Verify that text has sufficient contrast against backgrounds
- Keyboard navigation: Ensure all interactive elements are accessible via keyboard
- Focus states: Add visible focus states for interactive elements
- Alternative text: Ensure all images have descriptive alt text
- Motion sensitivity: Respect the prefers-reduced-motion media query
Responsive Edge Cases
- Very small screens: Test on 320px width (iPhone 5/SE size)
- Very large screens: Make sure content doesn't stretch awkwardly on wide screens
- Landscape orientation: Check how the site looks in landscape mode on mobile
- Zoom testing: Test the site at different zoom levels
Documentation
Document your project for future reference:
- README file: Explain the project structure, components, and CSS organization
- CSS comments: Add comments to explain complex or non-obvious code
- Design system documentation: Document your colors, typography, spacing, and components
Further Enhancements
If time permits, consider these enhancements:
- Add JavaScript interactions: Mobile navigation toggle, form validation, etc.
- Create additional pages: Blog, project gallery, testimonials, etc.
- Add more complex animations: Parallax effects, scroll-triggered animations, etc.
- Implement a dark/light theme toggle: Building on your CSS variables
Project Examples and Inspiration
Example Layout Structures
Portfolio Website Structure
- Home Page: Hero section with introduction, featured projects grid, skills section, testimonials
- About Page: Personal biography, experience timeline, skills visualization, values or philosophy
- Projects Page: Filterable grid of projects with cards, detailed case studies
- Contact Page: Contact form, social media links, availability information
Restaurant Website Structure
- Home Page: Hero with ambiance image, about section, featured dishes, testimonials, reservation CTA
- Menu Page: Categorized menu sections, dish cards with descriptions and prices
- About Page: Restaurant story, chef profiles, interior gallery, values or sourcing information
- Contact Page: Map location, hours, reservation form, private event information
Animation Ideas
- Scroll-triggered entrance animations: Elements fade or slide in as they enter the viewport
- Hover animations: Cards lift slightly and gain shadow on hover
- Loading animations: Staggered reveal of content after page loads
- Micro-interactions: Button press effects, form input focus states
- Transitions: Smooth transitions between different states (e.g., mobile menu opening/closing)
Design Inspiration Resources
- Awwwards - Curated website design examples
- Dribbble - Design inspiration and community
- Behance - Creative portfolio site
- Site Inspire - Web design gallery
- Codrops - Web design and development inspiration
Submission Requirements
What to Submit
- All HTML files: At least 4 pages (Home, About, Services/Products, Contact)
- All CSS files: Organized according to the structure you chose
- Images folder: With all images used in the project
- README file: Documentation explaining your project
Readme Documentation
Your README should include:
- Project overview: Brief description of the fictional business/organization
- Pages included: List of pages and their main content
- CSS organization approach: Explanation of your CSS methodology (BEM, SMACSS, or OOCSS)
- Responsive features: Description of how your site adapts to different screen sizes
- Animations implemented: List of animations and their purposes
- Technologies used: HTML5, CSS (Grid, Flexbox, Custom Properties, etc.)
- Challenges and solutions: Any interesting problems you encountered and how you solved them
Evaluation Criteria
Your project will be evaluated based on:
- Requirements fulfillment: Did you meet all the stated requirements?
- Code quality: Is your HTML and CSS well-structured, consistent, and maintainable?
- Responsive implementation: Does your site work well across different screen sizes?
- Visual design: Is the site visually appealing and consistent?
- Animations: Are animations purposeful and well-implemented?
- Accessibility: Did you consider basic accessibility principles?
- Documentation: Is your code and project well-documented?
Conclusion
This weekend project provides an excellent opportunity to solidify your understanding of the CSS concepts covered in Module 6. By building a complete website, you'll gain practical experience with:
- Implementing responsive layouts with CSS Grid and Flexbox
- Creating engaging animations and transitions
- Organizing CSS using established methodologies
- Using CSS custom properties for consistent design
- Building accessible and user-friendly interfaces
Remember to follow George Polya's 4-step problem-solving process:
- Understand the Problem: Be clear about what you're building before you start
- Devise a Plan: Create a structured plan for your implementation
- Execute the Plan: Build your website following your plan
- Look Back: Review and refine your work to improve it
This systematic approach will help you create a more cohesive, well-structured website and will serve you well in your future web development career.
Good luck with your project, and enjoy the process of bringing your website to life!