templates/web/news/_all_news_page.html.twig line 1

  1. {% block body %}
        {% if blogNews|length %}
            <section>
                <h2 class="mb-5">{% trans %}aktualnev.mua{% endtrans %}</h2>
                <div class="hp-articles">
                    {% for new in blogNews %}
                        <a href="{{ path('web_news_detail', {'slug':new.slug}) }}" class="hp-article">
                            <div class="hp-article__image">
                                {% if new.upload %}
                                    <img src="{{ get_upload_background(new.upload) }}" class="hp-article__img" alt="">
                                {% else %}
                                    <img src="{{ asset('build/img/ilustracni.jpg') }}" class="hp-article__img" alt="">
                                {% endif %}
                                {% if new.labels|length > 0 %}
                                    <div class="hp-article__category">
                                        {{ new.labels[0].name }}
                                    </div>
                                {% endif %}
                            </div>
                            <div class="hp-article__title">
                                {% if new.name|length > 80 %}
                                    {{ new.name|slice(0, 80)~new.name|slice(80, new.name|length)|split(' ')[0]~'...' }}
                                {% else %}
                                    {{ new.name }}
                                {% endif %}
                            </div>
                            {% if new.description|length <= 120 %}
                                <p class="hp-article__text">{{ new.description }}</p>
                            {% else %}
                                <p class="hp-article__text">{{ new.description|slice(0, 120)~'..' }}</p>
                            {% endif %}
                        </a>
                    {% endfor %}
                </div>
                <a href="/{{ app.request.locale }}/aktualne-v-mua" class="link-upper mt-7">{% trans %}vsechny.novinky{% endtrans %}</a>
            </section>
        {% endif %}
    
        <section>
            <div class="row">
                {% if events|length > 0 %}
                    <div class="col-12 col-lg-7">
                        <h2 class="mb-5">{% trans %}akce{% endtrans %}</h2>
                        <div class="upcoming-wrapper">
                            {% for event in events %}
                                <a href="{{ path('web_event_detail', {'slug':event.slug}) }}" class="upcoming">
                                    <div class="upcoming__date">
                                        <div class="upcoming__date-day">{{ event.dateStart|date("j. n") }}.</div>
                                        <div class="upcoming__date-month">{{ event.dateStart|date("Y") }}</div>
                                    </div>
                                    <div class="upcoming__content">
                                        <h3 class="upcoming__title">{{ event.name }}</h3>
                                        <p class="upcoming__text">{{ event.description|striptags }}</p>
                                        <p class="upcoming__info">
                                            {% if event.dateStart|date('H:i') == "00:00" %}
                                                {% set eventStart = event.dateStart|date('j. n. Y') %}
                                            {% else %}
                                                {% set eventStart = event.dateStart|date("j. n. Y, H:i") %}
                                            {% endif %}
    
                                            {% if event.dateEnd is null %}
                                                {{ eventStart }}
                                            {% else %}
                                                {% if event.dateEnd|date('H:i') == "00:00" %}
                                                    {% set eventEnd = event.dateEnd|date('j. n. Y') %}
                                                {% else %}
                                                    {% set eventEnd = event.dateEnd|date("j. n. Y, H:i") %}
                                                {% endif %}
    
                                                {% if eventStart == eventEnd %}
                                                    {{ eventStart }}
                                                {% else %}
                                                    {{ eventStart }} – {{ eventEnd }}
                                                {% endif %}
                                            {% endif %}
                                        </p>
                                    </div>
                                </a>
                            {% endfor %}
                        </div>
                        <a href="/{{ app.request.locale }}/aktualne-v-mua#akce" class="link-upper mt-7">{% trans %}vsechny.akce{% endtrans %}</a>
                    </div>
                {% endif %}
                <div class="col-12 col-lg-5 mt-10 mt-lg-0">
                    <h2 class="mb-5">Call for papers & articles</h2>
                    <ul class="list-box">
                        {% if callForPapers|length > 0 %}
                            {% for callForPaper in callForPapers %}
                                <li class="list-box__item align-items-start">
                                    <a class="list-box__link list-box__link--rich" href="{{ path('web_call_for_papers_detail', {'slug':callForPaper.slug}) }}">
                                        <div class="list-box__link-title">{{ callForPaper.name }}</div>
                                        <p class="list-box__link-perex">{{ callForPaper.description }}</p>
                                        <p class="list-box__link-info">{{ get_call_for_papers_parameter1(callForPaper) }}</p>
                                    </a>
                                </li>
                            {% endfor %}
                        {% else %}
                            <li>
                                {% trans %}neni.vypsano{% endtrans %}
                            </li>
                        {% endif %}
                    </ul>
                            <h2 class="mb-5 mt-7">{% trans %}vyberova.rizeni{% endtrans %}</h2>
                        <ul class="list-box">
                            {% if tenders|length > 0 %}
                                {% for tender in tenders %}
                                    <li class="list-box__item">
                                        <a class="list-box__link" href="{{ path('web_tender_detail', {'slug':tender.slug}) }}">
                                            {{ tender.name }}
                                        </a>
                                    </li>
                                {% endfor %}
                            {% else %}
                                <li>
                                        {% trans %}neni.vypsano{% endtrans %}
                                </li>
                            {% endif %}
                        </ul>
                </div>
            </div>
        </section>
    {% endblock %}