Commit ca330692 authored by R茅gis Witz's avatar R茅gis Witz
Browse files

馃寪 traduction/adaptation de l'article sur les banni猫res

parent 42cd6251
......@@ -74,8 +74,8 @@ pygmentCodeFences = true
[[menu.main]]
parent = "samples"
name = "Big Image"
url = "post/2017-03-07-bigimg-sample"
name = "Banni猫res"
url = "post/bannieres"
weight = 1
[[menu.main]]
......
---
title: Big Image Sample
subtitle: Using Multiple Images
date: 2017-03-07
tags: ["example", "bigimg"]
bigimg: [{src: "img/triangle.jpg"}, {src: "img/sphere.jpg"}, {src: "img/hexagon.jpg"}]
---
The image banners at the top of the page are refered to as "bigimg" in this theme. They are optional, and one more more can be specified. If more than one is specified, the images rotate every 10 seconds. In the front matter, bigimgs are specified using an array of hashes.
<!--more-->
A single bigimg can be specified in the front matter by the following YAML:
```
bigimg: [{src: "/img/triangle.jpg", desc: "Triangle"}]
```
Multiple bigimgs can be specified in the front matter by the following YAML:
```
bigimg: [{src: "/img/triangle.jpg", desc: "Triangle"},
{src: "/img/sphere.jpg", desc: "Sphere"},
{src: "/img/hexagon.jpg", desc: "Hexagon"}]
```
Also note that the description field is optional, and images could instead be specified by:
```
bigimg: [{src: "/img/triangle.jpg"},
{src: "/img/sphere.jpg"},
{src: "/img/hexagon.jpg"}]
```
The above YAML array of hashes were written in "flow" style. However when generating a new page or post with `hugo new post/mypost.md`, hugo may interpret the archetype for bigimg in the default YAML style. Defining multiple bigimg's complete with descriptions in this style would be specified by:
```
bigimg:
- {src: "/img/triangle.jpg", desc: "Triangle"}
- {src: "/img/sphere.jpg", desc: "Sphere"}
- {src: "/img/hexagon.jpg", desc: "Hexagon"}
```
Additional information can be found [in this YAML tutorial](https://rhnh.net/2011/01/31/yaml-tutorial/).
---
title: Banni猫res
subtitle: En utilisant une ou plusieurs images
date: 2021-03-09
tags: ["example", "bigimg"]
bigimg: [{src: "img/triangle.jpg"}, {src: "img/sphere.jpg"}, {src: "img/hexagon.jpg"}]
---
La banni猫re en haut de cette page est d茅nomm茅e 芦 _bigimg_ 禄.
Elle est d茅clar茅e dans l'en-t锚te.
Elle est optionnelle, et peut comporter une image ou davantage.
Si plusieurs images sont d茅clar茅es dans une banni猫re, elles d茅filent toutes les 10 secondes.
<!--more-->
Une seule image est d茅clar茅e en tant que banni猫re de la mani猫re suivante :
```
bigimg: [{src: "img/triangle.jpg"}]
```
Il est possible d'assortir une description 脿 chaque image :
```
bigimg: [{src: "img/triangle.jpg", desc: "Triangle"}]
```
Plusieurs images peuvent 锚tre d茅clar茅es dans l'en t锚te.
Cela se fait de la mani猫re suivante :
```
bigimg: [{src: "img/triangle.jpg", desc: "Triangle"},
{src: "img/sphere.jpg", desc: "Sphere"},
{src: "img/hexagon.jpg", desc: "Hexagon"}]
```
Les descriptions 茅tant optionnelles, on peut aussi d茅clarer les images de cette mani猫re :
```
bigimg: [{src: "img/triangle.jpg"},
{src: "img/sphere.jpg"},
{src: "img/hexagon.jpg"}]
```
Alternativement, la syntaxe suivante est aussi admise :
```
bigimg:
- {src: "img/triangle.jpg", desc: "Triangle"}
- {src: "img/sphere.jpg", desc: "Sphere"}
- {src: "img/hexagon.jpg", desc: "Hexagon"}
```
脌 titre d'information, la syntaxe sp茅cifique utilis茅 dans l'en-t锚te de chaque fichier se nomme [YAML](https://fr.wikipedia.org/wiki/YAML).
Elle est sp茅cifique aux fichiers d'en-t锚te et de configuration.
Elle est 脿 distinguer de la syntaxe markdown [abord茅e pr茅c茅demment]({{< ref "syntaxe-markdown.md" >}}).
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment