Skip to content

Latest commit

Β 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌟 Welcome to Our Amazing Project! 🌟

🎯 Contributor Guidelines and Project Structure

Hello, awesome contributor! πŸŽ‰ We're super excited to have you join our community of creators. This guide will help you understand our project structure and contribution process. Let's make something incredible together! πŸ’«

πŸš€ Quick Start Guide

1. Setting Up Your Development Environment πŸ› οΈ

# Clone the repository
git clone https://github.com/<your-username>/<repo-name>.git

# Navigate to project directory
cd <repo-name>

# Set up upstream remote
git remote add upstream https://github.com/<original-owner>/<repo-name>.git

# Create and switch to your feature branch
git checkout -b feature/your-amazing-feature

2. Before You Start Coding πŸ“

  • βœ… Pull latest changes from upstream
  • βœ… Create a new branch for your feature
  • βœ… Read through our coding standards below
  • βœ… Plan your changes before you start

πŸ“‚ Project Structure

YourProject/
β”œβ”€β”€ πŸ“„ index.html                 # Main entry point
β”œβ”€β”€ πŸ“‚ css/                       # All CSS files
β”‚   β”œβ”€β”€ styles.css               # Homepage styles
β”‚   β”œβ”€β”€ header.css              # Global header styles
β”‚   β”œβ”€β”€ footer.css              # Global footer styles
β”‚   β”œβ”€β”€ about.css               # About page styles
β”‚   └── contact.css             # Contact page styles
β”œβ”€β”€ πŸ“‚ js/                        # JavaScript files
β”‚   β”œβ”€β”€ main.js                 # Main JavaScript file
β”‚   β”œβ”€β”€ about.js                # About page scripts
β”‚   └── contact.js              # Contact page scripts
β”œβ”€β”€ πŸ“‚ assets/                    # Media files
β”‚   β”œβ”€β”€ πŸ“‚ images/               # Image files (.jpg or .png only and recommended-file-size: 500KB maximum!)
β”‚   β”‚   β”œβ”€β”€ hero_banner.png
β”‚   β”‚   └── about_team.jpg
β”‚   └── πŸ“‚ videos/               # Video files (.mp4 and max-file-size: 102400 KB ie. 100MB)
β”‚       └── intro_video.mp4
└── πŸ“‚ pages/                     # HTML pages
    β”œβ”€β”€ about.html
    └── contact.html

πŸ“ Naming Conventions and Standards

πŸ–ΌοΈ Images

  • ✨ Format: .jpg and .png ONLY
  • πŸ“¦ Size: Optimize all images (max 500KB recommended)
  • 🏷️ Naming Pattern: <section>_<description>.jpg
    • βœ… Good: hero_banner.jpg, team_photo.jpg
    • ❌ Bad: IMG001.jpg, hero banner.jpg

πŸ“ Folders

  • πŸ”€ Use only lowercase letters
  • 🚫 No numbers or special characters
  • ✨ Must be descriptive
    • βœ… Good: images, styles, scripts
    • ❌ Bad: img1, style2, misc_files

πŸ“„ Files

  • πŸ”€ Use lowercase with underscores
  • πŸ“ Be descriptive but concise
    • βœ… Good: about_page.css, contact_form.js
    • ❌ Bad: page1.css, script.js

πŸ”— Path Linking Guidelines

πŸ“ Using Relative Paths

Always use relative paths to link images, pages, and other resources. This ensures our project remains portable and works across different environments.

βœ… Correct Way (Using Relative Paths)

From index.html to different resources:

<!-- Linking images -->
<img src="./assets/images/logo.jpg" alt="Logo">
<img src="./assets/images/hero/banner.jpg" alt="Banner">

<!-- Linking CSS -->
<link rel="stylesheet" href="./css/styles.css">
<link rel="stylesheet" href="./css/about.css">

<!-- Linking JavaScript -->
<script src="./js/main.js"></script>

