diff --git a/core/modules/system/templates/admin-block-content.html.twig b/core/modules/system/templates/admin-block-content.html.twig index e70e565..025ba9c 100644 --- a/core/modules/system/templates/admin-block-content.html.twig +++ b/core/modules/system/templates/admin-block-content.html.twig @@ -16,14 +16,9 @@ * @ingroup themeable */ #} -{% - set classes = [ - 'admin-list', - compact ? 'compact', - ] -%} + {% if content %} - + {% for item in content %}
{{ item.link }}
{% if item.description %} diff --git a/core/modules/system/templates/admin-block.html.twig b/core/modules/system/templates/admin-block.html.twig index 20aa000..542fe04 100644 --- a/core/modules/system/templates/admin-block.html.twig +++ b/core/modules/system/templates/admin-block.html.twig @@ -14,13 +14,13 @@ * @ingroup themeable */ #} -
+
{% if block.title %}

{{ block.title }}

{% endif %} {% if block.content %} -
{{ block.content }}
+
{{ block.content }}
{% elseif block.description %} -
{{ block.description }}
+
{{ block.description }}
{% endif %}
diff --git a/core/modules/system/templates/admin-page.html.twig b/core/modules/system/templates/admin-page.html.twig index 038b1af..8ed590a 100644 --- a/core/modules/system/templates/admin-page.html.twig +++ b/core/modules/system/templates/admin-page.html.twig @@ -14,10 +14,10 @@ * @ingroup themeable */ #} -
+
{{ system_compact_link }} {% for container in containers %} -
+
{% for block in container.blocks %} {{ block }} {% endfor %} diff --git a/core/modules/system/templates/block--system-branding-block.html.twig b/core/modules/system/templates/block--system-branding-block.html.twig index 4cf0f1a..f045f5d 100644 --- a/core/modules/system/templates/block--system-branding-block.html.twig +++ b/core/modules/system/templates/block--system-branding-block.html.twig @@ -22,11 +22,11 @@ {% endif %} {% if site_name %} -
+ {% endif %} {% if site_slogan %} -
{{ site_slogan }}
+
{{ site_slogan }}
{% endif %} {% endblock %} diff --git a/core/modules/system/templates/block--system-menu-block.html.twig b/core/modules/system/templates/block--system-menu-block.html.twig index dff7e39..72cc966 100644 --- a/core/modules/system/templates/block--system-menu-block.html.twig +++ b/core/modules/system/templates/block--system-menu-block.html.twig @@ -40,19 +40,12 @@ * @ingroup themeable */ #} -{% - set classes = [ - 'block', - 'block-menu', - 'navigation', - 'menu--' ~ derivative_plugin_id|clean_class, - ] -%} + {% set heading_id = attributes.id ~ '-menu'|clean_id %} - + {# Label. If not displayed, we still provide it for screen readers. #} {% if not configuration.label_display %} - {% set title_attributes = title_attributes.addClass('visually-hidden') %} + {% set title_attributes = title_attributes %} {% endif %} {{ title_prefix }}

{{ configuration.label }}

