diff --git a/core/modules/filter/templates/filter-caption.html.twig b/core/modules/filter/templates/filter-caption.html.twig index eb9d248..92e1065 100644 --- a/core/modules/filter/templates/filter-caption.html.twig +++ b/core/modules/filter/templates/filter-caption.html.twig @@ -12,7 +12,7 @@ * - string classes: The classes of the captioned HTML tag. */ #} -
+
{{ node }}
{{ caption }}
diff --git a/core/modules/filter/templates/filter-guidelines.html.twig b/core/modules/filter/templates/filter-guidelines.html.twig index 4341349..b362f2e 100644 --- a/core/modules/filter/templates/filter-guidelines.html.twig +++ b/core/modules/filter/templates/filter-guidelines.html.twig @@ -19,13 +19,7 @@ * @ingroup themeable */ #} -{% - set classes = [ - 'filter-guidelines-item', - 'filter-guidelines-' ~ format.format, - ] -%} - -

{{ format.name }}

+
+

{{ format.name }}

{{ tips }}
diff --git a/core/modules/filter/templates/filter-tips.html.twig b/core/modules/filter/templates/filter-tips.html.twig index b17de01..3af98d6 100644 --- a/core/modules/filter/templates/filter-tips.html.twig +++ b/core/modules/filter/templates/filter-tips.html.twig @@ -24,30 +24,19 @@ {% if tips|length %} {% if multiple %} -
+
{% endif %} {% for name, tip in tips %} {% if multiple %} - {% - set tip_classes = [ - 'filter-type', - 'filter-' ~ name|clean_class, - ] - %} - +

{{ tip.name }}

{% endif %} {% if tip.list|length %} -
    +
      {% for item in tip.list %} - {% - set item_classes = [ - long ? 'filter-' ~ item.id|replace({'/': '-'}), - ] - %} - {{ item.tip }} +
    • {{ item.tip }}
    • {% endfor %}
    {% endif %} diff --git a/core/modules/filter/templates/text-format-wrapper.html.twig b/core/modules/filter/templates/text-format-wrapper.html.twig index 4e5ff6d..ad8991f 100644 --- a/core/modules/filter/templates/text-format-wrapper.html.twig +++ b/core/modules/filter/templates/text-format-wrapper.html.twig @@ -15,14 +15,9 @@ * @ingroup themeable */ #} -
    +
    {{ children }} {% if description %} - {% - set classes = [ - aria_description ? 'description', - ] - %} - {{ description }}
    +
    {{ description }}
    {% endif %}
    diff --git a/core/themes/classy/templates/filter/filter-caption.html.twig b/core/themes/classy/templates/filter/filter-caption.html.twig new file mode 100644 index 0000000..eb9d248 --- /dev/null +++ b/core/themes/classy/templates/filter/filter-caption.html.twig @@ -0,0 +1,18 @@ +{# +/** + * @file + * Default theme implementation for a filter caption. + * + * Returns HTML for a captioned image, audio, video or other tag. + * + * Available variables + * - string node: The complete HTML tag whose contents are being captioned. + * - string tag: The name of the HTML tag whose contents are being captioned. + * - string caption: The caption text. + * - string classes: The classes of the captioned HTML tag. + */ +#} +
    +{{ node }} +
    {{ caption }}
    +
    diff --git a/core/themes/classy/templates/filter/filter-guidelines.html.twig b/core/themes/classy/templates/filter/filter-guidelines.html.twig new file mode 100644 index 0000000..4341349 --- /dev/null +++ b/core/themes/classy/templates/filter/filter-guidelines.html.twig @@ -0,0 +1,31 @@ +{# +/** + * @file + * Default theme implementation for guidelines for a text format. + * + * Available variables: + * - format: Contains information about the current text format, including the + * following: + * - name: The name of the text format, potentially unsafe and needs to be + * escaped. + * - format: The machine name of the text format, e.g. 'basic_html'. + * - attributes: HTML attributes for the containing element. + * - tips: Descriptions and a CSS ID in the form of 'module-name/filter-id' + * (only used when 'long' is TRUE) for each filter in one or more text + * formats. + * + * @see template_preprocess_filter_tips() + * + * @ingroup themeable + */ +#} +{% + set classes = [ + 'filter-guidelines-item', + 'filter-guidelines-' ~ format.format, + ] +%} + +

    {{ format.name }}

    + {{ tips }} +
diff --git a/core/themes/classy/templates/filter/filter-tips.html.twig b/core/themes/classy/templates/filter/filter-tips.html.twig new file mode 100644 index 0000000..b17de01 --- /dev/null +++ b/core/themes/classy/templates/filter/filter-tips.html.twig @@ -0,0 +1,63 @@ +{# +/** + * @file + * Default theme implementation for a set of filter tips. + * + * Available variables: + * - tips: Descriptions and a CSS ID in the form of 'module-name/filter-id' + * (only used when 'long' is TRUE) for each filter in one or more text + * formats. + * - long: A flag indicating whether the passed-in filter tips contain extended + * explanations, i.e. intended to be output on the path 'filter/tips' + * (TRUE), or are in a short format, i.e. suitable to be displayed below a + * form element. Defaults to FALSE. + * - multiple: A flag indicating there is more than one filter tip. + * + * @see template_preprocess_filter_tips() + * + * @ingroup themeable + */ +#} +{% if multiple %} +

{{ 'Text Formats'|t }}

+{% endif %} + +{% if tips|length %} + {% if multiple %} +
+ {% endif %} + + {% for name, tip in tips %} + {% if multiple %} + {% + set tip_classes = [ + 'filter-type', + 'filter-' ~ name|clean_class, + ] + %} + +

{{ tip.name }}

+ {% endif %} + + {% if tip.list|length %} +
    + {% for item in tip.list %} + {% + set item_classes = [ + long ? 'filter-' ~ item.id|replace({'/': '-'}), + ] + %} + {{ item.tip }} + {% endfor %} +
+ {% endif %} + + {% if multiple %} +
+ {% endif %} + {% endfor %} + + {% if multiple %} +
+ {% endif %} +{% endif %} diff --git a/core/themes/classy/templates/filter/text-format-wrapper.html.twig b/core/themes/classy/templates/filter/text-format-wrapper.html.twig new file mode 100644 index 0000000..4e5ff6d --- /dev/null +++ b/core/themes/classy/templates/filter/text-format-wrapper.html.twig @@ -0,0 +1,28 @@ +{# +/** + * @file + * Default theme implementation for a text format-enabled form element. + * + * Available variables: + * - children: Text format element children. + * - description: Text format element description. + * - attributes: HTML attributes for the containing element. + * - aria_description: Flag for whether or not an ARIA description has been + * added to the description container. + * + * @see template_preprocess_text_format_wrapper() + * + * @ingroup themeable + */ +#} +
+ {{ children }} + {% if description %} + {% + set classes = [ + aria_description ? 'description', + ] + %} + {{ description }}
+ {% endif %} +