<!-- Linking pages -->
<a href="./pages/about.html">About Us</a>

From pages/about.html to different resources:

<!-- Linking images -->
<img src="../assets/images/logo.jpg" alt="Logo">
<img src="../assets/images/about/team.jpg" alt="Team">

<!-- Linking CSS -->
<link rel="stylesheet" href="../css/styles.css">
<link rel="stylesheet" href="../css/about.css">

<!-- Linking JavaScript -->
<script src="../js/about.js"></script>

<!-- Linking back to home -->
<a href="../index.html">Home</a>

❌ Incorrect Way (Using Absolute Paths)

Don't use these types of paths:

<!-- ❌ Absolute system paths -->
<img src="/Users/username/Desktop/project/images/logo.jpg">
<img src="C:/Projects/website/images/logo.jpg">

<!-- ❌ Absolute root paths -->
<img src="/images/logo.jpg">
<link href="/css/styles.css">

<!-- ❌ Full URLs to local files -->
<img src="https://github.com/username/repo/images/logo.jpg">

πŸ—ΊοΈ Path Navigation Guide

  • ./ means current directory
  • ../ means up one directory
  • ../../ means up two directories

πŸ“ Examples Based on File Location

Let's say you're linking resources from different files:

YourProject/
β”œβ”€β”€ index.html
β”œβ”€β”€ css/
β”‚   └── styles.css
β”œβ”€β”€ assets/
β”‚   └── images/
β”‚       └── logo.jpg
└── pages/
    └── about/
        └── team.html

From index.html to logo.jpg:

βœ… <img src="./assets/images/logo.jpg">
❌ <img src="/Users/me/project/assets/images/logo.jpg">

From pages/about/team.html to logo.jpg:

βœ… <img src="../../assets/images/logo.jpg">
❌ <img src="/assets/images/logo.jpg">

πŸ’‘ Tips for Path Linking

  1. Use CLI to Verify Paths

    # From project root, verify file exists
    ls ./assets/images/logo.jpg
    
    # Check relative path from a specific directory
    cd pages/about && ls ../../assets/images/logo.jpg
  2. Test Local Navigation

    • Always test your links locally before committing
    • Use Live Server in VS Code to catch path issues
    • Verify paths work when project is moved to different locations
  3. Path Troubleshooting

    • If image doesn't load, right-click and "Open image in new tab" to debug path
    • Check browser console for 404 errors
    • Verify file extensions match exactly (case-sensitive)

🎨 CSS Guidelines

Structure

/* Example of CSS organization */
/* 1. Global Styles */
/* 2. Layout & Grid */
/* 3. Components */
/* 4. Page-specific styles */
/* 5. Keyframes */
/* 6. media queries */

πŸ’» JavaScript Guidelines

  • 🎯 Use meaningful variable names
  • πŸ“ Comment your code
  • ✨ Follow DRY (Don't Repeat Yourself) principles

πŸ”„ Contribution Workflow

  1. 🌿 Create a new branch:
git checkout -b feature/your-feature-name
  1. πŸ’Ύ Make your changes and commit:
git add .
git commit -m "✨ Add: Brief description of your changes"
  1. πŸ”„ Keep your branch updated:
git fetch upstream
git rebase upstream/main
  1. πŸš€ Push your changes:
git push origin feature/your-feature-name

βœ… Pull Request Checklist

Before submitting your PR, ensure:

  • Code follows our naming conventions
  • Images are optimized and properly named
  • No unnecessary files are included
  • Code is properly commented
  • All links are working
  • No console errors

🀝 Code Review Process

  1. πŸ‘€ Submit your PR
  2. πŸ” Wait for code review
  3. πŸ“ Address any feedback
  4. ✨ Get approved and merged!

Remember: Every contribution matters! 🌟 Whether it's fixing a typo or adding a feature, you're helping make this project better!

Happy Coding! πŸš€

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages