Day 16 - Midterm & Landing Page
Home
Day 16: Midterm & Landing Page Project
Work Day đđģ
CSCI 3403 - Web Programming
Week 8, Class 16
Today's Schedule:
â° First 30 minutes: Midterm Exam
đ Remainder: Landing Page Project Work
Midterm Quick Reference đ
CSS Property Format:
selector {
property: value;
another-property: value;
}
Common CSS Properties:
color
, background-color
, font-size
margin
, padding
, border
display
, flex-direction
, justify-content
HTML Structure:
<tag attribute="value">Content</tag>
Landing Page Project đ¨
Creating a Complete Web Page from Design
Project Goal:
Build an entire web page from provided design images
đ Match the design (doesn't need to be pixel-perfect)
đ¯ Practice HTML & CSS skills
đ Deploy to GitHub Pages
⨠Feel free to customize content!
Resources:
Design Image 1: Full website layout
Design Image 2: Colors and fonts guide
What You're Building đŧī¸
4 Main Sections + Footer
Hero Section: Eye-catching header with main message
Information Section: Four info cards with images
Quote Section: Inspirational quote or testimonial
Call-to-Action: Sign up box
Footer: Copyright information
Step 1: Project Setup đ
GitHub Repository Setup:
mkdir landing-page
cd landing-page
git init
touch index.html style.css README.md
Create Repository on GitHub:
Go to GitHub.com
Click "New Repository"
Name it "landing-page"
Leave it public, don't initialize with README
Follow the commands to push existing repository
Step 2: HTML Structure đī¸
Start with Semantic HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Awesome Landing Page</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- Header/Nav -->
<!-- Hero Section -->
<!-- Information Section -->
<!-- Quote Section -->
<!-- CTA Section -->
<!-- Footer -->
</body>
</html>
Building the Hero Section đϏ
<div class="hero">
<nav>
<div class="logo">Header Logo</div>
<ul class="nav-links">
<li><a href="#">header link one</a></li>
<li><a href="#">header link two</a></li>
<li><a href="#">header link three</a></li>
</ul>
</nav>
<div class="hero-content">
<div class="hero-text">
<h1>This website is awesome</h1>
<p>This website has some subtext...</p>
<button>Sign up</button>
</div>
<img src="placeholder.jpg" alt="placeholder">
</div>
</div>
CSS Flexbox Strategy đĻ
Your Best Friend for Layout
Navigation Bar:
nav {
display: flex;
justify-content: space-between;
align-items: center;
}
Hero Content:
.hero-content {
display: flex;
gap: 50px;
align-items: center;
}
Information Section âšī¸
Four Card Layout
<div class="info-section">
<h2>Some random information.</h2>
<div class="cards-container">
<div class="card">
<div class="card-image"></div>
<p>this is some subtext under an illustration or image</p>
</div>
<!-- Repeat for 4 cards -->
</div>
</div>
CSS Tip: Use display: flex
and flex-wrap: wrap
for responsive cards!
Recommended Workflow âĄ
One Section at a Time
1ī¸âŖ HTML First
Get all content on the page for one section
2ī¸âŖ CSS Second
Style that section before moving on
3ī¸âŖ Test & Adjust
Check in browser, make tweaks
4ī¸âŖ Commit Changes
Git commit after each section works
Remember: You only need ONE CSS file for this entire project!
Design Specifications đ¨
From the Design Images
Color Palette:
Dark Background: #1F2937
Hero Main Text: #F9FAF8
Hero Secondary Text: #E5E7EB
Button Color: #3882F6
Quote Background: #E5E7EB
Font Suggestions:
Use system fonts or Google Fonts like Roboto
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
Common Challenges & Solutions đ§
â Challenge
Images not showing
Check file paths! Use relative paths correctly
â
Solution
Correct path structure:
images/your-image.jpg
â Challenge
Flexbox not working
Parent needs display: flex
â
Solution
Apply to container:
.container { display: flex; }
Git Commit Strategy đ
Commit Early & Often!
Good Commit Messages:
â
"Add hero section HTML structure"
â
"Style navigation bar with flexbox"
â
"Add information cards section"
â
"Fix button hover effects"
git add .
git commit -m "Add hero section with navigation"
git push origin main
Pro Tip: Commit after completing each section for easy rollback if needed!
Deploying to GitHub Pages đ
Making Your Site Live!
Step-by-Step:
Ensure main HTML file is named index.html
Push all changes to GitHub
Go to repo Settings â Pages
Source: Deploy from a branch
Branch: main, folder: / (root)
Click Save
Wait 2-10 minutes
Your URL: https://[username].github.io/landing-page
Helpful Resources đĄ
Quick Google Searches:
đ "CSS rounded corners" â border-radius
đ "CSS center div" â Flexbox solutions
đ "CSS box shadow" â Shadow effects
đ "CSS gradient background" â Color gradients
Free Image Resources:
đˇ Pexels - pexels.com
đˇ Unsplash - unsplash.com
đˇ Pixabay - pixabay.com
Remember to credit creators in your README!
Work Time Checklist â
Track Your Progress!
Setup
â Create repository
â Create index.html
â Create style.css
â Link CSS to HTML
Hero Section
â Navigation bar
â Hero content
â Hero styling
â Button styling
Content Sections
â Information cards
â Quote section
â Call-to-action
â Footer
Final Steps
â Add real images
â Customize content
â Deploy to GitHub Pages
â Test live site
Let's Build! đ
You've Got This!
Remember:
⨠It doesn't need to be pixel-perfect
đ¯ Focus on getting it working first
đ¨ Make it yours with custom content
đŦ Ask questions when stuck!
Start with:
Set up your Git repository
Create your HTML file
Add the hero section HTML
Previous
1 / 17
Next