Add a field for text alignment
This commit is contained in:
parent
fb3b58cf97
commit
c816e90e06
7 changed files with 82 additions and 5 deletions
|
@ -28,7 +28,13 @@
|
|||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<div{{ attributes }}>
|
||||
{% set text_alignment = content.field_text_alignment['#items'].getValue()|first.value %}
|
||||
|
||||
{% set classes = [
|
||||
text_alignment is same as 'centre' ? 'flex justify-center',
|
||||
] %}
|
||||
|
||||
<div{{ attributes.addClass(classes) }}>
|
||||
{{ title_prefix }}
|
||||
|
||||
{% if label %}
|
||||
|
@ -38,6 +44,6 @@
|
|||
{{ title_suffix }}
|
||||
|
||||
{% block content %}
|
||||
{{ content }}
|
||||
{{ content|without('field_text_alignment') }}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue