templates/web/gallery/gallery.html.twig line 1

  1. {% extends "base.html.twig" %}
    {% block body %}
        <section class="container">
            <div class="row">
                <div class="col-12 col-lg-10">
                    <h1 class="main-title mb-5">{{ category.name }}</h1>
                    <div>
                        {{ category.html|raw }}
                    </div>
                </div>
            </div>
        </section>
        <section class="container">
            <div class="gallery-grid">
                {% for image in get_category_uploads_by_group_type(category, 0) %}
                    <div class="gallery-grid__item">
                        <a href="{{ asset(image.path) }}" class="gallery-grid__detail glightbox" data-gallery="gallery1" {% if image.shortDescription %}data-glightbox="description: .custom-desc{{ image.id }}"{% endif %}>
                            <img class="gallery-grid__photo" src="{{ asset(image.path) }}" alt="Obrázek z galerie" {% if image.shortDescription %}title="{{ image.shortDescription }}{% endif %}">
                        </a>
                        {% if image.shortDescription %}
                            <div class="glightbox-desc custom-desc{{ image.id }}">
                                <p>{{ image.shortDescription }}</p>
                            </div>
                        {% endif %}
                    </div>
                {% endfor %}
            </div>
        </section>
    
        {% if get_category_uploads_by_group_type(category, 1)|length > 0 %}
            <section class="container">
                <h2>{% trans %}prilohy{% endtrans %}</h2>
                <ul class="list-icone list-icone--download">
                    {% for file in get_category_uploads_by_group_type(category, 1) %}
                        <li class="list-icone__item">
                            <a href="{{ asset(file.path) }}" target="_blank" rel="noopener" {% if file.extension != 'pdf' %}download{% endif %}>
                                {% if file.shortDescription %}
                                    {{ file.shortDescription }}
                                {% else %}
                                    {{ file.originalName }}
                                {% endif %}
                                {% if file.extension %}
                                    (<span class="text-uppercase">{{ file.extension }}</span>)
                                {% endif %}
                            </a>
                        </li>
                    {% endfor %}
                </ul>
            </section>
        {% endif %}
    
        {{ include('/web/pages/_related.html.twig', {category: category}) }}
    
    {% endblock %}