diff --git a/core/themes/classy/templates/admin-block-content.html.twig b/core/themes/classy/templates/admin-block-content.html.twig new file mode 100644 index 0000000..e70e565 --- /dev/null +++ b/core/themes/classy/templates/admin-block-content.html.twig @@ -0,0 +1,34 @@ +{# +/** + * @file + * Default theme implementation for the content of an administrative block. + * + * Available variables: + * - content: A list containing information about the block. Each element + * of the array represents an administrative menu item, and must at least + * contain the keys 'title', 'link_path', and 'localized_options', which are + * passed to l(). A 'description' key may also be provided. + * - attributes: HTML attributes to be added to the element. + * - compact: Boolean indicating whether compact mode is turned on or not. + * + * @see template_preprocess_admin_block_content() + * + * @ingroup themeable + */ +#} +{% + set classes = [ + 'admin-list', + compact ? 'compact', + ] +%} +{% if content %} + + {% for item in content %} +
{{ item.link }}
+ {% if item.description %} +
{{ item.description }}
+ {% endif %} + {% endfor %} + +{% endif %} diff --git a/core/themes/classy/templates/admin-block.html.twig b/core/themes/classy/templates/admin-block.html.twig new file mode 100644 index 0000000..20aa000 --- /dev/null +++ b/core/themes/classy/templates/admin-block.html.twig @@ -0,0 +1,26 @@ +{# +/** + * @file + * Default theme implementation for an administrative block. + * + * Available variables: + * - block: An array of information about the block, including: + * - show: A flag indicating if the block should be displayed. + * - title: The block title. + * - content: (optional) The content of the block. + * - description: (optional) A description of the block. + * (Description should only be output if content is not available). + * + * @ingroup themeable + */ +#} +
+ {% if block.title %} +

{{ block.title }}

+ {% endif %} + {% if block.content %} +
{{ block.content }}
+ {% elseif block.description %} +
{{ block.description }}
+ {% endif %} +
diff --git a/core/themes/classy/templates/admin-page.html.twig b/core/themes/classy/templates/admin-page.html.twig new file mode 100644 index 0000000..038b1af --- /dev/null +++ b/core/themes/classy/templates/admin-page.html.twig @@ -0,0 +1,26 @@ +{# +/** + * @file + * Default theme implementation for an administrative page. + * + * Available variables: + * - system_compact_link: Themed link to toggle compact view. + * - containers: An list of administrative blocks keyed by position: left or + * right. Contains: + * - blocks: A list of blocks within a container. + * + * @see template_preprocess_admin_page() + * + * @ingroup themeable + */ +#} +
+ {{ system_compact_link }} + {% for container in containers %} +
+ {% for block in container.blocks %} + {{ block }} + {% endfor %} +
+ {% endfor %} +
diff --git a/core/themes/classy/templates/block--system-branding-block.html.twig b/core/themes/classy/templates/block--system-branding-block.html.twig new file mode 100644 index 0000000..4cf0f1a --- /dev/null +++ b/core/themes/classy/templates/block--system-branding-block.html.twig @@ -0,0 +1,32 @@ +{% extends "@block/block.html.twig" %} +{# +/** + * @file + * Default theme implementation for a branding block. + * + * Each branding element variable (logo, name, slogan) is only available if + * enabled in the block configuration. + * + * Available variables: + * - site_logo: Logo for site as defined in Appearance or theme settings. + * - site_name: Name for site as defined in Site information settings. + * - site_slogan: Slogan for site as defined in Site information settings. + * + * @ingroup themeable + */ +#} +{% block content %} + {% if site_logo %} + + {% endif %} + {% if site_name %} + + {% endif %} + {% if site_slogan %} +
{{ site_slogan }}
+ {% endif %} +{% endblock %} diff --git a/core/themes/classy/templates/block--system-menu-block.html.twig b/core/themes/classy/templates/block--system-menu-block.html.twig new file mode 100644 index 0000000..dff7e39 --- /dev/null +++ b/core/themes/classy/templates/block--system-menu-block.html.twig @@ -0,0 +1,65 @@ +{# +/** + * @file + * Default theme implementation for a menu block. + * + * Available variables: + * - plugin_id: The ID of the block implementation. + * - label: The configured label of the block if visible. + * - configuration: A list of the block's configuration values. + * - label: The configured label for the block. + * - label_display: The display settings for the label. + * - module: The module that provided this block plugin. + * - cache: The cache settings. + * - Block plugin specific settings will also be stored here. + * - block - The full block entity. + * - label_hidden: The hidden block title value if the block was + * configured to hide the title ('label' is empty in this case). + * - module: The module that generated the block. + * - delta: An ID for the block, unique within each module. + * - region: The block region embedding the current block. + * - content: The content of this block. + * - attributes: HTML attributes for the containing element. + * - id: A valid HTML ID and guaranteed unique. + * - title_attributes: HTML attributes for the title element. + * - content_attributes: HTML attributes for the content element. + * - title_prefix: Additional output populated by modules, intended to be + * displayed in front of the main title tag that appears in the template. + * - title_suffix: Additional output populated by modules, intended to be + * displayed after the main title tag that appears in the template. + * + * Headings should be used on navigation menus that consistently appear on + * multiple pages. When this menu block's label is configured to not be + * displayed, it is automatically made invisible using the 'visually-hidden' CSS + * class, which still keeps it visible for screen-readers and assistive + * technology. Headings allow screen-reader and keyboard only users to navigate + * to or skip the links. + * See http://juicystudio.com/article/screen-readers-display-none.php and + * http://www.w3.org/TR/WCAG-TECHS/H42.html for more information. + * + * @ingroup themeable + */ +#} +{% + set classes = [ + 'block', + 'block-menu', + 'navigation', + 'menu--' ~ derivative_plugin_id|clean_class, + ] +%} +{% set heading_id = attributes.id ~ '-menu'|clean_id %} + + {# Label. If not displayed, we still provide it for screen readers. #} + {% if not configuration.label_display %} + {% set title_attributes = title_attributes.addClass('visually-hidden') %} + {% endif %} + {{ title_prefix }} +

{{ configuration.label }}

+ {{ title_suffix }} + + {# Menu. #} + {% block content %} + {{ content }} + {% endblock %} +