180 lines
3.2 KiB
Markdown
180 lines
3.2 KiB
Markdown
|
|
# Guide de contribution
|
||
|
|
|
||
|
|
Merci de votre intérêt pour contribuer au site de l'Organisation Ka Internationale !
|
||
|
|
|
||
|
|
## Ajouter du contenu
|
||
|
|
|
||
|
|
### Ajouter un service Fédiverse
|
||
|
|
|
||
|
|
Éditez `src/_data/services.json` :
|
||
|
|
|
||
|
|
```json
|
||
|
|
{
|
||
|
|
"name": "NOM_DU_SERVICE",
|
||
|
|
"icon": "🎯",
|
||
|
|
"platform": "Nom de la plateforme",
|
||
|
|
"description": "Description du service",
|
||
|
|
"url": "https://service.o-k-i.net/",
|
||
|
|
"linkText": "Accéder à SERVICE"
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
### Ajouter un projet web
|
||
|
|
|
||
|
|
Éditez `src/_data/projects.json` :
|
||
|
|
|
||
|
|
```json
|
||
|
|
{
|
||
|
|
"name": "NOM.PROJET",
|
||
|
|
"icon": "📱",
|
||
|
|
"domain": "nom.projet",
|
||
|
|
"description": "Description du projet"
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
### Ajouter une valeur
|
||
|
|
|
||
|
|
Éditez `src/_data/values.json` :
|
||
|
|
|
||
|
|
```json
|
||
|
|
{
|
||
|
|
"icon": "🌟",
|
||
|
|
"title": "Titre",
|
||
|
|
"description": "Description de la valeur"
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
### Modifier la navigation
|
||
|
|
|
||
|
|
Éditez `src/_data/navigation.json` :
|
||
|
|
|
||
|
|
```json
|
||
|
|
{
|
||
|
|
"text": "Texte du lien",
|
||
|
|
"url": "#section",
|
||
|
|
"external": false
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
Pour un lien externe, mettez `"external": true`.
|
||
|
|
|
||
|
|
### Ajouter une section de contact
|
||
|
|
|
||
|
|
Éditez `src/_data/contact.json` :
|
||
|
|
|
||
|
|
```json
|
||
|
|
{
|
||
|
|
"title": "🔗 Titre de la section",
|
||
|
|
"links": [
|
||
|
|
{
|
||
|
|
"text": "Nom du lien",
|
||
|
|
"url": "https://example.com"
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
## Modifier les styles
|
||
|
|
|
||
|
|
Les styles sont dans `src/assets/css/styles.css`.
|
||
|
|
|
||
|
|
### Variables CSS disponibles
|
||
|
|
|
||
|
|
```css
|
||
|
|
--bleu-ocean: #003566;
|
||
|
|
--jaune-soleil: #FFB700;
|
||
|
|
--rouge-resistance: #D62828;
|
||
|
|
--vert-terre: #2A9134;
|
||
|
|
--orange-communaute: #FB8500;
|
||
|
|
--noir-profond: #0A0908;
|
||
|
|
--blanc-lumiere: #F7F7F2;
|
||
|
|
--violet-fedi: #6364FF;
|
||
|
|
```
|
||
|
|
|
||
|
|
## Créer une nouvelle page
|
||
|
|
|
||
|
|
1. Créez un fichier `.njk` dans `src/` :
|
||
|
|
|
||
|
|
```njk
|
||
|
|
---
|
||
|
|
layout: layouts/base.njk
|
||
|
|
title: Titre de la page
|
||
|
|
description: Description pour le SEO
|
||
|
|
---
|
||
|
|
|
||
|
|
<section>
|
||
|
|
<h1>{{ title }}</h1>
|
||
|
|
<p>Contenu de votre page</p>
|
||
|
|
</section>
|
||
|
|
```
|
||
|
|
|
||
|
|
2. Ajoutez le lien dans `src/_data/navigation.json` si nécessaire
|
||
|
|
|
||
|
|
3. Reconstruisez le site : `npm run build`
|
||
|
|
|
||
|
|
## Modifier un partial
|
||
|
|
|
||
|
|
Les partials sont dans `src/_includes/partials/` :
|
||
|
|
|
||
|
|
- `nav.njk` - Navigation
|
||
|
|
- `hero.njk` - Section hero (accueil)
|
||
|
|
- `fediverse.njk` - Services Fédiverse
|
||
|
|
- `projects.njk` - Projets web
|
||
|
|
- `mission.njk` - Mission et valeurs
|
||
|
|
- `hosting.njk` - Services d'hébergement
|
||
|
|
- `support.njk` - Section dons
|
||
|
|
- `contact.njk` - Informations de contact
|
||
|
|
- `footer.njk` - Pied de page
|
||
|
|
|
||
|
|
## Workflow de développement
|
||
|
|
|
||
|
|
1. Créez une branche pour votre fonctionnalité :
|
||
|
|
```bash
|
||
|
|
git checkout -b feature/ma-fonctionnalite
|
||
|
|
```
|
||
|
|
|
||
|
|
2. Faites vos modifications
|
||
|
|
|
||
|
|
3. Testez localement :
|
||
|
|
```bash
|
||
|
|
npm start
|
||
|
|
```
|
||
|
|
|
||
|
|
4. Buildez pour vérifier :
|
||
|
|
```bash
|
||
|
|
npm run build
|
||
|
|
```
|
||
|
|
|
||
|
|
5. Commitez vos changements :
|
||
|
|
```bash
|
||
|
|
git add .
|
||
|
|
git commit -m "Description de vos changements"
|
||
|
|
```
|
||
|
|
|
||
|
|
6. Poussez et créez une pull request :
|
||
|
|
```bash
|
||
|
|
git push origin feature/ma-fonctionnalite
|
||
|
|
```
|
||
|
|
|
||
|
|
## Standards de code
|
||
|
|
|
||
|
|
### HTML/Nunjucks
|
||
|
|
- Indentation : 4 espaces
|
||
|
|
- Toujours fermer les balises
|
||
|
|
- Attributs entre guillemets doubles
|
||
|
|
|
||
|
|
### CSS
|
||
|
|
- Indentation : 4 espaces
|
||
|
|
- Utiliser les variables CSS quand possible
|
||
|
|
- Mobile-first pour le responsive
|
||
|
|
|
||
|
|
### JavaScript
|
||
|
|
- Indentation : 4 espaces
|
||
|
|
- Vanilla JS (pas de framework)
|
||
|
|
- Commentaires en français
|
||
|
|
- Gestion des erreurs
|
||
|
|
|
||
|
|
## Questions ?
|
||
|
|
|
||
|
|
Contactez-nous à kontak@o-k-i.net ou ouvrez une issue sur Codeberg.
|