first commit

This commit is contained in:
2024-07-15 12:33:27 +02:00
commit ce50ae282b
22084 changed files with 2623791 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
{#
/**
* @file
* Claro'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.
* - url: URI to the admin section.
* - options: URL options. See \Drupal\Core\Url::fromUri() for details.
* - 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 %}
<dl{{ attributes.addClass('admin-list') }}>
{% for item in content %}
<div{{ create_attribute({class: item_classes}) }}>
<dt class="admin-item__title">{{ item.link }}</dt>
{% if item.description %}
<dd class="admin-item__description">{{ item.description }}</dd>
{% endif %}
</div>
{% endfor %}
</dl>
{% endif %}

View File

@@ -0,0 +1,25 @@
{#
/**
* @file
* Theme override for an administrative page.
*
* Available variables:
* - system_compact_link: Themed link to toggle compact view.
* - containers: An list of administrative blocks keyed by position: left or
* right. Contains:
* - blocks: A list of blocks within a container.
*
* @see template_preprocess_admin_page()
*/
#}
{{ system_compact_link }}
<div class="layout-row clearfix">
{% for container in containers %}
<div class="layout-column layout-column--half">
{% for block in container.blocks %}
{{ block }}
{% endfor %}
</div>
{% endfor %}
</div>

View File

@@ -0,0 +1,21 @@
{#
/**
* @file
* Theme override for a form element in config_translation.
*
* Available variables:
* - element: Array that represents the element shown in the form.
* - source: The source of the translation.
* - translation: The translation for the target language.
*
* @see template_preprocess()
*/
#}
<div class="translation-set layout-row clearfix">
<div class="layout-column layout-column--half translation-set__source">
{{ element.source }}
</div>
<div class="layout-column layout-column--half translation-set__translated">
{{ element.translation }}
</div>
</div>

View File

@@ -0,0 +1,36 @@
{#
/**
* @file
* Theme override for a set of indentation divs.
*
* These <div> tags are used for drag and drop tables.
*
* Available variables:
* - size: Optional. The number of indentations to create.
*/
#}
{% if size > 0 %}{% for i in 1..size %}<div class="js-indentation indentation">
<svg
xmlns="http://www.w3.org/2000/svg"
class="tree"
width="25"
height="25"
viewBox="0 0 25 25">
<path
class="tree__item tree__item-child-ltr tree__item-child-last-ltr tree__item-horizontal tree__item-horizontal-right"
d="M12,12.5 H25"
stroke="#888"/>
<path
class="tree__item tree__item-child-rtl tree__item-child-last-rtl tree__item-horizontal tree__horizontal-left"
d="M0,12.5 H13"
stroke="#888"/>
<path
class="tree__item tree__item-child-ltr tree__item-child-rtl tree__item-child-last-ltr tree__item-child-last-rtl tree__vertical tree__vertical-top"
d="M12.5,12 v-99"
stroke="#888"/>
<path
class="tree__item tree__item-child-ltr tree__item-child-rtl tree__vertical tree__vertical-bottom"
d="M12.5,12 v99"
stroke="#888"/>
</svg>
</div>{% endfor %}{% endif %}

View File

@@ -0,0 +1,75 @@
{#
/**
* @file
* Default theme implementation for the modules listing page.
*
* Displays a list of all packages in a project.
*
* Available variables:
* - modules: Contains multiple module instances. Each module contains:
* - attributes: Attributes on the row.
* - checkbox: A checkbox for enabling the module.
* - name: The human-readable name of the module.
* - id: A unique identifier for interacting with the details element.
* - enable_id: A unique identifier for interacting with the checkbox element.
* - description: The description of the module.
* - machine_name: The module's machine name.
* - version: Information about the module version.
* - requires: A list of modules that this module requires.
* - required_by: A list of modules that require this module.
* - links: A list of administration links provided by the module.
*
* @see template_preprocess_system_modules_details()
*
* @ingroup themeable
*/
#}
<table class="responsive-enabled module-list">
<thead>
<tr>
<th class="checkbox visually-hidden">{{ 'Installed'|t }}</th>
<th class="name visually-hidden">{{ 'Name'|t }}</th>
<th class="description visually-hidden priority-low">{{ 'Description'|t }}</th>
</tr>
</thead>
<tbody>
{% for module in modules %}
<tr{{ module.attributes.addClass('module-list__module') }}>
<td class="module-list__checkbox">
{{ module.checkbox }}
</td>
<td class="module-list__module">
<label id="{{ module.id }}" for="{{ module.enable_id }}" class="module-list__module-name table-filter-text-source">{{ module.name }}</label>
</td>
<td class="expand priority-low module-list__description">
<details class="js-form-wrapper form-wrapper module-list__module-details claro-details" id="{{ module.enable_id }}-description">
<summary aria-controls="{{ module.enable_id }}-description" role="button" aria-expanded="false" class="claro-details__summary module-list__module-summary"><span class="text module-description">{{ module.description }}</span></summary>
<div class="claro-details__wrapper module-details__wrapper">
<div class="module-details__description">
<div class="module-details__requirements">
<div class="module-details__requirement">{{ 'Machine name: <span dir="ltr" class="table-filter-text-source">@machine-name</span>'|t({'@machine-name': module.machine_name}) }}</div>
{% if module.version %}
<div class="module-details__requirement">{{ 'Version: @module-version'|t({'@module-version': module.version}) }}</div>
{% endif %}
{% if module.requires %}
<div class="module-details__requirement">{{ 'Requires: @module-list'|t({'@module-list': module.requires}) }}</div>
{% endif %}
{% if module.required_by %}
<div class="module-details__requirement">{{ 'Required by: @module-list'|t({'@module-list': module.required_by}) }}</div>
{% endif %}
</div>
{% if module.links %}
<div class="module-details__links">
{% for link_type in ['help', 'permissions', 'configure'] %}
{{ module.links[link_type] }}
{% endfor %}
</div>
{% endif %}
</div>
</div>
</details>
</td>
</tr>
{% endfor %}
</tbody>
</table>

View File

@@ -0,0 +1,28 @@
{#
/**
* @file
* Theme override for displaying a tablesort indicator.
*
* Available variables:
* - style: Either 'asc' or 'desc', indicating the sorting direction.
*
* @todo Remove after https://www.drupal.org/node/1973418 is in.
*/
#}
{%
set classes = [
'tablesort',
'tablesort--' ~ style,
]
%}
<span{{ attributes.addClass(classes) }}>
{% if style in ['asc', 'desc'] %}
<span class="visually-hidden">
{% if style == 'asc' -%}
{{ 'Sort ascending'|t }}
{% else -%}
{{ 'Sort descending'|t }}
{% endif %}
</span>
{% endif %}
</span>

View File

@@ -0,0 +1,46 @@
{#
/**
* @file
* Theme override for the version display of a project.
*
* Available variables:
* - attributes: HTML attributes suitable for a container element.
* - title: The title of the project.
* - core_compatibility_details: Render array of core compatibility details.
* - version: A list of data about the latest released version, containing:
* - version: The version number.
* - date: The date of the release.
* - download_link: The URL for the downloadable file.
* - release_link: The URL for the release notes.
* - core_compatible: A flag indicating whether the project is compatible
* with the currently installed version of Drupal core. This flag is not
* set for the Drupal core project itself.
* - core_compatibility_message: A message indicating the versions of Drupal
* core with which this project is compatible. This message is also
* contained within the 'core_compatibility_details' variable documented
* above. This message is not set for the Drupal core project itself.
*
* @see template_preprocess_update_version()
*/
#}
<div class="{{ attributes.class }} project-update__version"{{ attributes|without('class') }}>
<div class="layout-row clearfix">
<div class="project-update__version-title layout-column layout-column--quarter">{{ title }}</div>
<div class="project-update__version-details layout-column layout-column--quarter">
<a href="{{ version.release_link }}">{{ version.version }}</a>
<span class="project-update__version-date">({{ version.date|date('Y-M-d') }})</span>
</div>
<div class="layout-column layout-column--half">
<ul class="project-update__version-links">
<li class="project-update__release-notes-link">
<a href="{{ version.release_link }}">{{ 'Release notes'|t }}</a>
</li>
{% if core_compatibility_details %}
<li class="project-update__compatibility-details">
{{ core_compatibility_details }}
</li>
{% endif %}
</ul>
</div>
</div>
</div>