lb-dk-2023/layouts/partials/testimonialSection.html

47 lines
1.8 KiB
HTML
Raw Permalink Normal View History

2023-08-15 17:02:21 +02:00
{{ with .Site.Data.testimonialSection }}
{{ if .enable }}
<section class="section testimonial">
<div class="testimonial__background_shape">
<svg viewBox="0 0 1920 79">
<path d="M0 0h1920v79L0 0z" data-name="Path 1450" />
</svg>
</div>
<div class="container">
<div class="row text-center">
<div class="col-lg-6 offset-lg-3">
<div class="testimonial__header">
<span class="top-title">{{ .topTitle }}</span>
{{ .title | markdownify }}
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="testimonial__slider">
{{ $section := .testimonial }}
{{ range $section }}
<div class="testimonial__slider_item">
{{ if .star }}
<ul class="testimonial__slider_item-rating">
{{ $rating := .star | int }}
{{ $rating := sub $rating 1 }}
{{ range $i, $sequence := (seq 5) }}
{{ if le $i $rating }}
<li><i class="fa fa-star"></i></li>
{{ else }}
<li><i class="fa fa-star inactive"></i></li>
{{ end }}
{{ end }}
</ul>
{{ end }}
<p class="testimonial__slider_item-content"> {{ .comment | markdownify }} </p>
<p class="testimonial__slider_item-author"><span>{{ .name }}</span> | {{ .time }}</p>
</div>
{{ end }}
</div>
</div>
</div>
</div>
</section>
{{ end }}
{{ end }}