Afficher message si documentation n'est pas disponible

This commit is contained in:
Victor Lacasse-Beaudoin 2023-10-05 14:23:06 -04:00
parent 76762026f3
commit 84dc500a77

View file

@ -12,17 +12,21 @@
<div class="wrapper documentationWrapper">
<h1 class="heading1">Documentation</h1>
<p>
{{ range .Data.Buckets }}
{{ $bucket_name := .Name }}
{{ $bucket_display_name := .DisplayName }}
<details class="documentationCategorie">
<summary class="documentationDescription">{{ $bucket_display_name }}</summary>
<ul class="documentationListe">
{{ range .Documents }}
<a class ="documentationLien" href="/public/documentation/{{ $bucket_name }}/{{ . }}"><li class="documentationDocument">{{ . }}</li></a>
{{ end}}
</ul>
</details>
{{ if not .Data.Buckets }}
Documentation non-accessible pour l'instant, merci de votre patience
{{ else }}
{{ range .Data.Buckets }}
{{ $bucket_name := .Name }}
{{ $bucket_display_name := .DisplayName }}
<details class="documentationCategorie">
<summary class="documentationDescription">{{ $bucket_display_name }}</summary>
<ul class="documentationListe">
{{ range .Documents }}
<a class ="documentationLien" href="/public/documentation/{{ $bucket_name }}/{{ . }}"><li class="documentationDocument">{{ . }}</li></a>
{{ end}}
</ul>
</details>
{{ end }}
{{ end }}
</p>
<p>