Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WAFAA Website Rebuild

Rebuilding the WAFAA nonprofit organization website as a clean, maintainable, and fully responsive web application with a clear design vision and comprehensive documentation for future developers.

Documentation written with assistance from AI.

Overview

WAFAA is a nonprofit organization serving families and communities. This project provides a complete, production-ready website built with modern web standards—vanilla HTML5, CSS3, and JavaScript without external frameworks or dependencies. The rebuild prioritizes code organization, design clarity, and developer education through comprehensive technical documentation.

Primary Goal

Recreate the WAFAA website in line with modern web standards while maintaining:

  • Professional nonprofit appearance
  • Accessibility and inclusivity
  • Fast loading and responsive design
  • Simple, maintainable code architecture
  • Clear documentation for future development

Table of Contents


Architecture

Key Design Decisions

This project uses a single-file approach for each aspect (HTML, CSS, JavaScript) rather than splitting across multiple modules or build tools:

Why This Approach?

  • Eliminates build complexity
  • Clear file-to-feature mapping
  • Instant deployment without transpilation
  • Easier for new developers to understand
  • Sufficient for nonprofit site needs

Technology Stack

┌─────────────────────────────────┐
│      HTML5 (Semantic)           │
│    CSS3 (Grid & Flexbox)        │
│   JavaScript ES6+ (Vanilla)     │
│   Zero External Dependencies    │
└─────────────────────────────────┘
         ↓
    No Build Tools
   No Frameworks
   No npm Packages
         ↓
    Pure Web Standards

Code Organization

Major Highlight: Single-File Architecture

This project demonstrates how thoughtful file organization eliminates complexity while maintaining clarity:

CSS Organization (style.css - 15 KB)

/* Organized by logical sections, not by component */

:root { /* All colors - single source of truth */ }
body { /* Base styles */ }
nav { /* Navigation - uses Flexbox */ }
.grid-2, .grid-3, .grid-4 { /* Layouts - use Grid */ }
.card { /* Reusable component */ }
.btn { /* Button styles */ }
.form-group { /* Form elements */ }
@media (max-width: 768px) { /* Responsive adjustments */ }

Benefits:

  • Single file for all styling (no CSS splits)
  • Clear mental model—find any style quickly
  • CSS variables cascade automatically
  • Change colors in one place
  • No build process needed
  • 15 KB total

HTML Organization

Every page follows consistent structure:

<div class="page-wrapper">
    ├── <header> (consistent across all pages)
    ├── <nav> (consistent navigation)
    ├── <main> (page-specific content)
    └── <footer> (consistent footer)
</div>

Benefits:

  • Easy to add new pages (copy template)
  • Consistent user experience
  • SEO-friendly semantic markup
  • Predictable structure

JavaScript Organization (script.js - 3 KB)

/* Single file, organized by function */

DOMContentLoaded {
    /* Attach all event listeners */
    /* Initialize page state */
}

function handleFormSubmit() { }
function scrollToSection() { }
function setActiveNavLink() { }

Benefits:

  • No module complexity
  • All interactivity in one place
  • Direct DOM manipulation
  • 3 KB total

Directory Structure

wafaa_copy/
├── index.html              # Homepage (10 KB)
├── pages/                  # All subpages
│   ├── services.html      # Service offerings (9 KB)
│   ├── about.html         # Organization info (10 KB)
│   ├── contact.html       # Forms & resources (8 KB)
│   └── contribute.html    # Donations & volunteering (8 KB)
├── css/
│   └── style.css          # Complete design system (15 KB)
└── js/
    └── script.js          # All interactivity (3 KB)

The 4 Lessons

Each lesson answers critical design questions and provides deep technical knowledge.

LESSON 01: Design System (11 KB)

Key Questions Answered:

  • Why these specific colors? Purple conveys trust and professionalism; red signals urgency for crisis support. Chosen intentionally for nonprofit mission.
  • How do CSS variables ensure consistency? Define colors once in :root, change everywhere automatically. Single source of truth.

