Skip to content

Commit 0d0ffc1

Browse files
committed
website: port osrd-carousel to Bootstrap 5 and remove Bootstrap 4 dependency
Signed-off-by: Duc Nguyen <nguyen@emersion.fr>
1 parent dd94369 commit 0d0ffc1

2 files changed

Lines changed: 19 additions & 19 deletions

File tree

layouts/partials/hooks/body-end.html

Lines changed: 0 additions & 2 deletions
This file was deleted.

layouts/shortcodes/carousel.html

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
11
{{ $data := index site.Data.carousel site.Language.Lang }}
22

3-
<div id="osrd-carousel" class="carousel slide mx-auto" data-ride="carousel" data-interval="false">
4-
3+
<div id="osrd-carousel" class="carousel slide mx-auto">
4+
55
<div class="carousel-inner text-center">
6-
6+
77
{{ range $index, $item := $data }}
8-
8+
99
<div class="carousel-item {{ if eq $index 0 }}active{{ end }}">
10-
<img
11-
src="{{ $item.img }}"
12-
alt="{{ $item.legend }}"
10+
<img
11+
src="{{ $item.img }}"
12+
alt="{{ $item.legend }}"
1313
>
1414
<legend>{{ $item.legend }}</legend>
15-
</div>
15+
</div>
1616
{{ end }}
17-
17+
1818
</div>
1919

20-
<a class="carousel-control-prev" href="#osrd-carousel" role="button" data-slide="prev">
21-
<span class="carousel-control-prev-icon"></span>
22-
</a>
23-
24-
<a class="carousel-control-next" href="#osrd-carousel" role="button" data-slide="next">
25-
<span class="carousel-control-next-icon"></span>
26-
</a>
27-
20+
<button class="carousel-control-prev" type="button" data-bs-target="#osrd-carousel" data-bs-slide="prev">
21+
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
22+
<span class="visually-hidden">Previous</span>
23+
</button>
24+
25+
<button class="carousel-control-next" type="button" data-bs-target="#osrd-carousel" data-bs-slide="next">
26+
<span class="carousel-control-next-icon" aria-hidden="true"></span>
27+
<span class="visually-hidden">Next</span>
28+
</button>
29+
2830
</div>
2931

0 commit comments

Comments
 (0)