# Contributing Guide

Thank you for your interest in contributing to the FIDH **Made in France** campaign archive! This is a static archive website, and contributions are welcome to maintain and improve the site.

## Code of Conduct

By contributing to this project, you agree to follow our [Code of Conduct](CODE_OF_CONDUCT.md).

## Types of Contributions

### Accepted Contributions

1. **Bug Fixes** - Fixing broken links, HTML/CSS/JS issues, accessibility improvements
2. **Security Fixes** - Responsible disclosure via [SECURITY.md](SECURITY.md)
3. **Documentation Improvements** - Updating README, adding missing information
4. **Translations** - Adding or correcting translations
5. **Design Improvements** - UI/UX enhancements (discuss first)
6. **Dependency Updates** - Updating packages (if applicable)

### Contributions NOT Accepted

- Content modifications without approval (this is an official FIDH campaign archive)
- Changes to the campaign messaging or political positions
- Major architectural changes without discussion
- Adding tracking codes or analytics without approval

## How to Contribute

### Reporting Bugs

Before reporting a bug, please verify:
1. The bug has not already been reported (check existing issues)
2. You are using the latest version of the code
3. The bug is reproducible

**A good bug report includes:**
- Clear and descriptive title
- Detailed steps to reproduce the problem
- Expected vs. actual behavior
- Environment (browser, OS)
- Screenshots or videos if relevant

### Suggesting Enhancements

Enhancement suggestions are welcome!
- Clear description of the enhancement
- The benefit for the project
- Examples or mockups if available

### Contributing Code

1. **Fork the Repository**
   Create your own fork of this repository.

2. **Create a Feature Branch**
   ```bash
   git checkout -b fix/description-of-fix
   git checkout -b feat/description-of-feature
   git checkout -b docs/description-of-docs
   ```

3. **Set Up Your Environment**
   No build step required. Simply serve the repository root directory.

   For local testing:
   ```bash
   python3 -m http.server 8000
   # or
   npx http-server -p 8000
   ```

4. **Make Your Changes**
   - Follow existing code style and conventions
   - Keep changes minimal and focused
   - Test locally before committing

5. **Commit Your Changes**
   Use clear, descriptive commit messages following the [Conventional Commits](https://www.conventionalcommits.org/) standard:
   - `feat:` - New feature
   - `fix:` - Bug fix
   - `docs:` - Documentation changes
   - `refactor:` - Code refactoring
   - `chore:` - Maintenance tasks
   - `style:` - Formatting changes
   - `test:` - Adding tests

   Example:
   ```bash
   git commit -m "fix: description of the bug fix"
   git commit -m "feat: description of the new feature"
   ```

6. **Push to Your Fork**
   ```bash
   git push origin fix/description-of-fix
   ```

7. **Open a Pull Request**
   - Describe what you changed and why
   - Reference any related issues
   - Be clear about the problem being solved
   - Include screenshots if UI changes are made

## Testing

Before submitting your contributions:
1. Test your code in different browsers (Chrome, Firefox, Safari, Edge)
2. Test on mobile and desktop
3. Test all links and download functionality
4. Ensure no automated tests are broken (if applicable)

## Pull Request Guidelines

- **One feature per PR**: Keep PRs focused on a single issue
- **Clean history**: Rebase or squash commits to maintain clean history
- **Descriptive title**: Clearly state what the PR does (use prefix: fix/, feat/, docs/, refactor/, chore/)
- **Detailed description**: Explain the "what" and "why"
- **Review**: All PRs require review before merging

## Development Standards



### JavaScript
- Use modern ES6+ syntax
- jQuery 3.7.1 is used for legacy browser compatibility and DOM manipulation (loaded locally from `scripts/jquery-3.7.1.js`)
- GSAP 2.0.1 for animations
- Masonry Layout for grid layouts
- ImagesLoaded for image loading detection
- Minimize DOM manipulations
- Use event delegation for dynamic elements

### CSS/SASS
- Use BEM methodology
- Mobile-first approach
- Avoid !important
- Use CSS variables for colors
- Keep specificity low

### HTML
- Valid HTML5
- Semantic markup
- Accessible (ARIA labels, alt text, etc.)
- Responsive design

## Review Process

1. Any Pull Request will be reviewed by at least one maintainer
2. We may request modifications before approval
3. Once approved, the PR will be merged into the main branch
4. Significant contributions will be acknowledged

## Community

For questions or discussions, contact: it@fidh.org

## Recognition

All significant contributors will be acknowledged in the project's contribution history.

## License

By contributing, you agree that your contributions will be licensed under the same terms as the project itself.
