yeti_theme-8.x-1.x-dev/templates/navigation/menu-local-tasks.html.twig

templates/navigation/menu-local-tasks.html.twig
{#
/**
 * @file
 * Default theme implementation to display primary and secondary local tasks.
 *
 * Available variables:
 * - primary: HTML list items representing primary tasks.
 * - secondary: HTML list items representing secondary tasks.
 *
 * Each item in these variables (primary and secondary) can be individually
 * themed in menu-local-task.html.twig.

 * @ingroup themeable
 */
#}
{{ attach_library('yeti/navigation.local_tasks') }}

{%
  set primary_classes = [
    'menu-local-tasks',
  ]
%}

{%
  set secondary_classes = [
    'menu-local-tasks',
    'secondary',
  ]
%}

{% set container_id = 'mobile-local-tasks' %}

<button class="toggle button large hide-for-large" type="button" data-toggle="mobile-local-tasks">
  <i class="fi-pencil"></i>
</button>
<div id="{{ container_id }}" class="dropdown-pane vertical menu hide-for-large" data-dropdown>

  {% if primary %}
    <h3 class="show-for-sr">{{ 'Primary local tasks'|t }}</h3>
    <ul{{ attributes.addClass(primary_classes) }}>
      {{ primary }}
    </ul>
  {% endif %}

  {% if secondary %}
    <h3 class="show-for-sr">{{ 'Secondary local tasks'|t }}</h3>
    <ul{{ attributes.addClass(secondary_classes) }}>
      {{ secondary }}
    </ul>
  {% endif %}

</div>

{% if primary %}
  <h3 class="show-for-sr">{{ 'Primary local tasks'|t }}</h3>
  <ul{{ attributes.addClass(primary_classes, 'show-for-large') }}>
    {{ primary }}
  </ul>
{% endif %}

{% if secondary %}
  <h3 class="show-for-sr">{{ 'Secondary local tasks'|t }}</h3>
  <ul{{ attributes.addClass(secondary_classes, 'show-for-large') }}>
    {{ secondary }}
  </ul>
{% endif %}

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

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