Topics: Color palette • Typography system • Spacing rhythm • Accessibility standards • CSS variables

Time: 25-30 minutes


LESSON 02: Layout Architecture (14 KB)

Key Questions Answered:

  • Why use Flexbox for the page wrapper instead of Grid? One-dimensional vertical layout (header → nav → main → footer). Flexbox is simpler and more semantic for stacking elements.
  • When should I use Grid vs Flexbox? Use Grid for 2D card layouts and complex multi-row designs; use Flexbox for 1D navigation bars and button groups.

Topics: CSS Grid vs Flexbox • Responsive breakpoints • Mobile-first approach • Grid patterns • Container sizing

Time: 30-40 minutes


LESSON 03: Component Patterns (15 KB)

Key Questions Answered:

  • How do card hover effects improve UX? Three subtle changes (border color, shadow, transform) work together—border draws attention, shadow adds depth, transform shows interaction.
  • Why separate button types? Clear visual hierarchy. Users instantly recognize action importance (primary vs secondary vs optional).

Topics: Card component • Button variations • Form styling • Highlight boxes • CTA sections • Reusable patterns

Time: 25-35 minutes


LESSON 04: JavaScript Interactions (18 KB)

Key Questions Answered:

  • How does preventing default improve forms? Stop page reload, show immediate feedback. Keeps user in flow without context loss.
  • Why use classList instead of direct style manipulation? Separates presentation (CSS) from behavior (JavaScript). Easier to maintain and debug.

Topics: Form handling • Success messages • Smooth scrolling • Event listeners • DOM manipulation • Validation patterns

Time: 30-40 minutes


Getting Started

Prerequisites

None! This project requires no installation or build tools.

  • A text editor (VS Code, Sublime, etc.)
  • A web browser (Chrome, Firefox, Safari, Edge)
  • Python 3.x (for local development server)

Running Locally

# Navigate to the project
cd c:\Users\warde\OneDrive\Desktop\WAFAA\wafaa_copy

# Start development server
python -m http.server 8000

# Open in browser
http://localhost:8000

Project Files

File Size Purpose
index.html 10 KB Homepage with mission and services preview
pages/services.html 9 KB 9 detailed service descriptions
pages/about.html 10 KB Organization info and founder biography
pages/contact.html 8 KB Contact form and emergency resources
pages/contribute.html 8 KB Donation and volunteer forms
css/style.css 15 KB Responsive design system
js/script.js 3 KB Form handling and interactions
Total 63 KB Gzips to ~10 KB

Development Workflow

Adding a New Page

# 1. Copy existing page as template
cp pages/services.html pages/new-page.html

# 2. Update HTML structure
# - Change title tag
# - Update page content
# - Modify page-specific styles (inline or in CSS)

# 3. Add navigation link
# Edit all <nav> elements to include new link

# 4. Test responsive design
# View at 480px, 768px, 1200px

Changing Colors

All colors defined in CSS variables:

/* In css/style.css, top of file */
:root {
    --primary-purple: #9333ea;    /* Change here */
    --text-red: #dc2626;          /* And here */
    --text-dark: #1f2937;         /* Cascades everywhere */
}

Adding Forms

Standard pattern used throughout:

<form id="myForm">
    <div class="form-group">
        <label for="name">Name</label>
        <input type="text" id="name" name="name" required>
    </div>
    <button type="submit" class="btn btn-primary">Submit</button>
    <div class="success-message" id="successMessage">
        ✓ Success!
    </div>
</form>

<script>
document.getElementById('myForm').addEventListener('submit', function(e) {
    e.preventDefault();
    document.getElementById('successMessage').classList.add('show');
    this.reset();
});
</script>

Performance

Bundle Size

HTML (5 pages):       45 KB
CSS (1 file):         15 KB
JavaScript (1 file):   3 KB
─────────────────────────
Total:                63 KB  (Gzipped: ~10 KB)

