Skip to content
Snippets Groups Projects
Verified Commit 4a2b996b authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3414981 by finnsky, pdureau: Umami Demo: review of the already merged SDC components

parent fc3fa012
No related branches found
No related tags found
27 merge requests!11131[10.4.x-only-DO-NOT-MERGE]: Issue ##2842525 Ajax attached to Views exposed filter form does not trigger callbacks,!9470[10.3.x-only-DO-NOT-MERGE]: #3331771 Fix file_get_contents(): Passing null to parameter,!8540Issue #3457061: Bootstrap Modal dialog Not closing after 10.3.0 Update,!8528Issue #3456871 by Tim Bozeman: Support NULL services,!8373Issue #3427374 by danflanagan8, Vighneshh: taxonomy_tid ViewsArgumentDefault...,!7526Expose roles in response,!7352Draft: Resolve #3203489 "Set filename as",!3878Removed unused condition head title for views,!3818Issue #2140179: $entity->original gets stale between updates,!3742Issue #3328429: Create item list field formatter for displaying ordered and unordered lists,!3731Claro: role=button on status report items,!3651Issue #3347736: Create new SDC component for Olivero (header-search),!3531Issue #3336994: StringFormatter always displays links to entity even if the user in context does not have access,!3355Issue #3209129: Scrolling problems when adding a block via layout builder,!3154Fixes #2987987 - CSRF token validation broken on routes with optional parameters.,!3133core/modules/system/css/components/hidden.module.css,!2812Issue #3312049: [Followup] Fix Drupal.Commenting.FunctionComment.MissingReturnType returns for NULL,!2794Issue #3100732: Allow specifying `meta` data on JSON:API objects,!2378Issue #2875033: Optimize joins and table selection in SQL entity query implementation,!2062Issue #3246454: Add weekly granularity to views date sort,!1105Issue #3025039: New non translatable field on translatable content throws error,!1073issue #3191727: Focus states on mobile second level navigation items fixed,!877Issue #2708101: Default value for link text is not saved,!617Issue #3043725: Provide a Entity Handler for user cancelation,!579Issue #2230909: Simple decimals fail to pass validation,!560Move callback classRemove outside of the loop,!555Issue #3202493
Pipeline #119057 canceled
Showing
with 155 additions and 71 deletions
......@@ -27,10 +27,10 @@ props:
- timer
- serves
- difficulty
label:
type: string
description: Label text
slots:
label:
type: string
description: Label text
text:
type: string
description: Text
......@@ -5,8 +5,8 @@
{{ source(componentMetadata.path ~ '/icons/' ~ icon|default('knife') ~ '.svg') }}
</div>
{% endif %}
{% if label %}
<div class="umami-badge__label">{{~ label ~}}</div>
{% if block('label') is defined and block('label')|trim %}
<div class="umami-badge__label">{% block label %}{% endblock %}</div>
{% endif %}
{% block text %}{% endblock %}
</div>
......
......@@ -18,9 +18,20 @@ props:
type: object
properties:
attributes:
type: Drupal\Core\Template\Attribute
title: Attributes
description: Wrapper attributes.
site_logo:
type: string
site_name:
type: string
site_slogan:
format: iri-reference
url:
type: string
title: Branding url
format: iri-reference
slots:
site_name:
type: string
site_slogan:
type: string
<div class="branding">
<div{{ attributes.addClass('branding') }}>
{% if site_logo %}
<a href="{{ path('<front>') }}" rel="home" class="branding__site-logo">
<a href="{{ url }}" rel="home" class="branding__site-logo">
<img src="{{ site_logo }}" alt="{{ 'Home'|t }}" />
</a>
{% endif %}
{% if site_name %}
<div class="branding__site-name">
<a href="{{ path('<front>') }}" rel="home">{{ site_name }}</a>
<a href="{{ url }}" rel="home">
{% block site_name %}{% endblock %}
</a>
</div>
{% endif %}
{% if site_slogan %}
<div class="branding__site-slogan">{{ site_slogan }}</div>
<div class="branding__site-slogan">
{% block site_slogan %}{% endblock %}
</div>
{% endif %}
</div>
......@@ -15,11 +15,17 @@ props:
type: object
properties:
disclaimer:
type: string
description: Disclaimer text
copyright:
type: string
description: Copyright text of Disclaimer
examples:
- Terms & Conditions
attributes:
type: Drupal\Core\Template\Attribute
title: Attributes
description: Wrapper attributes.
slots:
disclaimer:
type: string
description: Disclaimer text
copyright:
type: string
description: Copyright text of Disclaimer
examples:
- Terms & Conditions
<div class="disclaimer">
{% if disclaimer %}
<div class="disclaimer__disclaimer">
{{ disclaimer }}
</div>
{% endif %}
{% if copyright %}
<div class="disclaimer__copyright">
{{ copyright }}
</div>
{% endif %}
<div{{ attributes.addClass('disclaimer') }}>
<div class="disclaimer__disclaimer">
{% block disclaimer %}{% endblock %}
</div>
<div class="disclaimer__copyright">
{% block copyright %}{% endblock %}
</div>
</div>
......@@ -19,8 +19,6 @@ props:
type: Drupal\Core\Template\Attribute
title: Attributes
description: Wrapper attributes.
label:
type: string
# Slots always hold arbitrary markup. We know that beforehand, so no need for
# a schema for slots.
......
......@@ -11,13 +11,22 @@ status: experimental
# syntax there.
props:
type: object
required:
- url
properties:
a11y:
type: string
title: Read More screen reader text
text:
type: string
title: Read More text
attributes:
type: Drupal\Core\Template\Attribute
title: Attributes
description: Link attributes.
url:
type: string
title: Read More url
format: iri-reference
slots:
a11y:
type: string
title: Read More screen reader text
text:
type: string
title: Read More text
<a class="read-more {{ extra_classes }}" href="{{ url }}">
{{ text }}
<a{{ attributes.addClass('read-more').setAttribute('href', url) }}>
{% block text %}{% endblock %}
<span class="visually-hidden">
- {{ a11y }}
- {% block a11y %}{% endblock %}
</span>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 600 600" class="read-more__icon">
<path fill="none" d="M159.19 117.37v365.26L341.82 300 159.19 117.37z"/>
......
......@@ -16,6 +16,8 @@ props:
type: Drupal\Core\Template\Attribute
title: Attributes
description: Wrapper attributes.
label:
type: string
html_tag:
type: string
title: HTML tag for title
......@@ -30,9 +32,11 @@ props:
- span
# Provide a default value
default: h2
title_prefix:
type: object
title: Title prefix
title_suffix:
type: object
title: Title suffix
slots:
title_prefix:
type: object
title: Title prefix
title_suffix:
type: object
title: Title suffix
{{ title_prefix }}
{% block title_prefix %}{% endblock %}
<{{ html_tag|default('h2') }}{{ attributes.addClass('umami-title') }}>
{{ label }}
</{{ html_tag|default('h2') }}>
{{ title_suffix }}
{% block title_suffix %}{% endblock %}
......@@ -14,9 +14,18 @@
*/
#}
{% block content %}
{{ include('umami:branding', {
site_logo: site_logo,
site_name: site_name,
site_slogan: site_slogan
}, with_context = false) }}
{% embed 'umami:branding' with {
attributes: create_attribute(),
site_logo,
site_name,
site_slogan,
url: path('<front>'),
} only %}
{% block site_name %}
{{ site_name }}
{% endblock %}
{% block site_slogan %}
{{ site_slogan }}
{% endblock %}
{% endembed %}
{% endblock %}
......@@ -13,8 +13,14 @@
#}
{% block content %}
{% embed 'umami:disclaimer' with {
disclaimer: content.field_disclaimer,
copyright: content.field_copyright,
attributes: create_attribute(),
content,
} only %}
{% block copyright %}
{{ content.field_copyright }}
{% endblock %}
{% block disclaimer %}
{{ content.field_disclaimer }}
{% endblock %}
{% endembed %}
{% endblock %}
......@@ -49,10 +49,13 @@
{% embed "umami:badge" with {
icon: 'timer',
label: label,
label,
items,
attributes: attributes.addClass(classes),
} only %}
{% block label %}
{{ label }}
{% endblock %}
{% block text %}
{% for item in items %}
<div{{ item.attributes.addClass('umami-badge__item') }}>{{ item.content }}</div>
......
......@@ -49,10 +49,13 @@
{% embed "umami:badge" with {
icon: 'difficulty',
label: label,
label,
items,
attributes: attributes.addClass(classes),
} only %}
{% block label %}
{{ label }}
{% endblock %}
{% block text %}
{% for item in items %}
<div{{ item.attributes.addClass('umami-badge__item') }}>{{ item.content }}</div>
......
......@@ -49,10 +49,13 @@
{% embed "umami:badge" with {
icon: 'serves',
label: label,
label,
items,
attributes: attributes.addClass(classes),
} only %}
{% block label %}
{{ label }}
{% endblock %}
{% block text %}
{% for item in items %}
<div{{ item.attributes.addClass('umami-badge__item') }}>{{ item.content }}</div>
......
......@@ -49,10 +49,13 @@
{% embed "umami:badge" with {
icon: 'knife',
label: label,
label,
items,
attributes: attributes.addClass(classes),
} only %}
{% block label %}
{{ label }}
{% endblock %}
{% block text %}
{% for item in items %}
<div{{ item.attributes.addClass('umami-badge__item') }}>{{ item.content }}</div>
......
......@@ -39,12 +39,19 @@
{{ content.field_media_image }}
{% endblock %}
{% block content %}
{% include "umami:title" with {
{% embed "umami:title" with {
attributes: title_attributes.addClass('footer-block__title'),
label: label ? label : content.field_title,
title_prefix,
title_suffix,
} only %}
{% block title_prefix %}
{{ title_prefix }}
{% endblock %}
{% block title_suffix %}
{{ title_suffix }}
{% endblock %}
{% endembed %}
{% if not label %}
{{ content|without('field_title')|without('field_media_image') }}
{% else %}
......
......@@ -21,12 +21,19 @@
title_suffix,
} only %}
{% block content %}
{% include "umami:title" with {
{% embed "umami:title" with {
attributes: title_attributes.addClass('footer-block__title'),
label: label,
label: label ? label : content.field_title,
title_prefix,
title_suffix,
} only %}
{% block title_prefix %}
{{ title_prefix }}
{% endblock %}
{% block title_suffix %}
{{ title_suffix }}
{% endblock %}
{% endembed %}
{{ content }}
{% endblock %}
{% endembed %}
......@@ -98,17 +98,31 @@
<div{{ content_attributes.addClass('umami-card__content') }}>
{{ content }}
</div>
{% include "umami:title" with {
{% embed "umami:title" with {
attributes: title_attributes.addClass('umami-card__title'),
label,
label: label ? label : content.field_title,
title_prefix,
title_suffix,
} only %}
{% include "umami:read-more" with {
url,
text: read_more,
a11y: label,
extra_classes: 'umami-card__read-more'
{% block title_prefix %}
{{ title_prefix }}
{% endblock %}
{% block title_suffix %}
{{ title_suffix }}
{% endblock %}
{% endembed %}
{% embed "umami:read-more" with {
attributes: create_attribute({'class': ['umami-card__read-more']}),
read_more,
label,
url
} only %}
{% block a11y %}
{{ label }}
{% endblock %}
{% block text %}
{{ read_more }}
{% endblock %}
{% endembed %}
{% endblock %}
{% endembed %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment