eleven-8.x-1.0-beta5/eleven/templates/layout-landing/admin-block-content.html.twig

eleven/templates/layout-landing/admin-block-content.html.twig
{#
  admin overview pages:

  admin/
  admin/index
  admin/structure
  admin/reports
  admin/config

  admin/index
#}
{{ attach_library('eleven/card') }}

{# test if this is the admin index or config page #}
{% set test = [
  '/admin/index',
  '/admin/config',
  ]
%}

{% if path not in test  %}
  {%
    set classes = [
      'cards',
      'js-card-layout-target'
    ]
  %}

  {% include themepath ~ '/templates/component/navigation/cardlayout/cardlayout.html.twig' %}



  {% if content %}
    <section{{ attributes.addClass(classes).setAttribute('aria-label', section_title) }}>

    {% for item in content %}
      <article class="card {{ cardclasses }}" aria-label="{{ item.title}}">
        <h3 class="card__title card__title--icon card__title--icon-{{ item.url.getInternalPath()|clean_class }}">
          <a href="{{ item.url }}">{{ item.title}}</a>
        </h3>

        <p class="card__text">
          {{ item.description }}
        </p>

      </article>
    {% endfor %}

    </section>
  {% endif %}

{% else %}

  {# contents thats wrapped in the  admin-block: config/admin-block.html.twig
    http://drupal8.dev/admin/config
    http://drupal8.dev/admin/index
  #}

  {% if content %}
  <ul class="card__subelements">
    {% for item in content %}
      <li>
        <div class="card__subelement-text">
          <h4 class="card__subelements-title">
            <a href="{{ item.url }}" class="card__subelement">{{ item.title}}</a>
          </h4>

          {% if item.description %}
          <div class="card__text">
            {{ item.description }}
          </div>

          {% endif %}
        </div>
      </li>
    {% endfor %}
  </ul>
  {% endif %}

{% endif %}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc