feat(team): restore employees carousel matching live markup

This commit is contained in:
2026-05-21 00:33:24 +02:00
parent 9b18c2965f
commit 4fd0042480
3 changed files with 85 additions and 43 deletions
+42
View File
@@ -0,0 +1,42 @@
{% macro team_carousel(title, anchor, slides) %}
<section class="employees">
<section class="section-title">
<div class="container text-center">
{%- if anchor %}
<div class="anchor" id="{{ anchor }}">
<h2>{{ title }}</h2>
</div>
{%- else %}
<h2>{{ title }}</h2>
{%- endif %}
<span class="bordered-icon"><i class="fa fa-circle-thin"></i></span>
</div>
</section>
<div class="container">
<div id="employeesSlider" class="carousel slide" data-ride="carousel">
<div class="carousel-inner" role="listbox">
{%- for slide in slides %}
<div class="item{% if loop.first %} active{% endif %}">
<blockquote>
<ul>
<li><img src="/images/team/{{ slide.image }}" alt="{{ slide.name }}"></li>
<li class="name">{{ slide.name }}</li>
</ul>
<p>{{ slide.description }}</p>
</blockquote>
</div>
{%- endfor %}
</div>
<a class="left carousel-control" href="#employeesSlider" role="button" data-slide="prev">
<span><i class="fa fa-angle-left"></i></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#employeesSlider" role="button" data-slide="next">
<span><i class="fa fa-angle-right"></i></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</section>
{% endmacro %}
+17 -8
View File
@@ -1,6 +1,7 @@
{% extends "base.html" %}
{% import "macros/section_title.html" as st %}
{% import "macros/page_title.html" as pt %}
{% import "macros/team_carousel.html" as tc %}
{% block content %}
@@ -15,14 +16,22 @@
{% endif %}
{% for page in section.pages %}
<section class="text ptb-text">
{{ st::section_title(title=page.title, anchor=page.extra.anchor | default(value=page.slug)) }}
<div class="container">
<div class="row">
{{ page.content | safe }}
</div>
</div>
</section>
{% set layout = page.extra.layout | default(value="") %}
{% if layout == "carousel" %}
{{ tc::team_carousel(
title=page.title,
anchor=page.extra.anchor | default(value=page.slug),
slides=page.extra.slides) }}
{% else %}
<section class="text ptb-text">
{{ st::section_title(title=page.title, anchor=page.extra.anchor | default(value=page.slug)) }}
<div class="container">
<div class="row">
{{ page.content | safe }}
</div>
</div>
</section>
{% endif %}
{% endfor %}
{% endblock %}