No images:             0 KB  (emoji are native)
No external fonts:     0 KB  (system fonts)
No CDN dependencies:   0 KB  (self-contained)

Why It's Fast

✅ Single CSS file (no stylesheet HTTP requests) ✅ Single JS file (no script HTTP requests) ✅ Native emoji (no image files) ✅ System fonts (no font downloads) ✅ Semantic HTML (minimal markup) ✅ CSS Grid/Flexbox (modern layout)


Browser Support

Browser Version Status
Chrome Latest ✅ Full support
Firefox Latest ✅ Full support
Safari Latest ✅ Full support
Edge Latest ✅ Full support
iOS Safari Latest ✅ Full support
Chrome Mobile Latest ✅ Full support
Internet Explorer 11 ⚠️ Limited (Grid not supported)

Responsive Breakpoints

/* Mobile first - base styles for mobile */
/* Then enhance at breakpoints */

@media (min-width: 768px)  { /* Tablet and up */ }
@media (min-width: 1200px) { /* Desktop and up */ }

Documentation Structure

Document Size Purpose Time
START_HERE.txt 13 KB Visual guide & quick reference 5 min
README.md This file Project overview 10 min
DOCUMENTATION.md 8 KB Architecture decisions 15 min
Total 31 KB Complete reference 30 min

Reference Materials

The ref/ folder contains supplementary materials for internal use and is excluded from version control (see .gitignore). Materials here support the main documentation.

Recommended Reading Order

  1. START_HERE.txt — Quick orientation (5 min)
  2. This README — Understanding project structure (10 min)
  3. DOCUMENTATION.md — Architecture overview (15 min)

After reading, you'll understand the entire codebase.


Contributing

Code Style Guidelines

HTML:

  • Use semantic elements (<header>, <nav>, <main>, <footer>)
  • Meaningful id and class names
  • Consistent indentation (2 spaces)

CSS:

  • Organize by section with comments
  • Use CSS variables for all colors
  • Mobile-first media queries
  • Comment complex selectors

JavaScript:

  • Use const/let (not var)
  • Named functions for clarity
  • Wrap in DOMContentLoaded
  • Comments for complex logic

Testing

  • Test at multiple screen sizes (480px, 768px, 1200px)
  • Verify forms submit and show success messages
  • Check in multiple browsers (Chrome, Firefox, Safari)
  • Test on mobile devices if possible

FAQ

Q: Why not use React/Vue/Svelte? A: Frameworks add complexity without benefit for this nonprofit site. This project prioritizes clarity and maintainability for future developers unfamiliar with frameworks.

Q: How do I deploy? A: Copy the wafaa_copy folder to any static host (GitHub Pages, Netlify, AWS S3). No build process needed.

Q: Can I change the purple to blue? A: Yes. Edit :root { --primary-purple: #3b82f6; } in css/style.css. Everything updates automatically.

Q: Is this accessible? A: Yes. All text meets WCAG AA contrast ratios, semantic HTML is used, focus states are visible, and form labels are properly associated.

Q: What's the total file size? A: 63 KB uncompressed (gzips to ~10 KB). Faster loading than most image files.


Related Resources


Acknowledgments

Documentation was written with assistance from AI to ensure comprehensive, developer-friendly technical documentation.

Design based on the original WAFAA website, recreated with modern web standards and best practices.

Mission to strengthen families and communities—every design decision supports this core purpose.


License

Created for WAFAA nonprofit organization.


Version

v1.0 (September 2026)

  • Initial release
  • 5 complete pages with full functionality
  • Responsive design (mobile to desktop)
  • Production-ready code
  • 75 KB comprehensive documentation

Contact

WAFAA Organization

  • 📞 Hotline: (310) 950-0098
  • ✉️ Email: info@wafaa.org
  • 🕐 Available: 24/7

Status: Production Ready | Maintenance: Active

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages