Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial translation to French of "Add a new section" guide. #265

Merged
merged 31 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
29cb73d
[create-pull-request] automated change
niltied Jan 16, 2024
e2ae3df
Merge remote-tracking branch 'origin/create-pull-request/patch'
niltied Jan 19, 2024
eca0d4f
Translate guides to french
niltied Jan 19, 2024
da20712
Translate guides to french
niltied Jan 19, 2024
ccfabe1
Translate post in french
niltied Jan 19, 2024
7f17c63
Translate guides to french
niltied Jan 19, 2024
c02e4bc
Initial translation to french
niltied Jan 19, 2024
c082b22
Minor fix content
niltied Jan 19, 2024
db1230e
Add Warning block to the content
niltied Jan 19, 2024
6038dd4
Add Warning block to the content
niltied Jan 19, 2024
83e50b0
Initial translation to french
niltied Jan 19, 2024
886a5ea
Fix internal french links
niltied Jan 19, 2024
2c34158
Initial translation to french
niltied Jan 19, 2024
65f519c
Initial translation in french
niltied Jan 19, 2024
25e8ba0
Initial translation to french
niltied Jan 19, 2024
5fa7934
Translate post in french
niltied Jan 19, 2024
230eca8
Replace Markdown Code in "Add Section Information"
niltied Jan 20, 2024
c860758
Update french translation and various fix
niltied Jan 21, 2024
8608d8b
Full alignment french post from last english post
niltied Jan 21, 2024
6d5b4e1
Minor update
niltied Jan 21, 2024
d556d83
Initial translation in french
niltied Jan 21, 2024
bbcfda9
Merge branch 'main' into nico-19012024
niltied Jan 21, 2024
c0f1da0
Merge pull request #8 from niltied/nico-19012024
niltied Jan 21, 2024
38990e5
Update index.fr.md
niltied Jan 26, 2024
da4a7ec
Merge branch 'main' into main
hossainemruz Jan 28, 2024
fd42b0e
Add minor fix
niltied Jan 28, 2024
64bab36
Translate guide to french
niltied Jan 28, 2024
8869b6d
Merge pull request #9 from niltied/nico-19012024
niltied Jan 28, 2024
4f419d1
Merge branch 'hugo-toha:main' into main
niltied Jan 28, 2024
1a60029
Update index.fr.md
niltied Jan 28, 2024
c2a9c95
Merge branch 'main' into main
hossainemruz Feb 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions content/posts/customizing/new-section/index.fr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: "Ajouter une nouvelle section"
date: 2024-01-13T22:30:50+06:00
author:
name: Nicolas DIETLIN
image: images/author/nicolas.jpg
menu:
sidebar:
name: Ajouter une nouvelle section
identifier: customizing-add-new-section
parent: customizing
weight: 415
---

Si les sections par défaut, modèles, et composants ne satisfont pas vos besoins, vous pouvez facilemement ajouter de nouvelles sections, modèles, et composants à votre site. Ce guide montrera comment ajouter une nouvelle section à votre site.

### Etape 1 : Ajouter du fichier de mise en page

Pour ajouter une nouvelle section à votre site, vous devez créer un fichier de mise en page dans le répertoire `layout/partials/sections`. Le fichier doit être nommé d'après le nom de la section. Par exemple, si vous voulez ajouter une section `contact` avec le formulaire de contact, créez un fichier nommé `contact.html`. Utilisez le modèle suivants pour le fichier `contact.html`.

```html
{{ $sectionID := replace (lower .section.name) " " "-" }}
{{ if .section.id }}
{{ $sectionID = .section.id }}
{{ end }}

<div class="container anchor p-lg-5 about-section" id="{{ $sectionID }}">
// Your custom HTML code here
</div>
```
### Etape 2: Ajouter des styles CSS

Si vous voulez ajouter un CSS personnalisé pour votre nouvelle section, vous pouvez le faire en ajouter le code CSS au fichier `assets/styles/overrides.scss` dans votre site. Ce fichier est automatiquement chargé par le thème et appliquera les styles personnalisés. Alternativement, vous pouvez créer un fichier SCSS séparé dans le répertoire `assets/styles` de votre dépôt et l'inclure dans le fichier `assets/styles/overrides.scss` en utilisant la syntaxe suivante:

```scss
@import "your-style-file-name";
```

### Step 3: Ajouter JavaScript

De façon similaire, si votre nouvelle section requiert un JavaScript supplémentaire, la méthode recommandée est d'ajouter le JavaScript dans le fichier de mise en page lui-même avec le tag `<script>`. Si vous voulez ajouter le JavaScript dans un fichier séparé, alors placez le fichier JavaScript dans le répertoire `assets/scripts` de votre dépôt et l'inclure dans le fichier de mise en page comme suit:

```html
{{ $script := resources.Get "scripts/your-script.js" }}
<script src="{{ $script.RelPermalink }}" integrity="{{ $script.Data.Integrity }}"></script>
```
2 changes: 1 addition & 1 deletion content/posts/customizing/new-section/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ To add a new section to your site, you need to create a layout file in the `layo

### Step 2: Add CSS Styles

If you want to add custom CSS for your new section, you can do so by adding the CSS code to the `assets/styles/override.scss` file in your site. This file is automatically loaded by the theme and will apply the custom styles. Alternatively, you can create a separate SCSS file in the `assets/styles directory` of your repository and include it in the `assets/styles/override.scss` file using the following syntax:
If you want to add custom CSS for your new section, you can do so by adding the CSS code to the `assets/styles/override.scss` file in your site. This file is automatically loaded by the theme and will apply the custom styles. Alternatively, you can create a separate SCSS file in the `assets/styles` directory of your repository and include it in the `assets/styles/override.scss` file using the following syntax:

```scss
@import "your-style-file-name";
Expand Down
Loading