50db22dc50
Three corrections after diffing the rebuild against the actual theme twig templates (modular/news.html.twig, employees.html.twig, about.html.twig): 1. section_title macro learns a `with_anchor` flag for the case where live always wraps the h2 in `<div class="anchor" id="">` even with an empty anchor id. Default behavior unchanged. 2. team_carousel macro drops its `.anchor` wrapper around the title. employees.html.twig renders the h2 directly — including the wrapper was producing an extra layout element on /team that live doesn't have. 3. index.html's news section now calls section_title with with_anchor=true and wraps the loaded news content in an outer <p>, reproducing the grav markdown pipeline's behavior (the outer <p> auto-closes on the first inner <p>, leaving one leading empty <p> that contributes the expected 10px margin).
39 lines
1.4 KiB
HTML
39 lines
1.4 KiB
HTML
{% macro team_carousel(title, anchor, slides) %}
|
|
<section class="employees">
|
|
{# Live's employees.html.twig renders the h2 directly, without an
|
|
`.anchor` wrapper — keep that to match its vertical rhythm. #}
|
|
<section class="section-title">
|
|
<div class="container text-center">
|
|
<h2>{{ title }}</h2>
|
|
<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 %}
|