templates/home/index.html.twig line 1

  1. {# {% extends 'base.html.twig' %} #}
    
    {# {% block title %}Home Lô-Ba{% endblock %} #}
    
    {% block main %}
    
        {% if locale == 'default' %}
            <div style="background-image: url('{{ asset('uploads/images/' ~ intro.background) }}')" class="sectionOne">
        {% else %}
            {% for i in intro %}
                <div style="background-image: url('{{ asset('uploads/images/' ~ i.background) }}')" class="sectionOne">
            {% endfor %}
        {% endif %}
    
    
        <section class="sec-intro">
            {% for message in app.flashes('message') %}
                <div>
                    {{ message }}
                </div>
            {% endfor %}
    
            <div class="intro">
                {% if locale == 'default' %}
                    {{ intro.content|raw }}
                {% else %}
                    {% for i in intro %}
                        {% set content = i.translations | filter(t => t.keyword == 'introduction.content')|first %}
                        {{ content.value|raw }}
                    {% endfor %}
                {% endif %}
            </div>
        </section>
    
        {% for section in sections %}
            <section class="sec-mission">
                <h2 class="mission-title">
                    {{ locale == 'default' ? section.title : ((section.translations|filter(t=>t.keyword == 'section.title')|first).value|raw) }}
                </h2>
                <div class="mission-txt">
                    {{ locale == 'default' ? section.content|raw : ((section.translations|filter(t => t.keyword == 'section.content')|first).value|raw) }}
                </div>
            </section>
        {% endfor %}
        </div>
    
        {% if locale == 'default' %}
            <style>
                .sec-mission:nth-child(2n+3) {
                    background-image: url('{{ asset('uploads/images/' ~ intro.background2) }}');
                }
            </style>
        {% else %}
            {% for i in intro %}
                <style>
                    .sec-mission:nth-child(2n+3) {
                        background-image: url('{{ asset('uploads/images/' ~ i.background2) }}');
                    }
                </style>
            {% endfor %}
        {% endif %}
    {% endblock %}