Autoformatted some twigs

This commit is contained in:
pikim 2023-01-20 00:03:51 +01:00
parent 3667a1526b
commit 3318a38408
6 changed files with 108 additions and 95 deletions

View file

@ -35,5 +35,4 @@
{{ field.validate.required in ['on', 'true', 1] ? '<span class="required">*</span>' }}
</label>
</div>
{% endblock %}

View file

@ -1,12 +1,17 @@
{% macro nav_loop(page) %}
{% import _self as macros %}
{% import _self as macros %}
{% for p in page.children.visible %}
{% set current_page = (p.active or p.activeChild) ? 'active' : '' %}
{% if p.children.visible.count > 0 %}
<li class="{{ current_page }}">
<a>
{% if p.header.icon %}<i class="fa fa-{{ p.header.icon }}"></i>{% endif %}
<span>{{ p.menu }}{% if p.routable ?? false %}&nbsp;<i class="fa fa-angle-down"></i>{% endif %}</span>
{% if p.header.icon %}
<i class="fa fa-{{ p.header.icon }}"></i>
{% endif %}
<span>{{ p.menu }}
{% if p.routable ?? false %}&nbsp;<i class="fa fa-angle-down"></i>
{% endif %}
</span>
</a>
<ul>
{{ macros.nav_loop(p) }}
@ -15,7 +20,9 @@
{% else %}
<li class="{{ current_page }}">
<a href="{{ p.url }}">
{% if p.header.icon %}<i class="fa fa-{{ p.header.icon }}"></i>{% endif %}
{% if p.header.icon %}
<i class="fa fa-{{ p.header.icon }}"></i>
{% endif %}
<span>{{ p.menu }}</span>
</a>
</li>

View file

@ -1,5 +1,5 @@
<section id="contact">
<p>{{ page.content|raw }}</p>
<p>{{ page.content|raw }}</p>
{% include "forms/form.html.twig" with { form: forms('contact-form')} %}
</section>
<br>

View file

@ -1,30 +1,37 @@
{% set columns = page.header.layout == 'standard' ? 'col-4 col-6-medium col-12-small' : 'col-6 col-12-small' %}
<section id="features">
<header>
<header>
<h2>{{ page.title }}</h2>
{% if page.header.subtitle %}
<p>{{ page.header.subtitle }}</p>
{% endif %}
</header>
</header>
{{ content|raw }}
<div class="row gtr-uniform">
{% for feature in page.header.features %}
<div class="{{columns}}">
<article class="box">
{% if feature.image %}<span class="image fit"><img src="{{page.media[feature.image].url}}" alt="{{feature.title}}" /></span>{% endif %}
{% if feature.image %}
<span class="image fit"><img src="{{page.media[feature.image].url}}" alt="{{feature.title}}"/></span>
{% endif %}
<header>
{% if feature.title %}<h3>{{feature.title}}</h3>{% endif %}
{% if feature.text %}<p>{{feature.text|raw}}</p>{% endif %}
{% if feature.buttonurl %}<p><a href="{{feature.buttonurl}}" class="button fit" target={% if feature.buttonurl_target %}"_blank"{% endif%}>{{feature.buttontext}}</a></p>{% endif %}
{% if feature.title %}
<h3>{{feature.title}}</h3>
{% endif %}
{% if feature.text %}
<p>{{feature.text|raw}}</p>
{% endif %}
{% if feature.buttonurl %}
<p>
<a href="{{feature.buttonurl}}" class="button fit" target={% if feature.buttonurl_target %} "_blank" {% endif%}>{{feature.buttontext}}</a>
</p>
{% endif %}
</header>
</article>
</div>
{% endfor %}
</div>
</section>
<br>