Skip to content

Commit

Permalink
replaced senja with own testimonial rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpapst committed Jul 22, 2024
1 parent b06d810 commit b915d01
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 10 deletions.
23 changes: 15 additions & 8 deletions _includes/card-nonprofit.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,26 @@
{% include pricing-card.html id="nonprofit" %}
</div>
<div class="col-xs-12 col-md-6">
{% if page.lang == 'de' %}
<div class="card h-100 border-0 shadow-sm p-xxl-3" style="min-width: 18rem;">
<div class="card-body">
<div class="d-flex align-items-center pb-2 pb-md-3">
<h4 class="h3 lh-1 mb-4">Dutzende NPOs vertrauen Kimai"</h4>
<h4 class="h3 lh-1 mb-4">{{ site.data[page.lang].translation.non-profit.testimonial-title }}</h4>
</div>
<p class="mb-4">
Und wir freuen uns über jede weitere Organisation, die wir unterstützen dürfen.
</p>
<div class="senja-embed" data-id="95a4466a-5f89-4292-95bf-00a7c2302e2c" data-mode="shadow" data-lazyload="false"></div>
<script async type="text/javascript" src="https://widget.senja.io/widget/95a4466a-5f89-4292-95bf-00a7c2302e2c/platform.js"></script>
<p class="mb-4">{{ site.data[page.lang].translation.non-profit.testimonial-intro }}</p>
<span class="btn btn-icon btn-primary btn-lg shadow-primary pe-none">
<i class="bx bxs-quote-left"></i>
</span>

<div class="swiper mx-n2" data-swiper-options='{"slidesPerView": 1, "loop": true, "autoplay": {"delay": 3500, "disableOnInteraction": false}}'>
<div class="swiper-wrapper">

{% assign testimonials = site.data.testimonials | where_exp: "item", "item.tags contains 'NonProfit'" | sort: 'date' | reverse %}
{% include testimonials-slider-plain.html testimonials=testimonials %}

</div>
</div>

</div>
</div>
{% endif %}
</div>
</div>
4 changes: 2 additions & 2 deletions _includes/pages/reviews.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

<section class="container mb-5 pt-md-1 pt-lg-4 pt-xl-5">
<div class="row gx-5">
{% assign walloflove = site.data.testimonials | where_exp: "item", "item.tags contains 'WallOfLove'" | sort: 'date' | reverse %}
{% include testimonials-cards.html testimonials=walloflove %}
{% assign testimonials = site.data.testimonials | where_exp: "item", "item.tags contains 'WallOfLove'" | sort: 'date' | reverse %}
{% include testimonials-cards.html testimonials=testimonials %}
</div>
</section>

Expand Down
29 changes: 29 additions & 0 deletions _includes/testimonials-slider-plain.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{% for testimonial in include.testimonials %}
<div class="swiper-slide h-auto pt-4 pb-3 px-2">
<div class="d-flex flex-column h-100 px-2 px-sm-0 mb-0">
{{ testimonial.text | markdownify }}
<div class="d-flex align-items-center border-0 pt-3">
{% if testimonial.avatar == '' %}
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /><path d="M12 10m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" /><path d="M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855" /></svg>
{% else %}
<img src="/images/testimonials/{{ testimonial.avatar }}" width="48" class="rounded-circle ms-n1" alt="{{ testimonial.name }}">
{% endif %}
<div class="ps-2 ms-1">
<h6 class="fs-base fw-semibold mb-0">{{ testimonial.name }}</h6>
<span class="fs-sm text-muted">
{% if testimonial.url != '' and testimonial.company == '' %}
<a href="{{ testimonial.url }}" target="_blank" class="text-muted text-decoration-none">{{ testimonial.position }}</a>
{% elsif testimonial.position != '' %}
{{ testimonial.position }}
{% endif %}
{% if testimonial.url != '' and testimonial.company != '' %}
&ndash; <a href="{{ testimonial.url }}" target="_blank" class="text-muted text-decoration-none">{{ testimonial.company }}</a>
{% elsif testimonial.company != '' %}
&ndash; {{ testimonial.company }}
{% endif %}
</span>
</div>
</div>
</div>
</div>
{% endfor %}

0 comments on commit b915d01

Please sign in to comment.