clean install

This commit is contained in:
matze committed 2024-12-10 15:08:16 +01:00
commit e14eb2d8fd
31193 files changed
+3555714

No files matched your search

@@ -0,0 +1,36 @@
{#
/**
* @file
* Gin's theme implementation for the content of an administrative block.
*
* Available variables:
* - content: List of administrative menu items. Each menu item contains:
* - link: Link to the admin section.
* - title: Short name of the section.
* - description: Description of the administrative menu item.
* - attributes: HTML attributes to be added to the element.
* - compact: Boolean indicating whether compact mode is turned on or not.
*
* @see template_preprocess_admin_block_content()
* @see claro_preprocess_admin_block_content()
*/
#}
{%
set item_classes = [
'admin-item',
]
%}
{% if content %}
<div{{ attributes.addClass('admin-list', 'gin-layer-wrapper') }}>
{% for item in content %}
{% set description_id = item.title|render|clean_id ~ '-desc' %}
<div{{ create_attribute({class: item_classes}) }}>
{{ item.link }}
<div class="admin-item__title" aria-details="{{ description_id }}">{{ item.title }}</div>
{% if item.description %}
<div class="admin-item__description" id="{{ description_id }}">{{ item.description }}</div>
{% endif %}
</div>
{% endfor %}
</div>
{% endif %}
@@ -0,0 +1,31 @@
{#
/**
* @file
* Theme override for an administrative block.
*
* Available variables:
* - block: An array of information about the block, including:
* - show: A flag indicating if the block should be displayed.
* - title: The block title.
* - content: (optional) The content of the block.
* - description: (optional) A description of the block.
* (Description should only be output if content is not available).
* - attributes: HTML attributes for the containing div element.
*/
#}
{%
set classes = [
'panel',
'gin-layer-wrapper',
]
%}
<div{{ attributes.addClass(classes) }}>
{% if block.title %}
<h3 class="panel__title">{{ block.title }}</h3>
{% endif %}
{% if block.content %}
<div class="panel__content">{{ block.content }}</div>
{% elseif block.description %}
<div class="panel__description">{{ block.description }}</div>
{% endif %}
</div>
@@ -0,0 +1,20 @@
{#
/**
* @file
* Gin's theme implementation to display a list of custom block types.
*
* Available variables:
* - bundles: List of blockcontent types, each with the following properties:
* - label: Block content type label
* - add_link: \Drupal\Core\Link link instance to create an entity of this
* block content type. This is a GeneratedLink originally and is switched by
* claro_preprocess_block_content_add_list().
* - description: A description of this custom block type.
*
* @todo Revisit after https://www.drupal.org/node/3026221 has been solved.
*
* @see template_preprocess_block_content_add_list()
* @see claro_preprocess_block_content_add_list()
*/
#}
{% extends '@gin/admin/entity-add-list.html.twig' %}
@@ -0,0 +1,55 @@
{#
/**
* @file
* Theme override to present a list of available bundles.
*
* Available variables:
* - bundles: A list of bundles, each with the following properties:
* - label: Bundle label.
* - description: Bundle description.
* - add_link: \Drupal\Core\Link link instance to create an entity of this
* bundle.
* - add_bundle_message: The message shown when there are no bundles. Only
* available if the entity type uses bundle entities.
*
* @see template_preprocess_entity_add_list()
*/
#}
{%
set item_classes = [
'admin-item',
]
%}
{% if bundles is not empty %}
<div class="panel gin-layer-wrapper">
{% if title %}
<h3 class="panel__title">{{ title }}</h3>
{% endif %}
<div{{ attributes.addClass('admin-list', 'panel__content', 'gin-layer-wrapper') }}>
{% for bundle in bundles %}
{#
Add 'admin-item__link' class to the link attributes.
This is needed for keeping the original attributes of the link's url.
#}
{% set bundle_attributes = bundle.add_link.url.getOption('attributes') ?: {} %}
{% set link_attributes = create_attribute(bundle_attributes).addClass('admin-item__link') %}
{% set description_id = bundle.add_link.text|clean_id ~ '-desc' %}
<div{{ create_attribute({ class: item_classes }) }}>
<a class="admin-item__link" title="{{ bundle.add_link.text }}" href="{{ bundle.add_link.url }}"></a>
<div class="admin-item__title"{% if bundle.description %} aria-details="{{ description_id }}"{% endif %}>
{{ bundle.add_link.text }}
</div>
{# Don't print empty description wrapper if there is no description #}
{% if bundle.description %}
<div class="admin-item__description" id="{{ description_id }}">{{ bundle.description }}</div>
{% endif %}
</div>
{% endfor %}
</div>
</div>
{% elseif add_bundle_message is not empty %}
<p>
{{ add_bundle_message }}
</p>
{% endif %}
@@ -0,0 +1,25 @@
{#
/**
* @file
* Gin's theme implementation to list node types available for adding content.
*
* Available variables:
* - bundles: A list of content types, each with the following properties:
* - label: Content type label.
* - add_link: \Drupal\Core\Link link instance to create an entity of this
* content type. This is a GeneratedLink originally and is switched by
* claro_preprocess_node_add_list().
* - description: Description of this type of content.
*
* @todo Revisit after https://www.drupal.org/node/3026221 has been solved.
*
* @see template_preprocess_node_add_list()
* @see claro_preprocess_node_add_list()
*/
#}
{% extends '@gin/admin/entity-add-list.html.twig' %}
{% set create_content = path('node.type_add') %}
{%
set add_bundle_message = 'You have not created any content types yet. Go to the <a href="@create-content">content type creation page</a> to add a new content type.'|t({ '@create-content': create_content })
%}
@@ -0,0 +1,113 @@
{#
/**
* @file
* Theme override to display a table.
*
* Available variables:
* - attributes: HTML attributes to apply to the <table> tag.
* - caption: A localized string for the <caption> tag.
* - colgroups: Column groups. Each group contains the following properties:
* - attributes: HTML attributes to apply to the <col> tag.
* Note: Drupal currently supports only one table header row, see
* https://www.drupal.org/node/893530 and
* http://api.drupal.org/api/drupal/includes!theme.inc/function/theme_table/7#comment-5109.
* - header: Table header cells. Each cell contains the following properties:
* - tag: The HTML tag name to use; either 'th' or 'td'.
* - attributes: HTML attributes to apply to the tag.
* - content: A localized string for the title of the column.
* - field: Field name (required for column sorting).
* - sort: Default sort order for this column ("asc" or "desc").
* - sticky: A flag indicating whether to use a "sticky" table header.
* - rows: Table rows. Each row contains the following properties:
* - attributes: HTML attributes to apply to the <tr> tag.
* - data: Table cells.
* - no_striping: A flag indicating that the row should receive no
* 'even / odd' styling. Defaults to FALSE.
* - cells: Table cells of the row. Each cell contains the following keys:
* - tag: The HTML tag name to use; either 'th' or 'td'.
* - attributes: Any HTML attributes, such as "colspan", to apply to the
* table cell.
* - content: The string to display in the table cell.
* - active_table_sort: A boolean indicating whether the cell is the active
table sort.
* - footer: Table footer rows, in the same format as the rows variable.
* - empty: The message to display in an extra row if table does not have
* any rows.
* - no_striping: A boolean indicating that the row should receive no striping.
* - header_columns: The number of columns in the header.
*
* @see template_preprocess_table()
*/
#}
<table{{ attributes }}>
{% if caption %}
<caption>{{ caption }}</caption>
{% endif %}
{% for colgroup in colgroups %}
{% if colgroup.cols %}
<colgroup{{ colgroup.attributes }}>
{% for col in colgroup.cols %}
<col{{ col.attributes }} />
{% endfor %}
</colgroup>
{% else %}
<colgroup{{ colgroup.attributes }} />
{% endif %}
{% endfor %}
{% if header %}
<thead>
<tr>
{% for cell in header %}
{%
set cell_classes = [
cell.active_table_sort ? 'is-active',
]
%}
<{{ cell.tag }}{{ cell.attributes.addClass(cell_classes) }}>
{{- cell.content -}}
</{{ cell.tag }}>
{% endfor %}
</tr>
</thead>
{% endif %}
{% if rows %}
<tbody>
{% for row in rows %}
{%
set row_classes = [
not no_striping ? cycle(['odd', 'even'], loop.index0),
]
%}
<tr{{ row.attributes.addClass(row_classes) }}>
{% for cell in row.cells %}
<{{ cell.tag }}{{ cell.attributes }}>
{{- cell.content -}}
</{{ cell.tag }}>
{% endfor %}
</tr>
{% endfor %}
</tbody>
{% elseif empty %}
<tbody>
<tr class="odd">
<td colspan="{{ header_columns }}" class="empty message">{{ empty }}</td>
</tr>
</tbody>
{% endif %}
{% if footer %}
<tfoot>
{% for row in footer %}
<tr{{ row.attributes }}>
{% for cell in row.cells %}
<{{ cell.tag }}{{ cell.attributes }}>
{{- cell.content -}}
</{{ cell.tag }}>
{% endfor %}
</tr>
{% endfor %}
</tfoot>
{% endif %}
</table>
@@ -0,0 +1,131 @@
{#
/**
* @file
* Theme override to display a table.
*
* Available variables:
* - attributes: HTML attributes to apply to the <table> tag.
* - caption: A localized string for the <caption> tag.
* - colgroups: Column groups. Each group contains the following properties:
* - attributes: HTML attributes to apply to the <col> tag.
* Note: Drupal currently supports only one table header row, see
* https://www.drupal.org/node/893530 and
* http://api.drupal.org/api/drupal/includes!theme.inc/function/theme_table/7#comment-5109.
* - header: Table header cells. Each cell contains the following properties:
* - tag: The HTML tag name to use; either 'th' or 'td'.
* - attributes: HTML attributes to apply to the tag.
* - content: A localized string for the title of the column.
* - field: Field name (required for column sorting).
* - sort: Default sort order for this column ("asc" or "desc").
* - sticky: A flag indicating whether to use a "sticky" table header.
* - rows: Table rows. Each row contains the following properties:
* - attributes: HTML attributes to apply to the <tr> tag.
* - data: Table cells.
* - no_striping: A flag indicating that the row should receive no
* 'even / odd' styling. Defaults to FALSE.
* - cells: Table cells of the row. Each cell contains the following keys:
* - tag: The HTML tag name to use; either 'th' or 'td'.
* - attributes: Any HTML attributes, such as "colspan", to apply to the
* table cell.
* - content: The string to display in the table cell.
* - active_table_sort: A boolean indicating whether the cell is the active
table sort.
* - footer: Table footer rows, in the same format as the rows variable.
* - empty: The message to display in an extra row if table does not have
* any rows.
* - no_striping: A boolean indicating that the row should receive no striping.
* - header_columns: The number of columns in the header.
*
* @see template_preprocess_table()
*/
#}
<div class="layer-wrapper gin-layer-wrapper">
{% if header %}
<div class="gin-table-scroll-wrapper">
{% endif %}
<table{{ attributes }}>
{% if caption %}
<caption>{{ caption }}</caption>
{% endif %}
{% for colgroup in colgroups %}
{% if colgroup.cols %}
<colgroup{{ colgroup.attributes }}>
{% for col in colgroup.cols %}
<col{{ col.attributes }} />
{% endfor %}
</colgroup>
{% else %}
<colgroup{{ colgroup.attributes }} />
{% endif %}
{% endfor %}
{% if header %}
<thead>
<tr>
{% for cell in header %}
{% if '<a' in cell.content|render|render %}
{%
set cell_classes = [
'th__item',
cell.active_table_sort ? 'is-active',
]
%}
{% else %}
{%
set cell_classes = [
'th__' ~ cell.content|render|clean_class,
cell.active_table_sort ? 'is-active',
]
%}
{% endif %}
<{{ cell.tag }}{{ cell.attributes.addClass(cell_classes) }}>
{{- cell.content -}}
</{{ cell.tag }}>
{% endfor %}
</tr>
</thead>
{% endif %}
{% if rows %}
<tbody>
{% for row in rows %}
{%
set row_classes = [
not no_striping ? cycle(['odd', 'even'], loop.index0),
]
%}
<tr{{ row.attributes.addClass(row_classes) }}>
{% for cell in row.cells %}
<{{ cell.tag }}{{ cell.attributes }}>
{{- cell.content -}}
</{{ cell.tag }}>
{% endfor %}
</tr>
{% endfor %}
</tbody>
{% elseif empty %}
<tbody>
<tr class="odd">
<td colspan="{{ header_columns }}" class="empty message">{{ empty }}</td>
</tr>
</tbody>
{% endif %}
{% if footer %}
<tfoot>
{% for row in footer %}
<tr{{ row.attributes }}>
{% for cell in row.cells %}
<{{ cell.tag }}{{ cell.attributes }}>
{{- cell.content -}}
</{{ cell.tag }}>
{% endfor %}
</tr>
{% endfor %}
</tfoot>
{% endif %}
</table>
{% if header %}
</div>
{% endif %}
</div>
@@ -0,0 +1,32 @@
{#
/**
* @file
* Theme override for the IFrame entity browser. Template copied from core/modules/system/templates/page.html.twig
*
* @see template_preprocess_page()
* @see html.html.twig
*/
#}
<div class="gin-entity-browser">
{#
We ommit most of the regions in this template, which generally includes
messages too. Since this is not desired we try to figure out where messages
live and display them separately.
@see entity_browser_preprocess_page__entity_browser__iframe()
#}
{{ messages }}
<main role="main">
<a id="main-content" tabindex="-1"></a>{# link is in html.html.twig #}
<div class="layout-content">
{{ page.content }}
</div>{# /.layout-content #}
</main>
</div>{# /.layout-container #}
@@ -0,0 +1,15 @@
{#
/**
* @file
* Theme override for a 'checkboxes' #type form element.
*
* Available variables
* - attributes: A list of HTML attributes for the wrapper element.
* - children: The rendered checkboxes.
*
* @see template_preprocess_checkboxes()
*/
@todo: remove this file once https://www.drupal.org/node/1819284 is resolved.
This is identical to core/modules/system/templates/container.html.twig
#}
<div{{ attributes.addClass('form-checkboxes') }}>{{ children }}</div>
@@ -0,0 +1,56 @@
{#
/**
* @file
* Theme override of a datetime form wrapper.
*
* @todo Refactor when https://www.drupal.org/node/3010558 is fixed.
*
* @see template_preprocess_form_element()
*/
#}
{% set show_description_toggle = description_toggle and description %}
{%
set classes = [
'form-item',
'form-datetime-wrapper',
show_description_toggle ? 'help-icon__description-container',
]
%}
{%
set title_classes = [
'form-item__label',
required ? 'js-form-required',
required ? 'form-required',
errors ? 'has-error',
]
%}
{%
set description_classes = [
'form-item__description',
description_display == 'invisible' ? 'visually-hidden',
]
%}
<div {{ attributes.addClass(classes) }}>
{% if show_description_toggle %}
<div class="help-icon">
{% endif %}
{% if title %}
<h4{{ title_attributes.addClass(title_classes) }}>{{ title }}</h4>
{% endif %}
{% if show_description_toggle %}
{{ attach_library('gin/gin_description_toggle') }}
<button class="help-icon__description-toggle"></button>
</div>
{% endif %}
{{ content }}
{% if errors %}
<div class="form-item__error-message">
{{ errors }}
</div>
{% endif %}
{% if description %}
<div{{ description_attributes.addClass(description_classes) }}>
{{ description }}
</div>
{% endif %}
</div>
@@ -0,0 +1,102 @@
{#
/**
* @file
* Theme override for a details element.
*
* Available variables
* - attributes: A list of HTML attributes for the details element.
* - errors: (optional) Any errors for this details element, may not be set.
* - title: (optional) The title of the element, may not be set.
* - description: (optional) The description of the element, may not be set.
* - children: (optional) The children of the element, may not be set.
* - value: (optional) The value of the element, may not be set.
* - accordion: whether the details element should look as an accordion.
* - accordion_item: whether the details element is an item of an accordion
* list.
* - disabled: whether the details is disabled.
*
* @see template_preprocess_details()
* @see claro_preprocess_details()
*/
#}
{#
Prefix 'details' class to avoid collision with Modernizr.
@todo Remove prefix after https://www.drupal.org/node/2981732 has been solved.
#}
{% set show_description_toggle = description_toggle and description %}
{%
set classes = [
'claro-details',
accordion ? 'claro-details--accordion',
accordion_item ? 'claro-details--accordion-item',
show_description_toggle ? 'help-icon__description-container',
]
%}
{%
set content_wrapper_classes = [
'claro-details__wrapper',
'details-wrapper',
accordion ? 'claro-details__wrapper--accordion',
accordion_item ? 'claro-details__wrapper--accordion-item',
]
%}
{%
set inner_wrapper_classes = [
'claro-details__content',
accordion ? 'claro-details__content--accordion',
accordion_item ? 'claro-details__content--accordion-item',
]
%}
{%
set description_classes = [
'claro-details__description',
disabled ? 'is-disabled',
description_display == 'invisible' ? 'visually-hidden',
]
%}
<details{{ attributes.addClass(classes) }}>
{%- if title -%}
{%
set summary_classes = [
'claro-details__summary',
required ? 'js-form-required',
required ? 'form-required',
accordion ? 'claro-details__summary--accordion',
accordion_item ? 'claro-details__summary--accordion-item',
]
%}
<summary{{ summary_attributes.addClass(summary_classes) }}>
{{- title -}}
<span class="required-mark"></span>
{% if show_description_toggle %}
{{ attach_library('gin/gin_description_toggle') }}
<button class="help-icon__description-toggle"></button>
{% endif %}
</summary>
{%- endif -%}
<div{{ content_attributes.addClass(content_wrapper_classes) }}>
{% if accordion or accordion_item %}
<div{{ create_attribute({class: inner_wrapper_classes}) }}>
{% endif %}
{% if errors %}
<div class="form-item form-item--error-message">
{{ errors }}
</div>
{% endif %}
{%- if description -%}
<div{{ create_attribute().addClass(description_classes) }}>{{ description }}</div>
{%- endif -%}
{%- if children -%}
{{ children }}
{%- endif -%}
{%- if value -%}
{{ value }}
{%- endif -%}
{% if accordion or accordion_item %}
</div>
{% endif %}
</div>
</details>
@@ -0,0 +1,112 @@
{#
/**
* @file
* Theme override for a fieldset element and its children.
*
* Available variables:
* - attributes: HTML attributes for the fieldset element.
* - errors: (optional) Any errors for this fieldset element, may not be set.
* - required: Boolean indicating whether the fieldset element is required.
* - legend: The legend element containing the following properties:
* - title: Title of the fieldset, intended for use as the text of the legend.
* - attributes: HTML attributes to apply to the legend.
* - description: The description element containing the following properties:
* - content: The description content of the fieldset.
* - attributes: HTML attributes to apply to the description container.
* - description_display: Description display setting. It can have these values:
* - before: The description is output before the element.
* - after: The description is output after the element (default).
* - invisible: The description is output after the element, hidden visually
* but available to screen readers.
* - children: The rendered child elements of the fieldset.
* - prefix: The content to add before the fieldset children.
* - suffix: The content to add after the fieldset children.
*
* @see template_preprocess_fieldset()
* @see claro_preprocess_fieldset()
*/
#}
{% set show_description_toggle = description_toggle and description.content %}
{%
set classes = [
'fieldset',
attributes.hasClass('fieldgroup') ? 'fieldset--group',
'js-form-item',
'form-item',
'js-form-wrapper',
'form-wrapper',
show_description_toggle ? 'help-icon__description-container',
]
%}
{%
set wrapper_classes = [
'fieldset__wrapper',
attributes.hasClass('fieldgroup') ? 'fieldset__wrapper--group',
]
%}
{%
set legend_span_classes = [
'fieldset__label',
attributes.hasClass('fieldgroup') ? 'fieldset__label--group',
required ? 'js-form-required',
required ? 'form-required',
]
%}
{%
set legend_classes = [
'fieldset__legend',
attributes.hasClass('fieldgroup') and not attributes.hasClass('form-composite') ? 'fieldset__legend--group',
attributes.hasClass('form-composite') ? 'fieldset__legend--composite',
title_display == 'invisible' ? 'fieldset__legend--invisible' : 'fieldset__legend--visible',
]
%}
{%
set description_classes = [
'fieldset__description',
show_description_toggle == 'invisible' ? 'visually-hidden',
]
%}
<fieldset{{ attributes.addClass(classes) }}>
{% if show_description_toggle %}
<div class="help-icon">
{% endif %}
{# Always wrap fieldset legends in a <span> for CSS positioning. #}
{% if legend.title %}
<legend{{ legend.attributes.addClass(legend_classes) }}>
<span{{ legend_span.attributes.addClass(legend_span_classes) }}>{{ legend.title }}</span>
</legend>
{% endif %}
{% if show_description_toggle %}
{{ attach_library('gin/gin_description_toggle') }}
<button class="help-icon__description-toggle"></button>
</div>
{% endif %}
<div{{ content_attributes.addClass(wrapper_classes) }}>
{% if description_display == 'before' and description.content %}
<div{{ description.attributes.addClass(description_classes) }}>{{ description.content }}</div>
{% endif %}
{% if inline_items %}
<div class="container-inline">
{% endif %}
{% if prefix %}
<span class="fieldset__prefix">{{ prefix }}</span>
{% endif %}
{{ children }}
{% if suffix %}
<span class="fieldset__suffix">{{ suffix }}</span>
{% endif %}
{% if errors %}
<div class="fieldset__error-message">
{{ errors }}
</div>
{% endif %}
{% if description_display in ['after', 'invisible'] and description.content %}
<div{{ description.attributes.addClass(description_classes) }}>{{ description.content }}</div>
{% endif %}
{% if inline_items %}
</div>
{% endif %}
</div>
</fieldset>
@@ -0,0 +1,86 @@
{#
/**
* @file
* Theme override for a form element.
*
* @see template_preprocess_form_element()
*/
#}
{#
Most of core-provided js assumes that the CSS class pattern js-form-item-[something] or
js-form-type-[something] exists on form items. We have to keep them.
#}
{% set show_description_toggle = description_toggle and description.content %}
{%
set classes = [
'js-form-item',
'form-item',
'js-form-type-' ~ type|clean_class,
'form-type--' ~ type|clean_class,
type in ['checkbox', 'radio'] ? 'form-type--boolean',
'js-form-item-' ~ name|clean_class,
'form-item--' ~ name|clean_class,
title_display not in ['after', 'before'] ? 'form-item--no-label',
disabled == 'disabled' ? 'form-item--disabled',
errors ? 'form-item--error',
show_description_toggle ? 'help-icon__description-container'
]
%}
{%
set description_classes = [
'form-item__description',
description_display == 'invisible' ? 'visually-hidden',
]
%}
<div{{ attributes.addClass(classes) }}>
{% if label_display in ['before', 'invisible'] %}
{% if show_description_toggle %}
<div class="help-icon">
{{ label }}
{{ attach_library('gin/gin_description_toggle') }}
<button class="help-icon__description-toggle"></button>
</div>
{% else %}
{{ label }}
{% endif %}
{% endif %}
{% if show_description_toggle %}
<div class="help-icon__element-has-description">
{% endif %}
{% if prefix is not empty %}
<span class="form-item__prefix{{disabled == 'disabled' ? ' is-disabled'}}">{{ prefix }}</span>
{% endif %}
{% if description_display == 'before' and description.content %}
<div{{ description.attributes.addClass(description_classes) }}>
{{ description.content }}
</div>
{% endif %}
{{ children }}
{% if suffix is not empty %}
<span class="form-item__suffix{{disabled == 'disabled' ? ' is-disabled'}}">{{ suffix }}</span>
{% endif %}
{% if label_display == 'after' %}
{% if show_description_toggle %}
<div class="help-icon">
{{ label }}
{{ attach_library('gin/gin_description_toggle') }}
<button class="help-icon__description-toggle"></button>
</div>
{% else %}
{{ label }}
{% endif %}
{% endif %}
{% if show_description_toggle %}
</div>
{% endif %}
{% if errors %}
<div class="form-item__error-message">
{{ errors }}
</div>
{% endif %}
{% if description_display in ['after', 'invisible'] and description.content %}
<div{{ description.attributes.addClass(description_classes) }}>
{{ description.content }}
</div>
{% endif %}
</div>
@@ -0,0 +1,25 @@
{#
/**
* @file
* Theme override for an 'input' #type form element.
*
* Available variables:
* - attributes: A list of HTML attributes for the input element.
* - children: Optional additional rendered elements.
*
* @see template_preprocess_input()
* @see claro_preprocess_input()
*/
#}
{% if autocomplete_message %}
<div class="claro-autocomplete">
<input{{ attributes }}/>
<div hidden class="claro-autocomplete__message">{{autocomplete_message}}</div>
</div>
{{ children }}
{% else %}
<input{{ attributes }}/>{{ children }}
<span class="checkbox-toggle">
<span class="checkbox-toggle__inner"></span>
</span>
{% endif %}
@@ -0,0 +1,22 @@
{#
/**
* @file
* Theme override for an 'input' #type form element.
*
* Available variables:
* - attributes: A list of HTML attributes for the input element.
* - children: Optional additional rendered elements.
*
* @see template_preprocess_input()
* @see claro_preprocess_input()
*/
#}
{% if autocomplete_message %}
<div class="claro-autocomplete">
<input{{ attributes }}/>
<div hidden class="claro-autocomplete__message">{{autocomplete_message}}</div>
</div>
{{ children }}
{% else %}
<input{{ attributes }}/>{{ children }}
{% endif %}
@@ -0,0 +1,14 @@
{#
/**
* @file
* Theme override for an 'input' #type form element.
*
* Available variables:
* - attributes: A list of HTML attributes for the input element.
* - children: Optional additional rendered elements.
*
* @see template_preprocess_input()
*/
#}
<input{{ attributes.addClass('button--small') }} />{{ children }}
@@ -0,0 +1,63 @@
{#
/**
* @file
* Theme override for a set of links.
*
* Available variables:
* - attributes: Attributes for the UL containing the list of links.
* - links: Links to be output.
* Each link will have the following elements:
* - link: (optional) A render array that returns a link. See
* template_preprocess_links() for details how it is generated.
* - text: The link text.
* - attributes: HTML attributes for the list item element.
* - text_attributes: (optional) HTML attributes for the span element if no
* 'url' was supplied.
* - heading: (optional) A heading to precede the links.
* - text: The heading text.
* - level: The heading level (e.g. 'h2', 'h3').
* - attributes: (optional) A keyed list of attributes for the heading.
* If the heading is a string, it will be used as the text of the heading and
* the level will default to 'h2'.
*
* Headings should be used on navigation menus and any list of links that
* consistently appears on multiple pages. To make the heading invisible use
* the 'visually-hidden' CSS class. Do not use 'display:none', which
* removes it from screen readers and assistive technology. Headings allow
* screen reader and keyboard only users to navigate to or skip the links.
* See http://juicystudio.com/article/screen-readers-display-none.php and
* http://www.w3.org/TR/WCAG-TECHS/H42.html for more information.
*
* @see template_preprocess_links()
*/
#}
{% if links -%}
{%- if heading -%}
{%- if heading.level -%}
<{{ heading.level }}{{ heading.attributes }}>{{ heading.text }}</{{ heading.level }}>
{%- else -%}
<h2{{ heading.attributes }}>{{ heading.text }}</h2>
{%- endif -%}
{%- endif -%}
<ul{{ attributes.addClass('dropbutton--gin') }}>
{%- for item in links -%}
{% if loop.index == 2 %}
<li class="dropbutton__item">
<ul class="dropbutton__items">
{% endif %}
<li{{ item.attributes.addClass('dropbutton__item') }}>
{%- if item.link -%}
{{ item.link }}
{%- elseif item.text_attributes -%}
<span{{ item.text_attributes }}>{{ item.text }}</span>
{%- else -%}
{{ item.text }}
{%- endif -%}
</li>
{% if loop.length > 1 and loop.last %}
</ul>
</li>
{% endif %}
{%- endfor -%}
</ul>
{%- endif %}
@@ -0,0 +1,43 @@
{#
/**
* @file
* Theme override for a text format-enabled form element.
*
* @todo Remove when https://www.drupal.org/node/3016346 and
* https://www.drupal.org/node/3016343 are fixed.
*
* Available variables:
* - children: Text format element children.
* - description: Text format element description.
* - attributes: HTML attributes for the containing element.
* - aria_description: Flag for whether or not an ARIA description has been
* added to the description container.
* - description_attributes: attributes for the description.
* @see https://www.drupal.org/node/3016343
* - disabled: An indicator for whether the associated form element is disabled,
* added by this theme.
* @see https://www.drupal.org/node/3016346
*
* @see template_preprocess_text_format_wrapper()
*/
#}
{%
set classes = [
'js-form-item',
'form-item',
description_toggle ? 'help-icon__description-container',
]
%}
<div{{ attributes.addClass(classes) }}>
{{ children }}
{% if description %}
{%
set description_classes = [
aria_description ? 'form-item__description',
disabled ? 'is-disabled',
description_display == 'invisible' ? 'visually-hidden',
]
%}
<div{{ description_attributes.addClass(description_classes) }}>{{ description }}</div>
{% endif %}
</div>
+56
View File
@@ -0,0 +1,56 @@
{#
/**
* @file
* Theme override for the basic structure of a single Drupal page.
*
* Variables:
* - logged_in: A flag indicating if user is logged in.
* - root_path: The root path of the current page (e.g., node, admin, user).
* - node_type: The content type for the current node, if the page is a node.
* - head_title: List of text elements that make up the head_title variable.
* May contain one or more of the following:
* - title: The title of the page.
* - name: The name of the site.
* - slogan: The slogan of the site.
* - page_top: Initial rendered markup. This should be printed before 'page'.
* - page: The rendered page markup.
* - page_bottom: Closing rendered markup. This variable should be printed after
* 'page'.
* - db_offline: A flag indicating if the database is offline.
* - placeholder_token: The token for generating head, css, js and js-bottom
* placeholders.
*
* @see template_preprocess_html()
*/
#}
{%
set body_classes = [
logged_in ? 'user-logged-in',
not root_path ? 'path-frontpage' : 'path-' ~ root_path|clean_class,
node_type ? 'page-node-type-' ~ node_type|clean_class,
db_offline ? 'db-offline',
]
%}
<!DOCTYPE html>
<html{{ html_attributes }}>
<head>
<head-placeholder token="{{ placeholder_token }}">
<title>{{ head_title|safe_join(' | ') }}</title>
<css-placeholder token="{{ placeholder_token }}">
<js-placeholder token="{{ placeholder_token }}">
</head>
<body{{ attributes.addClass(body_classes) }}>
{#
Keyboard navigation/accessibility link to main content section in
page.html.twig.
#}
<a href="#main-content" class="visually-hidden focusable skip-link">
{{ 'Skip to main content'|t }}
</a>
{{ page_top }}
{{ page }}
{{ page_bottom }}
<js-bottom-placeholder token="{{ placeholder_token }}">
</body>
</html>
@@ -0,0 +1,43 @@
{% set item_id = 'item-' ~ title|clean_class %}
<div class="admin-toolbar__item toolbar-block">
<ul class="toolbar-menu">
{% if help_enabled %}
<li class="toolbar-menu__item toolbar-menu__item--level-1">
<a href="{{ path('help.main') }}" class="toolbar-link toolbar-link--has-icon toolbar-link--help">
<span>{{ 'Help'|t }}</span>
</a>
</li>
{% endif %}
<li class="toolbar-menu__item toolbar-menu__item--level-1">
<button aria-controls="admin-toolbar" aria-expanded="true" class="toolbar-link toolbar-link--has-icon toolbar-link--sidebar-toggle sidebar-toggle">
{# @todo refactor ID out this <span>. #}
<span id="sidebar-state" class="toolbar-link__label">{{ 'Collapse sidebar'|t }}</span>
</button>
</li>
<li class="toolbar-menu__item toolbar-menu__item--has-dropdown toolbar-menu__item--user toolbar-menu__item--level-1">
<button class="toolbar-link toolbar-link--has-icon toolbar-link--{{ menu_name|clean_class }}" data-url="{{ url }}">
<span class="toolbar-link__action">{{ 'Extend'|t }}</span>
<span class="toolbar-link__label">{{ title }}</span>
</button>
<div class="toolbar-menu__submenu">
<div class="toolbar-menu__arrow-ref"></div>
<ul class="toolbar-menu">
<li class="toolbar-menu__item toolbar-menu__item--to-title">
<button class="toolbar-link toolbar-link--has-icon toolbar-link--{{ menu_name|clean_class }}" tabindex="-1">
<span class="toolbar-link__action">{{ 'Extend'|t }}</span>
<span class="toolbar-link__label">{{ title }}</span>
</button>
</li>
{% for item in items %}
<li class="toolbar-menu__item toolbar-menu__item--level-2">
<a href="{{ item.url }}" class="toolbar-link">
<span>{{ item.title }}</span>
</a>
</li>
{% endfor %}
</ul>
</div>
</li>
</ul>
</div>
@@ -0,0 +1,68 @@
{% import _self as menus %}
<div class="admin-toolbar__item toolbar-block">
{% set menu_heading_id = 'menu--' ~ menu_name %}
<h2 id="{{ menu_heading_id }}" class="toolbar-block__title visually-hidden focusable">{{ title }}</h2>
<ul class="toolbar-menu toolbar-menu toolbar-block__content toolbar-block__content--{{ menu_name }}" aria-toolbar-link__labelledby="{{ menu_heading_id }}">
{{ menus.menu_items(items, attribute) }}
</ul>
</div>
{% macro menu_items(items, attributes) %}
{% for key, item in items %}
{% set item_class = 'toolbar-link--' ~ item.class|clean_class %}
<li id="{{ item_id }}" class="{{ item.below ? 'toolbar-menu__item--has-dropdown' }} toolbar-menu__item toolbar-menu__item--level-1" data-url="{{ item.url }}">
{% if item.below is empty %}
{% if item.url %}
<a href="{{ item.url }}" class="toolbar-link toolbar-link--has-icon {{ item_class }}">
<span>{{ item.title }}</span>
</a>
{% else %}
<button class="toolbar-link toolbar-link--has-icon {{ item_class }}">
<span>{{ item.title }}</span>
</button>
{% endif %}
{% endif %}
{% if item.below %}
<button class="toolbar-link toolbar-link--has-icon {{ item_class }}">
<span class="toolbar-link__action">{{ 'Extend'|t }}</span>
<span class="toolbar-link__label">{{ item.title }}</span>
</button>
<div class="toolbar-menu__submenu">
<div class="toolbar-menu__arrow-ref"></div>
<ul class="toolbar-menu">
<li class="toolbar-menu__item toolbar-menu__item--to-title">
<button class="toolbar-link toolbar-link--has-icon {{ item_class }}" tabindex="-1" data-url="{{ item.url }}">
<span class="toolbar-link__action">{{ 'Extend'|t }}</span>
<span class="toolbar-link__label">{{ item.title }}</span>
</button>
</li>
{% for item in item.below %}
<li class="{{ item.below ? 'toolbar-menu__item--has-dropdown'}} toolbar-menu__item toolbar-menu__item--level-2">
{% if item.below is empty %}
<a href="{{ item.url }}" class="toolbar-link">
<span>{{ item.title }}</span>
</a>
{% endif %}
{% if item.below %}
<button class="toolbar-link" aria-expanded="false">
<span class="toolbar-link__action">{{ 'Extend'|t }}</span>
<span class="toolbar-link__label">{{ item.title }}</span>
</button>
<ul class="toolbar-menu">
{% for item in item.below %}
<li class="toolbar-menu__item toolbar-menu__item--level-3">
<a href="{{ item.url }}" class="toolbar-link">
<span class="toolbar-link__label">{{ item.title }}</span>
</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
{% endif %}
</li>
{% endfor %}
{% endmacro %}
@@ -0,0 +1,32 @@
{% set menu_id = 'menu-top-menus' %}
{% set item_id = 'item-' ~ class|clean_class %}
<div class="admin-toolbar__item toolbar-block menu--shortcuts">
<h2 id="{{ menu_id }}" class="toolbar-block__title visually-hidden">{{ 'Top Menus'|t }}</h2>
<ul class="toolbar-menu toolbar-block__content" aria-toolbar-link__labelledby="{{ menu_id }}">
<li id="{{ item_id }}" class="toolbar-menu__item toolbar-menu__item--has-dropdown toolbar-menu__item--level-1">
<button class="toolbar-link toolbar-link--has-icon toolbar-link--{{ menu_name|clean_class }}">
<span class="toolbar-link__action">{{ 'Extend'|t }}</span>
<span class="toolbar-link__label">{{ title }}</span>
</button>
<div class="toolbar-menu__submenu">
<div class="toolbar-menu__arrow-ref"></div>
<ul class="toolbar-menu">
<li class="toolbar-menu__item toolbar-menu__item--to-title toolbar-menu__item--to-title">
<button class="toolbar-link toolbar-link--has-icon toolbar-link--{{ menu_name|clean_class }}" tabindex="-1" data-url="{{ url }}">
<span class="toolbar-link__action">{{ 'Extend'|t }}</span>
<span class="toolbar-link__label">{{ title }}</span>
</button>
</li>
{% for item in links %}
<li class="toolbar-menu__item toolbar-menu__item--level-2">
<a href="{{ item.url }}" class="toolbar-link">
<span class="toolbar-link__label">{{ item.title }}</span>
</a>
</li>
{% endfor %}
</ul>
</div>
</li>
</ul>
</div>
@@ -0,0 +1,48 @@
{#
/**
* @file
* Theme override for a section of the help page.
*
* This implementation divides the links into 4 columns.
*
* Available variables:
* - title: The section title.
* - description: The description text for the section.
* - links: Links to display in the section.
* - empty: Text to display if there are no links.
*/
#}
<div class="layer-wrapper gin-layer-wrapper clearfix">
<h2>{{ title }}</h2>
<p>{{ description }}</p>
{% if links %}
{# Calculate the column length, to divide links into 4 columns. #}
{% set size = links|length // 4 %}
{% if size * 4 < links|length %}
{% set size = size + 1 %}
{% endif %}
{# Output the links in 4 columns. #}
{% set count = 0 %}
{% for link in links %}
{% if count == 0 %}
{# Start a new column. #}
<div class="layout-column layout-column--quarter"><ul>
{% endif %}
<li>{{ link }}</li>
{% set count = count + 1 %}
{% if count >= size %}
{# End the current column. #}
{% set count = 0 %}
</ul></div>
{% endif %}
{% endfor %}
{# End the last column, if one is open. #}
{% if count > 0 %}
</ul></div>
{% endif %}
{% else %}
<p>{{ empty }}</p>
{% endif %}
</div>
@@ -0,0 +1,76 @@
{#
/**
* @file
* Theme override for status messages.
*
* Displays status, error, and warning messages, grouped by type.
*
* An invisible heading identifies the messages for assistive technology.
* Sighted users see a colored box. See http://www.w3.org/TR/WCAG-TECHS/H69.html
* for info.
*
* Add an ARIA label to the contentinfo area so that assistive technology
* user agents will better describe this landmark.
*
* Available variables:
* - message_list: List of messages to be displayed, grouped by type.
* - status_headings: List of all status types.
* - attributes: HTML attributes for the element, including:
* - class: HTML classes.
* - title_ids: A list of unique ids keyed by message type.
*
* @see claro_preprocess_status_messages().
*/
#}
{{ attach_library('gin/gin_messages') }}
<div data-drupal-messages class="messages-list">
<div class="messages__wrapper">
{% for type, messages in message_list %}
{%
set classes = [
'messages-list__item',
'messages',
'messages--' ~ type,
]
%}
{%
set is_message_with_title = status_headings[type]
%}
{%
set is_message_with_icon = type in ['error', 'status', 'warning']
%}
<div role="contentinfo" aria-labelledby="{{ title_ids[type] }}"{{ attributes.addClass(classes)|without('role', 'aria-label') }}>
{% if type == 'error' %}
<div role="alert">
{% endif %}
{% if is_message_with_title or is_message_with_icon %}
<div class="messages__header">
{% if is_message_with_title %}
<h2 id="{{ title_ids[type] }}" class="messages__title">
{{ status_headings[type] }}
</h2>
{% endif %}
</div>
{% endif %}
<button type="button" class="button button--dismiss" title="{{ 'Dismiss'|t }}"><span class="icon-close"></span>{{ 'Close'|t }}</button>
<div class="messages__content">
{% if messages|length > 1 %}
<ul class="messages__list">
{% for message in messages %}
<li class="messages__item">{{ message }}</li>
{% endfor %}
</ul>
{% else %}
{{ messages|first }}
{% endif %}
</div>
{% if type == 'error' %}
</div>
{% endif %}
</div>
{# Remove type specific classes. #}
{% set attributes = attributes.removeClass(classes) %}
{% endfor %}
</div>
</div>
@@ -0,0 +1,48 @@
<aside class="admin-toolbar" id="admin-toolbar">
{# This lil' div will get the Drupal.displace() attributes added to it via JS. #}
<div class="admin-toolbar__displace-placeholder"></div>
{# ---- Start Gin Custom ---- #}
{% if icon_path %}
<div class="admin-toolbar__header">
<a class="admin-toolbar__logo" href="/">
<img alt="{{ 'Home'|t }}" src="{{ file_url(icon_path) }}" loading="eager" width=" 32" height=" 32">
</a>
</div>
{% endif %}
{# ---- End Gin Custom ---- #}
{% set title_menu = 'admin-toolbar' %}
<h2 id="{{ title_menu }}" class="visually-hidden">{{ 'Administrative toolbar'|t }}</h2>
{# @todo - We should get rid of this ID below. #}
<nav id="menu-builder" class="admin-toolbar__content" aria-labelledby="{{ title_menu }}">
{# ---- Start Gin Custom ---- #}
{% if not icon_path %}
<div class="navigation-menu-wrapper menu--logo">
<h2 id="menu--logo" class="menu-title visually-hidden">{{ 'Home'|t }}</h2>
<ul class="toolbar-menu" data-once="toolbar-menu" aria-labelledby="menu--logo">
<li class="toolbar-menu__item toolbar-menu__item--level-1">
<a href="/" class="toolbar-link toolbar-link--has-icon toolbar-link--gin-home">
<span>{{ 'Home'|t }}</span>
</a>
</li>
</ul>
</div>
{% endif %}
{# ---- End Gin Custom ---- #}
{{ menu_top }}
{% for section in menu_middle %}
{{ section }}
{% endfor %}
</nav>
{# @todo - This sticky menu should exist under the <nav> landmark element above. #}
<div class="admin-toolbar__sticky-section">
{{ menu_bottom }}
</div>
</aside>
<script>
if (localStorage.getItem('Drupal.navigation.sidebarExpanded') !== 'false') {
document.documentElement.classList.add('admin-toolbar-expanded');
}
</script>
@@ -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 %}
@@ -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>
@@ -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 %}
@@ -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>
@@ -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>
@@ -0,0 +1,40 @@
{#
/**
* @file
* Theme override for a node edit form.
*
* Two column template for the node add/edit form.
*
* This template will be used when a node edit form specifies 'node_edit_form'
* as its #theme callback. Otherwise, by default, node add/edit forms will be
* themed by form.html.twig.
*
* Available variables:
* - form: The node add/edit form.
*
* @see claro_form_node_form_alter()
*/
#}
<div class="layout-node-form clearfix">
<div class="layout-region layout-region-node-main">
{{ form|without('advanced', 'footer', 'actions', 'gin_actions', 'gin_sidebar', 'gin_sidebar_toggle') }}
</div>
<div class="layout-region layout-region-node-secondary" id="gin_sidebar">
<div class="layout-region__content">
{{ form.advanced }}
{{ form.gin_sidebar_toggle }}
</div>
</div>
<div class="layout-node-form__actions">
{{ form.gin_actions }}
</div>
</div>
{% if gin_layout_paragraphs == 1 %}
<style>
.layout-node-form {
--gin-lp-layout: "{{ 'Layout'|t }}";
--gin-lp-content: "{{ 'Content'|t }}";
}
</style>
{% endif %}
@@ -0,0 +1 @@
{% extends '@gin/page/page--node.html.twig' %}
@@ -0,0 +1 @@
{% extends '@gin/page/page--node.html.twig' %}
@@ -0,0 +1,52 @@
{#
/**
* @file
* Claro's theme implementation to display a single Drupal page.
*
* The doctype, html, head, and body tags are not in this template. Instead
* they can be found in the html.html.twig template normally located in the
* core/modules/system directory.
*
* Available variables:
*
* General utility variables:
* - base_path: The base URL path of the Drupal installation. Will usually be
* "/" unless you have installed Drupal in a sub-directory.
* - is_front: A flag indicating if the current page is the front page.
* - logged_in: A flag indicating if the user is registered and signed in.
* - is_admin: A flag indicating if the user has permission to access
* administration pages.
*
* Site identity:
* - front_page: The URL of the front page. Use this instead of base_path when
* linking to the front page. This includes the language domain or prefix.
*
* Page content (in order of occurrence in the default page.html.twig):
* - node: Fully loaded node, if there is an automatically-loaded node
* associated with the page and the node ID is the second argument in the
* page's path (e.g. node/12345 and node/12345/revisions, but not
* comment/reply/12345).
*
* Regions:
* - page.header: Items for the header region.
* - page.pre_content: Items for the pre-content region.
* - page.breadcrumb: Items for the breadcrumb region.
* - page.highlighted: Items for the highlighted region.
* - page.help: Dynamic help text, mostly for admin pages.
* - page.content: The main content of the current page.
*
* @see template_preprocess_page()
* @see html.html.twig
*/
#}
<div class="layout-container">
{{ page.pre_content }}
<main class="page-content clearfix" role="main">
{% if page.content.local_actions_block %}
{{ page.content|without(local_actions_block) }}
{% else %}
{{ page.content }}
{% endif %}
</main>
</div>
@@ -0,0 +1 @@
{% extends '@gin/page/page.html.twig' %}
@@ -0,0 +1,45 @@
{#
/**
* @file
* Claro's theme implementation to display a single Drupal page.
*
* The doctype, html, head, and body tags are not in this template. Instead
* they can be found in the html.html.twig template normally located in the
* core/modules/system directory.
*
* Available variables:
*
* General utility variables:
* - base_path: The base URL path of the Drupal installation. Will usually be
* "/" unless you have installed Drupal in a sub-directory.
* - is_front: A flag indicating if the current page is the front page.
* - logged_in: A flag indicating if the user is registered and signed in.
* - is_admin: A flag indicating if the user has permission to access
* administration pages.
*
* Site identity:
* - front_page: The URL of the front page. Use this instead of base_path when
* linking to the front page. This includes the language domain or prefix.
*
* Page content (in order of occurrence in the default page.html.twig):
* - node: Fully loaded node, if there is an automatically-loaded node
* associated with the page and the node ID is the second argument in the
* page's path (e.g. node/12345 and node/12345/revisions, but not
* comment/reply/12345).
*
* Regions:
* - page.header: Items for the header region.
* - page.pre_content: Items for the pre-content region.
* - page.breadcrumb: Items for the breadcrumb region.
* - page.highlighted: Items for the highlighted region.
* - page.help: Dynamic help text, mostly for admin pages.
* - page.content: The main content of the current page.
*
* @see template_preprocess_page()
* @see html.html.twig
*/
#}
<div class="page-wrapper__node-edit-form">
{% include '@gin/page/page.html.twig' %}
</div>
@@ -0,0 +1,100 @@
{#
/**
* @file
* Claro's theme implementation to display a single Drupal page.
*
* The doctype, html, head, and body tags are not in this template. Instead
* they can be found in the html.html.twig template normally located in the
* core/modules/system directory.
*
* Available variables:
*
* General utility variables:
* - base_path: The base URL path of the Drupal installation. Will usually be
* "/" unless you have installed Drupal in a sub-directory.
* - is_front: A flag indicating if the current page is the front page.
* - logged_in: A flag indicating if the user is registered and signed in.
* - is_admin: A flag indicating if the user has permission to access
* administration pages.
*
* Site identity:
* - front_page: The URL of the front page. Use this instead of base_path when
* linking to the front page. This includes the language domain or prefix.
*
* Page content (in order of occurrence in the default page.html.twig):
* - node: Fully loaded node, if there is an automatically-loaded node
* associated with the page and the node ID is the second argument in the
* page's path (e.g. node/12345 and node/12345/revisions, but not
* comment/reply/12345).
*
* Regions:
* - page.header: Items for the header region.
* - page.pre_content: Items for the pre-content region.
* - page.breadcrumb: Items for the breadcrumb region.
* - page.highlighted: Items for the highlighted region.
* - page.help: Dynamic help text, mostly for admin pages.
* - page.content: The main content of the current page.
*
* @see template_preprocess_page()
* @see html.html.twig
*/
#}
{% set page_title_block = active_admin_theme ~ '_page_title' %}
{% set local_actions_block = active_admin_theme ~ '_local_actions' %}
<div class="gin-secondary-toolbar layout-container">
<div class="gin-breadcrumb-wrapper">
{% if route_name == 'entity.node.canonical' %}
<div class="region region-breadcrumb gin-region-breadcrumb">
<nav class="breadcrumb" role="navigation" aria-labelledby="system-breadcrumb">
<h2 id="system-breadcrumb" class="visually-hidden">{{ 'Breadcrumb'|t }}</h2>
<ol class="breadcrumb__list">
<li class="breadcrumb__item">
{% if entity_edit_url and entity_title %}
<a class="breadcrumb__link gin-back-to-admin" href="{{ entity_edit_url }}">{{ 'Edit %title'|t({ '%title': entity_title }) }}</a>
{% else %}
<a class="breadcrumb__link gin-back-to-admin" href="{{ path('system.admin_content') }}">{{ 'Back to Administration'|t }}</a>
{% endif %}
</li>
</ol>
</nav>
</div>
{% else %}
{{ page.breadcrumb }}
{% endif %}
</div>
{{ page.gin_secondary_toolbar }}
</div>
<div class="region-sticky-watcher"></div>
<header class="region region-sticky">
<div class="layout-container region-sticky__items">
<div class="region-sticky__items__inner">
{{ page.header[page_title_block] }}
{{ page.content[local_actions_block] }}
</div>
</div>
</header>
<div class="sticky-shadow"></div>
<div class="content-header clearfix">
<div class="layout-container">
{{ page.header|without(page_title_block) }}
</div>
</div>
<div class="layout-container">
{{ page.pre_content }}
<main class="page-content clearfix" role="main">
<div class="visually-hidden"><a id="main-content" tabindex="-1"></a></div>
{{ page.highlighted }}
{% if page.help %}
<div class="help">
{{ page.help }}
</div>
{% endif %}
{{ page.content|without(local_actions_block) }}
</main>
</div>
@@ -0,0 +1,26 @@
{#
/**
* @file
* Theme override to display a region.
*
* Available variables:
* - content: The content for this region, typically blocks.
* - attributes: HTML attributes for the region <div>.
* - region: The name of the region variable as defined in the theme's
* .info.yml file.
*
* @see template_preprocess_region()
*/
#}
{%
set classes = [
'region',
'region-' ~ region|clean_class,
]
%}
{% if content %}
<div{{ attributes.addClass(classes) }}>
{{ content }}
</div>
{% endif %}
@@ -0,0 +1,27 @@
{#
/**
* @file
* Theme override for status report counter.
*
* Available variables:
* - amount: The number shown on counter.
* - text: The text shown on counter.
* - severity: The severity of the counter.
*
* @ingroup themeable
*/
#}
{%
set classes = [
'system-status-counter',
'system-status-counter--' ~ severity,
'gin-layer-wrapper-shadow',
]
%}
<span{{ attributes.addClass(classes) }}>
<span class="system-status-counter__status-icon system-status-counter__status-icon--{{ severity }}"></span>
<span class="system-status-counter__status-title">
<span class="system-status-counter__title-count">{{ amount }} {{ text }}</span>
<span class="system-status-counter__details"><a href="#{{ severity }}" ><span class="visually-hidden">{{ text }} </span>Details</a></span>
</span>
</span>
@@ -0,0 +1,100 @@
{#
/**
* @file
* Theme override for status report general info.
*
* Available variables:
* - drupal: The status of Drupal installation:
* - value: The current status of Drupal installation.
* - description: The description for current status of Drupal installation.
* - cron: The status of cron:
* - value: The current status of cron.
* - description: The description for current status of cron.
* - cron.run_cron: An array to render a button for running cron.
* - database_system: The status of database system:
* - value: The current status of database system.
* - description: The description for current status of cron.
* - database_system_version: The info about current database version:
* - value: The current version of database.
* - description: The description for current version of database.
* - php: The current version of PHP:
* - value: The status of currently installed PHP version.
* - description: The description for current installed PHP version.
* - php_memory_limit: The info about current PHP memory limit:
* - value: The status of currently set PHP memory limit.
* - description: The description for currently set PHP memory limit.
* - webserver: The info about currently installed web server:
* - value: The status of currently installed web server.
* - description: The description for the status of currently installed web
* server.
*/
#}
<div class="system-status-general-info gin-layer-wrapper">
<h2 class="system-status-general-info__header">{{ 'General System Information'|t }}</h2>
<div class="system-status-general-info__items">
<div class="system-status-general-info__item card">
<span class="system-status-general-info__item-icon system-status-general-info__item-icon--drupal"></span>
<div class="system-status-general-info__item-details">
<h3 class="system-status-general-info__item-title">{{ 'Drupal Version'|t }}</h3>
{{ drupal.value }}
{% if drupal.description %}
<div class="description">{{ drupal.description }}</div>
{% endif %}
</div>
</div>
<div class="system-status-general-info__item card">
<span class="system-status-general-info__item-icon system-status-general-info__item-icon--server"></span>
<div class="system-status-general-info__item-details">
<h3 class="system-status-general-info__item-title">{{ 'Web Server'|t }}</h3>
{{ webserver.value }}
{% if webserver.description %}
<div class="description">{{ webserver.description }}</div>
{% endif %}
</div>
</div>
<div class="system-status-general-info__item card">
<span class="system-status-general-info__item-icon system-status-general-info__item-icon--clock"></span>
<div class="system-status-general-info__item-details">
<h3 class="system-status-general-info__item-title">{{ 'Last Cron Run'|t }}</h3>
{{ cron.value }}
{% if cron.run_cron %}
<div class="system-status-general-info__run-cron">{{ cron.run_cron }}</div>
{% endif %}
{% if cron.description %}
<div class="system-status-general-info__description">{{ cron.description }}</div>
{% endif %}
</div>
</div>
<div class="system-status-general-info__item card">
<span class="system-status-general-info__item-icon system-status-general-info__item-icon--php"></span>
<div class="system-status-general-info__item-details">
<h3 class="system-status-general-info__item-title">{{ 'PHP'|t }}</h3>
<h4 class="system-status-general-info__sub-item-title">{{ 'Version'|t }}</h4>{{ php.value }}
{% if php.description %}
<div class="description">{{ php.description }}</div>
{% endif %}
<h4 class="system-status-general-info__sub-item-title">{{ 'Memory limit'|t }}</h4>{{ php_memory_limit.value }}
{% if php_memory_limit.description %}
<div class="description">{{ php_memory_limit.description }}</div>
{% endif %}
</div>
</div>
<div class="system-status-general-info__item card">
<span class="system-status-general-info__item-icon system-status-general-info__item-icon--database"></span>
<div class="system-status-general-info__item-details">
<h3 class="system-status-general-info__item-title">{{ 'Database'|t }}</h3>
<h4 class="system-status-general-info__sub-item-title">{{ 'Version'|t }}</h4>{{ database_system_version.value }}
{% if database_system_version.description %}
<div class="description">{{ database_system_version.description }}</div>
{% endif %}
<h4 class="system-status-general-info__sub-item-title">{{ 'System'|t }}</h4>{{ database_system.value }}
{% if database_system.description %}
<div class="description">{{ database_system.description }}</div>
{% endif %}
</div>
</div>
</div>
</div>
@@ -0,0 +1,53 @@
{#
/**
* @file
* Theme override to display status report.
*
* - grouped_requirements: Contains grouped requirements.
* Each group contains:
* - title: The title of the group.
* - type: The severity of the group.
* - items: The requirement instances.
* Each requirement item contains:
* - title: The title of the requirement.
* - value: (optional) The requirement's status.
* - description: (optional) The requirement's description.
* - severity_title: The title of the severity.
* - severity_status: Indicates the severity status.
*/
#}
{{ attach_library('core/drupal.collapse') }}
<div class="system-status-report gin-layer-wrapper">
<h2 class="system-status-general-info__header">{{ 'Status Details'|t }}</h2>
{% for group in grouped_requirements %}
<details class="claro-details" open>
<summary id="{{ group.type }}" class="claro-details__summary claro-details__summary--system-status-report">{{ group.title }}</summary>
<div class="claro-details__wrapper claro-details__wrapper--system-status-report">
{% for requirement in group.items %}
<div class="system-status-report__row">
{%
set summary_classes = [
'system-status-report__status-title',
group.type in ['warning', 'error'] ? 'system-status-report__status-icon system-status-report__status-icon--' ~ group.type
]
%}
<div{{ create_attribute({'class': summary_classes}) }} role="button">
{% if requirement.severity_title %}
<span class="visually-hidden">{{ requirement.severity_title }}</span>
{% endif %}
{{ requirement.title }}
</div>
<div class="system-status-report__entry__value">
{{ requirement.value }}
{% if requirement.description %}
<div class="description">{{ requirement.description }}</div>
{% endif %}
</div>
</div>
{% endfor %}
</div>
</details>
{% endfor %}
</div>
@@ -0,0 +1,120 @@
{#
/**
* @file
* Theme override for the Appearance page.
*
* Available variables:
* - attributes: HTML attributes for the main container.
* - theme_groups: A list of theme groups. Each theme group contains:
* - attributes: HTML attributes specific to this theme group.
* - title: Title for the theme group.
* - state: State of the theme group, e.g. installed or uninstalled.
* - themes: A list of themes within the theme group. Each theme contains:
* - attributes: HTML attributes specific to this theme.
* - screenshot: A screenshot representing the theme.
* - description: Description of the theme.
* - name: Theme name.
* - version: The theme's version number.
* - is_default: Boolean indicating whether the theme is the default theme
* or not.
* - is_admin: Boolean indicating whether the theme is the admin theme or
* not.
* - notes: Identifies what context this theme is being used in, e.g.,
* default theme, admin theme.
* - incompatible: Text describing any compatibility issues.
* - module_dependencies: A list of modules that this theme requires.
* - operations: A list of operation links, e.g., Settings, Enable, Disable,
* etc. these links should only be displayed if the theme is compatible.
* - title_id: The unique id of the theme label.
* - description_id: The unique id of the theme description. This is
* undefined if the description is casted to an empty string.
*
* @see template_preprocess_system_themes_page()
* @see claro_preprocess_system_themes_page()
*/
#}
<div{{ attributes }}>
{% for theme_group in theme_groups %}
{%
set theme_group_classes = [
'system-themes-list',
'system-themes-list--' ~ theme_group.state,
'clearfix',
'gin-layer-wrapper',
]
%}
{%
set card_alignment = theme_group.state == 'installed' ? 'horizontal' : 'vertical'
%}
{% if not loop.first %}
<hr>
{% endif %}
<div{{ theme_group.attributes.addClass(theme_group_classes) }}>
<h2 class="system-themes-list__header">{{ theme_group.title }}</h2>
<div class="card-list {{ card_alignment == 'horizontal' ? 'card-list--two-cols' : 'card-list--four-cols' }}">
{% for theme in theme_group.themes %}
{%
set theme_classes = [
theme.is_default ? 'theme-default',
theme.is_admin ? 'theme-admin',
'card',
'card--' ~ card_alignment,
'card-list__item',
]
%}
{%
set theme_title_classes = [
'card__content-item',
'heading-f',
]
%}
{%
set theme_description_classes = [
'card__content-item',
]
%}
<div{{ theme.attributes.addClass(theme_classes).setAttribute('aria-labelledby', theme.title_id).setAttribute('aria-describedby', theme.description_id ?: null) }}>
{% if theme.screenshot %}
<div class="card__image">
{{ theme.screenshot }}
</div>
{% endif %}
<div class="card__content-wrapper">
<div class="card__content">
<h3{{ create_attribute({'id': theme.title_id}).addClass(theme_title_classes) }} id={{ theme.title_id }}>
{{- theme.name }} {{ theme.version -}}
{% if theme.notes %}
({{ theme.notes|safe_join(', ') }})
{%- endif -%}
</h3>
{% if theme.description and theme.description_id %}
<div{{ create_attribute({'id': theme.description_id ?: null}).addClass(theme_description_classes) }}>
{{ theme.description }}
</div>
{%- endif -%}
</div>
<div class="card__footer">
{% if theme.module_dependencies %}
<div class="theme-info__requires">
{{ 'Requires: @module_dependencies'|t({ '@module_dependencies': theme.module_dependencies|render }) }}
</div>
{% endif %}
{# Display operation links only if the theme is compatible. #}
{% if theme.incompatible %}
<small class="incompatible">{{ theme.incompatible }}</small>
{% else %}
{{ theme.operations }}
{% endif %}
</div>
</div>
</div>
{% endfor %}
</div>
</div>
{% endfor %}
</div>
@@ -0,0 +1,122 @@
{#
/**
* @file
* Theme override for displaying a view as a table.
*
* Available variables:
* - attributes: Remaining HTML attributes for the element.
* - class: HTML classes that can be used to style contextually through CSS.
* - title : The title of this group of rows.
* - header: The table header columns.
* - attributes: Remaining HTML attributes for the element.
* - content: HTML classes to apply to each header cell, indexed by
* the header's key.
* - default_classes: A flag indicating whether default classes should be
* used.
* - caption_needed: Is the caption tag needed.
* - caption: The caption for this table.
* - accessibility_description: Extended description for the table details.
* - accessibility_summary: Summary for the table details.
* - rows: Table row items. Rows are keyed by row number.
* - attributes: HTML classes to apply to each row.
* - columns: Row column items. Columns are keyed by column number.
* - attributes: HTML classes to apply to each column.
* - content: The column content.
* - default_classes: A flag indicating whether default classes should be
* used.
* - responsive: A flag indicating whether table is responsive.
* - sticky: A flag indicating whether table header is sticky.
* - summary_element: A render array with table summary information (if any).
*
* @see template_preprocess_views_view_table()
*/
#}
{%
set classes = [
'views-table',
'views-view-table',
'cols-' ~ header|length,
responsive ? 'responsive-enabled',
sticky ? 'sticky-enabled',
]
%}
<div class="gin-table-scroll-wrapper">
<table{{ attributes.addClass(classes) }}>
{% if caption_needed %}
<caption>
{% if caption %}
{{ caption }}
{% else %}
{{ title }}
{% endif %}
{% if (summary_element is not empty) %}
{{ summary_element }}
{% endif %}
</caption>
{% endif %}
{% if header %}
<thead>
<tr>
{% for key, column in header %}
{% if column.default_classes %}
{%
set column_classes = [
'views-field',
'views-field-' ~ fields[key],
]
%}
{% endif %}
<th{{ column.attributes.addClass(column_classes).setAttribute('scope', 'col') }}>
{%- if column.wrapper_element -%}
<{{ column.wrapper_element }}>
{%- if column.url -%}
<a href="{{ column.url }}" title="{{ column.title }}" rel="nofollow">{{ column.content }}{{ column.sort_indicator }}</a>
{%- else -%}
{{ column.content }}{{ column.sort_indicator }}
{%- endif -%}
</{{ column.wrapper_element }}>
{%- else -%}
{%- if column.url -%}
<a href="{{ column.url }}" title="{{ column.title }}" rel="nofollow">{{ column.content }}{{ column.sort_indicator }}</a>
{%- else -%}
{{- column.content }}{{ column.sort_indicator }}
{%- endif -%}
{%- endif -%}
</th>
{% endfor %}
</tr>
</thead>
{% endif %}
<tbody>
{% for row in rows %}
<tr{{ row.attributes }}>
{% for key, column in row.columns %}
{% if column.default_classes %}
{%
set column_classes = [
'views-field'
]
%}
{% for field in column.fields %}
{% set column_classes = column_classes|merge(['views-field-' ~ field]) %}
{% endfor %}
{% endif %}
<td{{ column.attributes.addClass(column_classes) }}>
{%- if column.wrapper_element -%}
<{{ column.wrapper_element }}>
{% for content in column.content %}
{{ content.separator }}{{ content.field_output }}
{% endfor %}
</{{ column.wrapper_element }}>
{%- else -%}
{% for content in column.content %}
{{- content.separator }}{{ content.field_output -}}
{% endfor %}
{%- endif %}
</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
@@ -0,0 +1,95 @@
{#
/**
* @file
* Theme override for a main view template.
*
* Available variables:
* - attributes: Remaining HTML attributes for the element.
* - css_name: A CSS-safe version of the view name.
* - css_class: The user-specified classes names, if any.
* - header: The optional header.
* - footer: The optional footer.
* - rows: The results of the view query, if any.
* - empty: The content to display if there are no rows.
* - pager: The optional pager next/prev links to display.
* - exposed: Exposed widget form/info to display.
* - feed_icons: Optional feed icons to display.
* - more: An optional link to the next page of results.
* - title: Title of the view, only used when displaying in the admin preview.
* - title_prefix: Additional output populated by modules, intended to be
* displayed in front of the view title.
* - title_suffix: Additional output populated by modules, intended to be
* displayed after the view title.
* - attachment_before: An optional attachment view to be displayed before the
* view content.
* - attachment_after: An optional attachment view to be displayed after the
* view content.
* - dom_id: Unique id for every view being printed to give unique class for
* JavaScript.
*
* @see template_preprocess_views_view()
*/
#}
{%
set classes = [
'view',
'view-' ~ id|clean_class,
'view-id-' ~ id,
'view-display-id-' ~ display_id,
dom_id ? 'js-view-dom-id-' ~ dom_id,
]
%}
<div{{ attributes.addClass(classes) }}>
{{ title_prefix }}
{% if title %}
{{ title }}
{% endif %}
{{ title_suffix }}
{% if header %}
<div class="view-header">
{{ header }}
</div>
{% endif %}
{% if exposed %}
<div class="view-filters">
{{ exposed }}
</div>
{% endif %}
{% if attachment_before %}
<div class="attachment attachment-before">
{{ attachment_before }}
</div>
{% endif %}
{% if rows %}
<div class="view-content gin-layer-wrapper">
{{ rows }}
</div>
{% elseif empty %}
<div class="view-empty">
{{ empty }}
</div>
{% endif %}
{% if pager %}
{{ pager }}
{% endif %}
{% if attachment_after %}
<div class="attachment attachment-after">
{{ attachment_after }}
</div>
{% endif %}
{% if more %}
{{ more }}
{% endif %}
{% if footer %}
<div class="view-footer">
{{ footer }}
</div>
{% endif %}
{% if feed_icons %}
<div class="feed-icons">
{{ feed_icons }}
</div>
{% endif %}
</div>