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,40 @@
{#
/**
* @file
* Theme override for a link to a file.
*
* Available variables:
* - attributes: The HTML attributes for the containing element.
* - link: A link to the file.
* - icon: An icon.
* - icon_only: Flag to display only the icon and not the label.
* - icon_position: Where an icon should be displayed.
*
* @ingroup templates
*
* @see \Drupal\bootstrap\Plugin\Preprocess\FileLink::preprocessVariables
*/
#}
{% apply spaceless %}
{%
set classes = [
icon_only ? 'icon-only',
not icon_only ? 'icon-' ~ icon_position|clean_class
]
%}
<span{{ attributes.addClass(classes) }}>
{% if icon_only %}
<span class="file-icon">{{ icon }}</span>
<span class="sr-only">
<span class="file-link">{{ link }}</span>
<span class="file-size">{{ file_size }}</span>
</span>
{% else %}
{% if icon_position == 'after' %}
<span class="file-link">{{ link }}</span><span class="file-size">{{ file_size }}</span><span class="file-icon">{{ icon }}</span>
{% else %}
<span class="file-icon">{{ icon }}</span><span class="file-link">{{ link }}</span><span class="file-size">{{ file_size }}</span>
{% endif %}
{% endif %}
</span>
{% endapply %}

View File

@@ -0,0 +1,23 @@
{#
/**
* @file
* Theme override to display help text for file fields.
*
* Available variables:
* - description: The normal description for this field, specified by the user.
* - descriptions: Lines of help text for uploading a file.
* - popover: Markup to display the descriptions as a popover instead.
*
* @ingroup templates
*
* @see template_preprocess_file_upload_help()
*/
#}
{% if description %}
{{ description }}<br>
{% endif %}
{% if popover %}
{{ popover }}
{% else %}
{{ descriptions|safe_join('<br>') }}
{% endif %}

View File

@@ -0,0 +1,29 @@
{#
/**
* @file
* Theme override for an image field widget.
*
* Available variables:
* - attributes: HTML attributes for the containing element.
* - data: Render elements of the image widget.
*
* @ingroup templates
*
* @see template_preprocess_image_widget()
*/
#}
{% if data.preview %}
<div{{ attributes.addClass('row') }}>
<div class="preview col-sm-2">
{{ data.preview }}
</div>
<div class="data col-sm-10">
{# Render widget data without the image preview that was output already. #}
{{ data|without('preview') }}
</div>
</div>
{% else %}
<div{{ attributes.addClass(classes) }}>
{{ data }}
</div>
{% endif %}