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 fb45d46 commit 05660b6
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 15 deletions.
21 changes: 21 additions & 0 deletions _includes/testimonials-avatars.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<div class="d-flex me-3">
<div class="d-flex me-3">
{% for testimonial in include.testimonials %}
<div class="d-flex align-items-center justify-content-center bg-light rounded-circle ms-n3" style="width: 48px; height: 48px;">
<img src="/images/testimonials/{{ testimonial.avatar }}" class="rounded-circle" width="44" alt="{{ testimonial.name }} - {{ testimonial.position }} - {{ testimonial.company }}">
</div>
{% endfor %}
</div>
{% assign customer_count = '<span class="text-primary fw-semibold">%number%+</span>' | replace: '%number%', site.kimai_customers %}
<div>
<div class="d-block fs-base">
<i class="bx bxs-star text-warning"></i>
<i class="bx bxs-star text-warning"></i>
<i class="bx bxs-star text-warning"></i>
<i class="bx bxs-star text-warning"></i>
<i class="bx bxs-star text-warning"></i>
5.0
</div>
<span class="fs-sm">{{ site.data[page.lang].translation.store-hero-counter | replace: '%number%', customer_count }}</span>
</div>
</div>
23 changes: 8 additions & 15 deletions _layouts/store.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,9 @@ <h1 class="display-3 mb-4">
<p class="fs-lg mb-5">
{{ site.data[page.lang].translation.store-hero-intro }}
</p>
<div class="d-flex align-items-center mt-auto mb-3 mb-lg-0 pb-4 pb-lg-0 pb-xl-5">
<div class="d-flex me-3">
{% if page.lang == 'de' %}
<div class="senja-embed" data-id="266e4889-180b-482a-82f9-e1b69fd70f66" data-mode="shadow" data-lazyload="false" style="display: block;"></div>
<script async type="text/javascript" src="https://widget.senja.io/widget/266e4889-180b-482a-82f9-e1b69fd70f66/platform.js"></script>
{% else %}
<div class="senja-embed" data-id="35161406-eaf4-43f9-b5aa-531ca0b92d41" data-mode="shadow" data-lazyload="false" style="display: block;"></div>
<script async type="text/javascript" src="https://widget.senja.io/widget/35161406-eaf4-43f9-b5aa-531ca0b92d41/platform.js"></script>
{% endif %}
</div>
<div class="d-flex align-items-center mt-auto mb-3 mb-lg-0 pb-4 pb-lg-0 pb-xl-5 ps-3">
{% assign testimonials = site.data.testimonials | where_exp: "item", "item.avatar != ''" | sample: 5 %}
{% include testimonials-avatars.html testimonials=testimonials %}
</div>
</div>
<div class="col-xl-7">
Expand All @@ -47,35 +40,35 @@ <h1 class="display-3 mb-4">
<span class="badge bg-primary shadow-info fs-base fw-normal">Featured</span>
</header>
{% assign products = site.store | where: "lang", page.lang | where_exp:"product", "product.type == 'featured'" | sort: 'order', 'last' %}
{% include store-list.html products=products %}
{% include store-list-cards.html products=products %}
</article>
<article class="mb-5 pt-3">
<header class="d-flex align-items-center justify-content-between mb-5">
<span class="badge bg-success shadow-info fs-base fw-normal">Support</span>
</header>
{% assign products = site.store | where: "lang", page.lang | where_exp:"product", "product.type == 'support'" | sort: 'title' %}
{% include store-list.html products=products %}
{% include store-list-cards.html products=products %}
</article>
<article class="mb-5 pt-3">
<header class="d-flex align-items-center justify-content-between mb-5">
<span class="badge bg-info shadow-info fs-base fw-normal">{{ site.data[page.lang].translation.store-category-apps }}</span>
</header>
{% assign products = site.store | where: "lang", page.lang | where_exp:"product", "product.type == 'app'" | sort: 'title' %}
{% include store-list.html products=products %}
{% include store-list-cards.html products=products %}
</article>
<article class="mb-5 pt-3">
<header class="d-flex align-items-center justify-content-between mb-5">
<span class="badge bg-warning shadow-info fs-base fw-normal">{{ site.data[page.lang].translation.store-category-plugins }}</span>
</header>
{% assign products = site.store | where: "lang", page.lang | where_exp:"product", "product.type == 'plugin'" | sort: 'title' %}
{% include store-list.html products=products %}
{% include store-list-cards.html products=products %}
</article>
<article class="mb-5 pt-3">
<header class="d-flex align-items-center justify-content-between mb-5">
<span class="badge bg-danger shadow-info fs-base fw-normal">{{ site.data[page.lang].translation.store-category-client }}</span>
</header>
{% assign products = site.store | where: "lang", page.lang | where_exp:"product", "product.type == 'client'" %}
{% include store-list.html products=products %}
{% include store-list-cards.html products=products %}
</article>
</section>

Expand Down

0 comments on commit 05660b6

Please sign in to comment.