header & home
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation of a container used to wrap child elements.
|
||||
*
|
||||
* Used for grouped form items. Can also be used as a theme wrapper for any
|
||||
* renderable element, to surround it with a <div> and HTML attributes.
|
||||
* See \Drupal\Core\Render\Element\RenderElement for more
|
||||
* information on the #theme_wrappers render array property, and
|
||||
* \Drupal\Core\Render\Element\container for usage of the container render
|
||||
* element.
|
||||
*
|
||||
* 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,50 @@
|
||||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a paragraphs summary.
|
||||
*
|
||||
* Available variables:
|
||||
* - expanded: Whether the summary is expanded or not.
|
||||
* - content: Array of content summary items.
|
||||
* - behaviors: Array of behavior summary items.
|
||||
*
|
||||
* @see template_preprocess()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{% set classes = [
|
||||
'paragraphs-description',
|
||||
expanded ? 'paragraphs-expanded-description' : 'paragraphs-collapsed-description'
|
||||
] %}
|
||||
|
||||
{% set label_classes = [
|
||||
'field_title'
|
||||
|
||||
] %}
|
||||
{% spaceless %}
|
||||
{% if content is not empty or behaviors is not empty %}
|
||||
{# <div{{ attributes.addClass(classes) }}> #}
|
||||
{% if content is not empty %}
|
||||
{# <div class="paragraphs-content-wrapper"> #}
|
||||
{%- for content_item in content -%}
|
||||
<span {{ attributes.addClass(label_classes) }}>{{ content_item }}</span>
|
||||
{%- if not loop.last -%}, {% endif %}
|
||||
{%- endfor -%}
|
||||
{# </div> #}
|
||||
{% endif %}
|
||||
{% if behaviors is not empty %}
|
||||
<div class="paragraphs-plugin-wrapper">
|
||||
{%- for behavior_item in behaviors -%}
|
||||
<span class="summary-plugin">
|
||||
{%- if behavior_item.label is not null -%}
|
||||
<span class="summary-plugin-label">{{ behavior_item.label }}</span>
|
||||
{%- endif -%}
|
||||
{{ behavior_item.value -}}
|
||||
</span>
|
||||
{%- endfor -%}
|
||||
</div>
|
||||
{% endif %}
|
||||
{# </div> #}
|
||||
{% endif %}
|
||||
{% endspaceless %}
|
||||
@@ -0,0 +1,25 @@
|
||||
{#
|
||||
/**
|
||||
* @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 %}
|
||||
Reference in New Issue
Block a user