Newer
Older
pre-www / src / blocks / filters.twig
@EcosistemaWebIuav EcosistemaWebIuav on 23 Feb 2 KB fix: filtri mobile, css
<div class="block-{{block.key}} {{block.classes}}">
    <div class="block-{{block.key}}__header block-container">
        <span>Filtra</span>

    </div>
    <div class="block-container">
        <div class="block-{{block.key}}__inner">
            {% for filter in block.content.items %}
                {% if filter.type == 'term' %}
                    {% set options = taxonomies[filter.post_type].terms[filter.id] %}
                    {% set label = options.name %}
                    <div>
                        <div class="input">
                            <label for="" class="input__label">{{label}}</label>
                            <div class="input__field">
                                <button class="input__clear"></button>
                                <select name="" id="" class="input__field-input">
                                    <option value="">Seleziona</option>
                                    {% for option in options.items %}
                                        <option value="{{option.name}}">{{option.name}}</option>
                                    {% endfor %}
                                </select>
                            </div>
                        </div>
                    </div>
                {% endif %}
                {% if filter.type == 'post_type' %}
                    {% set options = post_type[filter.post_type] %}
                    {% set label = options.name %}
                    <div>
                        <div class="input">
                            <label for="" class="input__label">{{label}}</label>
                            <div class="input__field">
                                <button class="input__clear"></button>
                                <select name="" id="" class="input__field-input">
                                    <option value="">Seleziona</option>
                                    {% for option in options.items %}
                                        <option value="{{option.title}}">{{option.title}}</option>
                                    {% endfor %}
                                </select>
                            </div>
                        </div>
                    </div>
                {% endif %}
            {% endfor %}
            {% if block.content.has_search %}
                <div>
                    <div class="input">
                        <label for="search" class="input__label">Ricerca libera</label>
                        <div class="input__field input__search">
                            <button class="input__clear"></button>
                            <input type="search" name="search" id="search" class="input__field-input" placeholder="Digita qui per cercare...">
                        </div>
                    </div>
                </div>
            {% endif %}
        </div>
    </div>
</div>