clean install

This commit is contained in:
2024-12-10 15:08:16 +01:00
commit e14eb2d8fd
31193 changed files with 3555714 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
{#
/**
* @file
* Gin override for a breadcrumb trail.
*
* Available variables:
* - breadcrumb: Breadcrumb trail items.
*/
#}
{% if breadcrumb %}
<nav class="gin-breadcrumb" role="navigation" aria-labelledby="system-breadcrumb">
<h2 id="system-breadcrumb" class="visually-hidden">{{ 'Breadcrumb'|t }}</h2>
<ol class="gin-breadcrumb__list">
{% for item in breadcrumb %}
{% if item.text %}
<li class="gin-breadcrumb__item">
{% if item.url %}
<a href="{{ item.url }}" class="gin-breadcrumb__link"{% if item.attributes.title %} title="{{ item.attributes.title }}"{% endif %}{% if item.attributes.data %} {{ item.attributes.data }}{% endif %}>{{ item.text }}</a>
{% else %}
<span class="gin-breadcrumb__text">{{ item.text }}</span>
{% endif %}
</li>
{% endif %}
{% endfor %}
</ol>
</nav>
{% endif %}

View File

@@ -0,0 +1,23 @@
{#
/**
* @file
* Specific container for Gin Toolbar module, which relies on this markup.
*
* Available variables:
* - attributes: HTML attributes for the containing element.
* - children: The rendered child elements of the container.
* - has_parent: A flag to indicate that the container has one or more parent
containers.
*
* @see template_preprocess_container()
*
* @ingroup themeable
*/
#}
{%
set classes = [
has_parent ? 'js-form-wrapper',
has_parent ? 'form-wrapper',
]
%}
<div{{ attributes.addClass(classes) }}>{{ children }}</div>

View File

@@ -0,0 +1,116 @@
{#
/**
* @file
* Default theme implementation to display a toolbar menu.
*
* Available variables:
* - menu_name: The machine name of the menu.
* - items: A nested list of menu items. Each menu item contains:
* - attributes: HTML attributes for the menu item.
* - below: The menu item child items.
* - title: The menu link title.
* - path: The menu link path.
* - localized_options: Menu link localized options.
* - is_expanded: TRUE if the link has visible children within the current
* menu tree.
* - is_collapsed: TRUE if the link has children within the current menu tree
* that are not currently visible.
* - in_active_trail: TRUE if the link is in the active trail.
*
* @ingroup themeable
*/
#}
{% import _self as menus %}
{#
We call a macro which calls itself to render the full tree.
@see https://twig.symfony.com/doc/1.x/tags/macro.html
#}
{{ menus.menu_links(items, attributes, 0, false, menu_name, icon_default, icon_path, toolbar_variant) }}
{% macro menu_links(items, attributes, menu_level, parent, menu_name, icon_default, icon_path, toolbar_variant) %}
{% import _self as menus %}
{% if items %}
{% if menu_level == 0 %}
<ul{{ attributes.addClass('toolbar-menu') }}>
{% else %}
<ul class="toolbar-menu">
{% endif %}
{% for item in items %}
{%
set classes = [
'menu-item',
item.is_expanded ? 'menu-item--expanded',
item.is_collapsed ? 'menu-item--collapsed',
item.in_active_trail ? 'menu-item--active-trail',
item.gin_id ? 'menu-item__' ~ item.gin_id
]
%}
{# Add Home if it doesn't exist #}
{% if menu_level == 0 and loop.index == 1 and item.gin_id != 'admin_toolbar_tools-help' %}
<li class="menu-item menu-item--expanded menu-item__tools">
{% if icon_default == false and icon_path != '' %}
<a href="{{ path('<front>') }}" class="toolbar-logo" data-drupal-link-system-path="<front>">
<img src="{{ file_url(icon_path) }}" class="toolbar-icon-home" alt="{{ 'Home'|t }}" />
</a>
{% else %}
<a href="{{ path('<front>') }}" class="toolbar-icon toolbar-icon-admin-toolbar-tools-help toolbar-icon-default" data-drupal-link-system-path="<front>">
{{ 'Home'|t }}
</a>
{% endif %}
</li>
{% endif %}
{# {% if menu_level == 0 and item.gin_id == 'help-main' %}
<li class="menu-item menu-item__spacer menu-item--no-link"></li>
{% endif %} #}
{# Add Menu Titles #}
{% if menu_level == 1 and loop.index == 1 %}
<li class="menu-item-title">
<h2 class="toolbar-menu__title">
<a href="{{ parent.url }}">{{ parent.title }}</a>
</h2>
</li>
{% if toolbar_variant == 'vertical' %}
<li class="menu-item">
<a href="{{ parent.url }}" class="toolbar-icon">{{ 'Overview'|t }}</a>
</li>
{% endif %}
{% elseif menu_level > 1 and loop.index == 1 %}
<li class="menu-item-title">
<h3 class="toolbar-menu__sub-title">
<a href="{{ parent.url }}">{{ parent.title }}</a>
</h3>
</li>
{% if toolbar_variant == 'vertical' %}
<li class="menu-item">
<a href="{{ parent.url }}" class="toolbar-icon">{{ 'Overview'|t }}</a>
</li>
{% endif %}
{% endif %}
<li{{ item.attributes.addClass(classes) }}>
{% if item.gin_id == 'admin_toolbar_tools-help' and icon_default == false and icon_path != '' %}
<a href="{{ path('<front>') }}" class="toolbar-logo" data-drupal-link-system-path="<front>">
<img src="{{ file_url(icon_path) }}" class="toolbar-icon-home" alt="{{ 'Home'|t }}" />
</a>
{% elseif item.gin_id == 'admin_toolbar_tools-help' %}
{{ link('Drupal', item.url, {'class': ['toolbar-icon-default']}) }}
{% else %}
{{ link(item.title, item.url, {'class': [item.in_active_trail ? 'is-active']}) }}
{% endif %}
{% if item.below %}
{{ menus.menu_links(item.below, attributes, menu_level + 1, item, menu_name, icon_default, icon_path, toolbar_variant) }}
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{% if menu_level == 0 %}
{# Custom toggle for menu #}
<a href="#" class="toolbar-menu__trigger trigger" role="button" aria-pressed="false">{{ 'Close'|t }}</a>
{% endif %}
{% endmacro %}

View File

@@ -0,0 +1,77 @@
{#
/**
* @file
* Theme override for the administrative toolbar.
*
* Available variables:
* - attributes: HTML attributes for the wrapper.
* - toolbar_attributes: HTML attributes to apply to the toolbar.
* - toolbar_heading: The heading or label for the toolbar.
* - tabs: List of tabs for the toolbar.
* - attributes: HTML attributes for the tab container.
* - link: Link or button for the menu tab.
* - trays: Toolbar tray list, each associated with a tab. Each tray in trays
* contains:
* - attributes: HTML attributes to apply to the tray.
* - label: The tray's label.
* - links: The tray menu links.
* - remainder: Any non-tray, non-tab elements left to be rendered.
*
* @see template_preprocess_toolbar()
*/
#}
{# Prevent duplicate ids by using secondary tabs and trays when provided. #}
{% if _context['#secondary']['tabs'] %}
{% set tabs = _context['#secondary']['tabs'] %}
{% endif %}
{% if _context['#secondary']['trays'] %}
{% set trays = _context['#secondary']['trays'] %}
{% endif %}
<div{{ attributes.addClass('toolbar', 'toolbar-secondary').setAttribute('id', 'toolbar-administration-secondary') }}>
<nav{{ toolbar_attributes.addClass('toolbar-bar', 'clearfix').setAttribute('id', 'toolbar-bar') }}>
<h2 class="visually-hidden">{{ toolbar_heading }}</h2>
{% for key, tab in tabs %}
{% set tray = trays[key] %}
{% set user_menu = tray.links['user_links'] ? 'user-menu' : false %}
{% set item_id = [] %}
{% for key, item in tab.link['#attributes']['class'] %}
{% if 'icon-' in item %}
{% set item_id = item_id|merge(['toolbar-id--' ~ item]) %}
{% endif %}
{% endfor %}
{% set tab_id = tab.link['#id'] ? 'toolbar-tab--' ~ tab.link['#id'] %}
{% set tab_classes = item_id|merge(['toolbar-tab', user_menu, tab_id]) %}
{% set denylist_items = [
'toolbar-id--toolbar-icon-menu',
] %}
{# All items except main nav #}
{% if item_id[0] not in denylist_items %}
<div{{ tab.attributes.addClass(tab_classes) }}{% if 'tour-toolbar-tab' in tab.attributes.class %} id="toolbar-tab-tour"{% endif %}>
{% if item_id[0] == 'toolbar-id--toolbar-icon-user' %}
{{ user_picture }}
{% else %}
{{ tab.link }}
{% endif %}
<div{{ tray.attributes }}>
{% if tray.label %}
<nav class="toolbar-lining clearfix" role="navigation" aria-label="{{ tray.label }}">
<h3 class="toolbar-tray-name visually-hidden">{{ tray.label }}</h3>
{% else %}
<nav class="toolbar-lining clearfix" role="navigation">
{% endif %}
{{ tray.links }}
</nav>
</div>
</div>
{% endif %}
{% endfor %}
</nav>
{{ remainder }}
</div>

View File

@@ -0,0 +1,66 @@
{#
/**
* @file
* Theme override for the administrative toolbar.
*
* Available variables:
* - attributes: HTML attributes for the wrapper.
* - toolbar_attributes: HTML attributes to apply to the toolbar.
* - toolbar_heading: The heading or label for the toolbar.
* - tabs: List of tabs for the toolbar.
* - attributes: HTML attributes for the tab container.
* - link: Link or button for the menu tab.
* - trays: Toolbar tray list, each associated with a tab. Each tray in trays
* contains:
* - attributes: HTML attributes to apply to the tray.
* - label: The tray's label.
* - links: The tray menu links.
* - remainder: Any non-tray, non-tab elements left to be rendered.
*
* @see template_preprocess_toolbar()
*/
#}
{% set gin_toolbar_id = toolbar_variant != 'classic' ? 'gin-toolbar-bar' : 'toolbar-bar' %}
<div{{ attributes.addClass('toolbar') }}>
<nav{{ toolbar_attributes.addClass('toolbar-bar', 'clearfix').setAttribute('id', gin_toolbar_id) }}>
<h2 class="visually-hidden">{{ toolbar_heading }}</h2>
{% for key, tab in tabs %}
{% set tray = trays[key] %}
{% set user_menu = tray.links['user_links'] ? 'user-menu' : false %}
{% if
toolbar_variant != 'classic' and (
tab.attributes.id == 'admin-toolbar-search-tab' or
tab.attributes.id == 'responsive-preview-toolbar-tab'
)
%}
{# render nothing #}
{% else %}
{% if tab.attributes.id == 'toolbar-tab-tour' and toolbar_variant != 'classic' %}
<div{{ tab.attributes.addClass('toolbar-tab', user_menu, tab.link['#id'] ? 'toolbar-tab--' ~ tab.link['#id'] : null).removeAttribute('id') }}>
{% else %}
<div{{ tab.attributes.addClass('toolbar-tab', user_menu, tab.link['#id'] ? 'toolbar-tab--' ~ tab.link['#id'] : null) }}>
{% endif %}
{% if tab.link['#id'] == 'toolbar-item-administration' %}
<a class="toolbar-menu__logo" href="/admin/content" aria-label="{{ 'Toolbar Menu Logo'|t }}">
<span class="visually-hidden">{{ 'Toolbar Menu Logo'|t }}</span>
</a>
{{ tab.link }}
{% else %}
{{ tab.link }}
{% endif %}
<div{{ tray.attributes }}>
{% if tray.label %}
<nav class="toolbar-lining clearfix" role="navigation" aria-label="{{ tray.label }}">
<h3 class="toolbar-tray-name visually-hidden">{{ tray.label }}</h3>
{% else %}
<nav class="toolbar-lining clearfix" role="navigation">
{% endif %}
{{ tray.links }}
</nav>
</div>
</div>
{% endif %}
{% endfor %}
</nav>
{{ remainder }}
</div>