Landing page + countdown #11

Merged
mbess merged 11 commits from fb_initial_landing_page into master 2023-07-06 20:36:36 +00:00
2 changed files with 28 additions and 58 deletions
Showing only changes of commit c890ac388e - Show all commits

View file

@ -227,65 +227,31 @@
</div> </div>
</section> </section>
{{ $slides_count := 6 }}
<section class="carousel-container"> <section class="carousel-container">
<div class="carousel" aria-label="Gallery"> <div class="carousel" aria-label="Gallery">
<ol class="carousel__viewport"> <ol class="carousel__viewport">
<li id="carousel__slide1" {{ range $index, $s := seq (sub $slides_count 0) }}
<li id="carousel__slide{{ $index }}"
tabindex="0" tabindex="0"
class="carousel__slide"> class="carousel__slide">
<div class="carousel__snapper"> <div class="carousel__snapper">
<a href="#carousel__slide4" <a href="#carousel__slide{{ partial "fullmod" (slice (sub $index 1) $slides_count) }}"
class="carousel__prev">Diapositive précédente</a> class="carousel__prev">Diapositive précédente</a>
<a href="#carousel__slide2" <a href="#carousel__slide{{ partial "fullmod" (slice (add $index 1) $slides_count) }}"
class="carousel__next">Diapositive suivante</a> class="carousel__next">Diapositive suivante</a>
</div> </div>
</li> </li>
<li id="carousel__slide2" {{ end }}
tabindex="0"
class="carousel__slide">
<div class="carousel__snapper"></div>
<a href="#carousel__slide1"
class="carousel__prev">Diapositive précédente</a>
<a href="#carousel__slide3"
class="carousel__next">Diapositive suivante</a>
</li>
<li id="carousel__slide3"
tabindex="0"
class="carousel__slide">
<div class="carousel__snapper"></div>
<a href="#carousel__slide2"
class="carousel__prev">Diapositive précédente</a>
<a href="#carousel__slide4"
class="carousel__next">Diapositive suivante</a>
</li>
<li id="carousel__slide4"
tabindex="0"
class="carousel__slide">
<div class="carousel__snapper"></div>
<a href="#carousel__slide3"
class="carousel__prev">Diapositive précédente</a>
<a href="#carousel__slide1"
class="carousel__next">Diapositive suivante</a>
</li>
</ol> </ol>
<aside class="carousel__navigation"> <aside class="carousel__navigation">
<ol class="carousel__navigation-list"> <ol class="carousel__navigation-list">
<li class="carousel__navigation-item enabled"> {{ range $index, $s := seq (sub $slides_count 0) }}
<a href="#carousel__slide1" <li class="carousel__navigation-item {{ if eq $index 0 }}enabled{{- end -}}">
class="carousel__navigation-button">1ère diapositive</a> <a href="#carousel__slide{{ $index }}"
</li> class="carousel__navigation-button">{{ $index }}ème diapositive</a>
<li class="carousel__navigation-item">
<a href="#carousel__slide2"
class="carousel__navigation-button">2ème diapositive</a>
</li>
<li class="carousel__navigation-item">
<a href="#carousel__slide3"
class="carousel__navigation-button">3ème diapositive</a>
</li>
<li class="carousel__navigation-item">
<a href="#carousel__slide4"
class="carousel__navigation-button">4ème diapositive</a>
</li> </li>
{{ end }}
</ol> </ol>
</aside> </aside>
</div> </div>

View file

@ -0,0 +1,4 @@
{{- $a := index . 0 -}}
{{- $b := index . 1 -}}
{{- $c := mod $a $b -}}
{{- if lt $c 0 -}}{{- add $c $b -}}{{- else -}}{{- $c -}}{{- end -}}