diff --git a/templates/block--menu-block--main.html.twig b/templates/block--menu-block--main.html.twig index 1b97c0b..449b840 100644 --- a/templates/block--menu-block--main.html.twig +++ b/templates/block--menu-block--main.html.twig @@ -1,54 +1,21 @@ {# /** * @file - * Theme override for a menu block. + * Theme override for any menu block placement of "main" menu. + * IRL: This template is only used by cwd_*_mainnavigation (on CD Demo), but it + * works fine for any instance of "main" menu placed in sidebar_primary. * - * 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. - * - provider: The module or other provider that provided this block plugin. - * - Block plugin specific settings will also be stored here. - * - 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. + * See @cwd_base/block--system-menu-block.html.twig for available variables and other info. */ #} -{% - set classes = [ - 'block', - 'block-menu', - 'navigation', - 'menu--' ~ derivative_plugin_id|clean_class, - ] -%} -{% set heading_id = attributes.id ~ '-menu'|clean_id %} -{# title_prefix #} +{# Label. #} {% if label %} {{ label }} {% endif %} -{# title_suffix #} diff --git a/templates/block--menu-block--utility-navigation.html.twig b/templates/block--menu-block--utility-navigation.html.twig index 27356e9..b3ce314 100644 --- a/templates/block--menu-block--utility-navigation.html.twig +++ b/templates/block--menu-block--utility-navigation.html.twig @@ -1,48 +1,15 @@ {# /** * @file - * Theme override for a menu block. + * Theme override for any menu block placement of "utility-navigation" menu. + * IRL: This template is only used by cwd_*_utilitynavigation (on CD Demo). * - * 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. - * - provider: The module or other provider that provided this block plugin. - * - Block plugin specific settings will also be stored here. - * - 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. + * See @cwd_base/block--system-menu-block.html.twig for available variables and other info. */ #} -{% - set classes = [ - 'block', - 'block-menu', - 'navigation', - 'menu--' ~ derivative_plugin_id|clean_class, - ] -%} -{% set heading_id = attributes.id ~ '-menu'|clean_id %} diff --git a/templates/block--system-menu-block--main.html.twig b/templates/block--system-menu-block--main.html.twig index 0389da5..25f1a34 100644 --- a/templates/block--system-menu-block--main.html.twig +++ b/templates/block--system-menu-block--main.html.twig @@ -1,45 +1,14 @@ {# /** * @file - * Theme override for a menu block. + * Theme override for any menu block placement of "main" menu. + * IRL: Only meant for cwd_*_main_menu block. + * 💬 This menu block is a core menu block, not a menu_block module menu block, so there's no theme hook suggestion setting to target it more specifically. Should we redo the main menu block with the menu_block module? Maybe! Not sure it's worth the trouble it would cause, but I think it's worth considering. + * Related: https://github.com/CU-CommunityApps/CD-demo/issues/79 * - * 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. - * - provider: The module or other provider that provided this block plugin. - * - Block plugin specific settings will also be stored here. - * - 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. + * See @cwd_base/block--system-menu-block.html.twig for available variables and other info. */ #} -{% - set classes = [ - 'block', - 'block-menu', - 'navigation', - 'menu--' ~ derivative_plugin_id|clean_class, - ] -%} -{% set heading_id = attributes.id ~ '-menu'|clean_id %}