diff --git a/core/themes/bartik/templates/block--search-form-block.html.twig b/core/themes/bartik/templates/block--search-form-block.html.twig index b196d43..3c262d3 100644 --- a/core/themes/bartik/templates/block--search-form-block.html.twig +++ b/core/themes/bartik/templates/block--search-form-block.html.twig @@ -1,4 +1,4 @@ -{% extends "@classy/block--search-form-block.html.twig" %} +{% extends "@classy/search/block--search-form-block.html.twig" %} {# /** * @file diff --git a/core/themes/bartik/templates/block--system-menu-block.html.twig b/core/themes/bartik/templates/block--system-menu-block.html.twig index 65ab19b..7934001 100644 --- a/core/themes/bartik/templates/block--system-menu-block.html.twig +++ b/core/themes/bartik/templates/block--system-menu-block.html.twig @@ -1,4 +1,4 @@ -{% extends "@system/block--system-menu-block.html.twig" %} +{% extends "@classy/system/block--system-menu-block.html.twig" %} {# /** * @file diff --git a/core/themes/classy/templates/aggregator-block-item.html.twig b/core/themes/classy/templates/aggregator/aggregator-block-item.html.twig similarity index 100% rename from core/themes/classy/templates/aggregator-block-item.html.twig rename to core/themes/classy/templates/aggregator/aggregator-block-item.html.twig diff --git a/core/themes/classy/templates/aggregator-feed.html.twig b/core/themes/classy/templates/aggregator/aggregator-feed.html.twig similarity index 100% rename from core/themes/classy/templates/aggregator-feed.html.twig rename to core/themes/classy/templates/aggregator/aggregator-feed.html.twig diff --git a/core/themes/classy/templates/aggregator-item.html.twig b/core/themes/classy/templates/aggregator/aggregator-item.html.twig similarity index 100% rename from core/themes/classy/templates/aggregator-item.html.twig rename to core/themes/classy/templates/aggregator/aggregator-item.html.twig diff --git a/core/themes/classy/templates/block-list.html.twig b/core/themes/classy/templates/block/block-list.html.twig similarity index 100% rename from core/themes/classy/templates/block-list.html.twig rename to core/themes/classy/templates/block/block-list.html.twig diff --git a/core/themes/classy/templates/block.html.twig b/core/themes/classy/templates/block/block.html.twig similarity index 100% copy from core/themes/classy/templates/block.html.twig copy to core/themes/classy/templates/block/block.html.twig diff --git a/core/themes/classy/templates/book-all-books-block.html.twig b/core/themes/classy/templates/book/book-all-books-block.html.twig similarity index 100% rename from core/themes/classy/templates/book-all-books-block.html.twig rename to core/themes/classy/templates/book/book-all-books-block.html.twig diff --git a/core/themes/classy/templates/book-export-html.html.twig b/core/themes/classy/templates/book/book-export-html.html.twig similarity index 100% rename from core/themes/classy/templates/book-export-html.html.twig rename to core/themes/classy/templates/book/book-export-html.html.twig diff --git a/core/themes/classy/templates/book-navigation.html.twig b/core/themes/classy/templates/book/book-navigation.html.twig similarity index 100% rename from core/themes/classy/templates/book-navigation.html.twig rename to core/themes/classy/templates/book/book-navigation.html.twig diff --git a/core/themes/classy/templates/book-node-export-html.html.twig b/core/themes/classy/templates/book/book-node-export-html.html.twig similarity index 100% rename from core/themes/classy/templates/book-node-export-html.html.twig rename to core/themes/classy/templates/book/book-node-export-html.html.twig diff --git a/core/themes/classy/templates/book-tree.html.twig b/core/themes/classy/templates/book/book-tree.html.twig similarity index 100% rename from core/themes/classy/templates/book-tree.html.twig rename to core/themes/classy/templates/book/book-tree.html.twig diff --git a/core/themes/classy/templates/comment.html.twig b/core/themes/classy/templates/comment/comment.html.twig similarity index 100% rename from core/themes/classy/templates/comment.html.twig rename to core/themes/classy/templates/comment/comment.html.twig diff --git a/core/themes/classy/templates/field--comment.html.twig b/core/themes/classy/templates/comment/field--comment.html.twig similarity index 100% rename from core/themes/classy/templates/field--comment.html.twig rename to core/themes/classy/templates/comment/field--comment.html.twig diff --git a/core/themes/classy/templates/file-link.html.twig b/core/themes/classy/templates/file/file-link.html.twig similarity index 100% rename from core/themes/classy/templates/file-link.html.twig rename to core/themes/classy/templates/file/file-link.html.twig diff --git a/core/themes/classy/templates/file-managed-file.html.twig b/core/themes/classy/templates/file/file-managed-file.html.twig similarity index 100% rename from core/themes/classy/templates/file-managed-file.html.twig rename to core/themes/classy/templates/file/file-managed-file.html.twig diff --git a/core/themes/classy/templates/file-upload-help.html.twig b/core/themes/classy/templates/file/file-upload-help.html.twig similarity index 100% rename from core/themes/classy/templates/file-upload-help.html.twig rename to core/themes/classy/templates/file/file-upload-help.html.twig diff --git a/core/themes/classy/templates/file-widget-multiple.html.twig b/core/themes/classy/templates/file/file-widget-multiple.html.twig similarity index 100% rename from core/themes/classy/templates/file-widget-multiple.html.twig rename to core/themes/classy/templates/file/file-widget-multiple.html.twig diff --git a/core/themes/classy/templates/file-widget.html.twig b/core/themes/classy/templates/file/file-widget.html.twig similarity index 100% rename from core/themes/classy/templates/file-widget.html.twig rename to core/themes/classy/templates/file/file-widget.html.twig diff --git a/core/themes/classy/templates/filter-caption.html.twig b/core/themes/classy/templates/filter/filter-caption.html.twig similarity index 100% rename from core/themes/classy/templates/filter-caption.html.twig rename to core/themes/classy/templates/filter/filter-caption.html.twig diff --git a/core/themes/classy/templates/filter-guidelines.html.twig b/core/themes/classy/templates/filter/filter-guidelines.html.twig similarity index 100% rename from core/themes/classy/templates/filter-guidelines.html.twig rename to core/themes/classy/templates/filter/filter-guidelines.html.twig diff --git a/core/themes/classy/templates/filter-tips.html.twig b/core/themes/classy/templates/filter/filter-tips.html.twig similarity index 100% rename from core/themes/classy/templates/filter-tips.html.twig rename to core/themes/classy/templates/filter/filter-tips.html.twig diff --git a/core/themes/classy/templates/text-format-wrapper.html.twig b/core/themes/classy/templates/filter/text-format-wrapper.html.twig similarity index 100% rename from core/themes/classy/templates/text-format-wrapper.html.twig rename to core/themes/classy/templates/filter/text-format-wrapper.html.twig diff --git a/core/themes/classy/templates/forum-icon.html.twig b/core/themes/classy/templates/forum/forum-icon.html.twig similarity index 100% rename from core/themes/classy/templates/forum-icon.html.twig rename to core/themes/classy/templates/forum/forum-icon.html.twig diff --git a/core/themes/classy/templates/forum-list.html.twig b/core/themes/classy/templates/forum/forum-list.html.twig similarity index 100% rename from core/themes/classy/templates/forum-list.html.twig rename to core/themes/classy/templates/forum/forum-list.html.twig diff --git a/core/themes/classy/templates/forum-submitted.html.twig b/core/themes/classy/templates/forum/forum-submitted.html.twig similarity index 100% rename from core/themes/classy/templates/forum-submitted.html.twig rename to core/themes/classy/templates/forum/forum-submitted.html.twig diff --git a/core/themes/classy/templates/forums.html.twig b/core/themes/classy/templates/forum/forums.html.twig similarity index 100% rename from core/themes/classy/templates/forums.html.twig rename to core/themes/classy/templates/forum/forums.html.twig diff --git a/core/themes/classy/templates/image-anchor.html.twig b/core/themes/classy/templates/image/image-anchor.html.twig similarity index 100% rename from core/themes/classy/templates/image-anchor.html.twig rename to core/themes/classy/templates/image/image-anchor.html.twig diff --git a/core/themes/classy/templates/image-crop-summary.html.twig b/core/themes/classy/templates/image/image-crop-summary.html.twig similarity index 100% rename from core/themes/classy/templates/image-crop-summary.html.twig rename to core/themes/classy/templates/image/image-crop-summary.html.twig diff --git a/core/themes/classy/templates/image-formatter.html.twig b/core/themes/classy/templates/image/image-formatter.html.twig similarity index 100% rename from core/themes/classy/templates/image-formatter.html.twig rename to core/themes/classy/templates/image/image-formatter.html.twig diff --git a/core/themes/classy/templates/image-resize-summary.html.twig b/core/themes/classy/templates/image/image-resize-summary.html.twig similarity index 100% rename from core/themes/classy/templates/image-resize-summary.html.twig rename to core/themes/classy/templates/image/image-resize-summary.html.twig diff --git a/core/themes/classy/templates/image-rotate-summary.html.twig b/core/themes/classy/templates/image/image-rotate-summary.html.twig similarity index 100% rename from core/themes/classy/templates/image-rotate-summary.html.twig rename to core/themes/classy/templates/image/image-rotate-summary.html.twig diff --git a/core/themes/classy/templates/image-scale-summary.html.twig b/core/themes/classy/templates/image/image-scale-summary.html.twig similarity index 100% rename from core/themes/classy/templates/image-scale-summary.html.twig rename to core/themes/classy/templates/image/image-scale-summary.html.twig diff --git a/core/themes/classy/templates/image-style-preview.html.twig b/core/themes/classy/templates/image/image-style-preview.html.twig similarity index 100% rename from core/themes/classy/templates/image-style-preview.html.twig rename to core/themes/classy/templates/image/image-style-preview.html.twig diff --git a/core/themes/classy/templates/image-style.html.twig b/core/themes/classy/templates/image/image-style.html.twig similarity index 100% rename from core/themes/classy/templates/image-style.html.twig rename to core/themes/classy/templates/image/image-style.html.twig diff --git a/core/themes/classy/templates/image-widget.html.twig b/core/themes/classy/templates/image/image-widget.html.twig similarity index 100% rename from core/themes/classy/templates/image-widget.html.twig rename to core/themes/classy/templates/image/image-widget.html.twig diff --git a/core/themes/classy/templates/link-formatter-link-separate.html.twig b/core/themes/classy/templates/link/link-formatter-link-separate.html.twig similarity index 100% rename from core/themes/classy/templates/link-formatter-link-separate.html.twig rename to core/themes/classy/templates/link/link-formatter-link-separate.html.twig diff --git a/core/themes/classy/templates/field--node--created.html.twig b/core/themes/classy/templates/node/field--node--created.html.twig similarity index 100% rename from core/themes/classy/templates/field--node--created.html.twig rename to core/themes/classy/templates/node/field--node--created.html.twig diff --git a/core/themes/classy/templates/field--node--title.html.twig b/core/themes/classy/templates/node/field--node--title.html.twig similarity index 100% rename from core/themes/classy/templates/field--node--title.html.twig rename to core/themes/classy/templates/node/field--node--title.html.twig diff --git a/core/themes/classy/templates/field--node--uid.html.twig b/core/themes/classy/templates/node/field--node--uid.html.twig similarity index 100% rename from core/themes/classy/templates/field--node--uid.html.twig rename to core/themes/classy/templates/node/field--node--uid.html.twig diff --git a/core/themes/classy/templates/node-add-list.html.twig b/core/themes/classy/templates/node/node-add-list.html.twig similarity index 100% rename from core/themes/classy/templates/node-add-list.html.twig rename to core/themes/classy/templates/node/node-add-list.html.twig diff --git a/core/themes/classy/templates/node-edit-form.html.twig b/core/themes/classy/templates/node/node-edit-form.html.twig similarity index 100% rename from core/themes/classy/templates/node-edit-form.html.twig rename to core/themes/classy/templates/node/node-edit-form.html.twig diff --git a/core/themes/classy/templates/node.html.twig b/core/themes/classy/templates/node/node.html.twig similarity index 100% rename from core/themes/classy/templates/node.html.twig rename to core/themes/classy/templates/node/node.html.twig diff --git a/core/themes/classy/templates/rdf-metadata.html.twig b/core/themes/classy/templates/rdf/rdf-metadata.html.twig similarity index 100% rename from core/themes/classy/templates/rdf-metadata.html.twig rename to core/themes/classy/templates/rdf/rdf-metadata.html.twig diff --git a/core/themes/classy/templates/block--search-form-block.html.twig b/core/themes/classy/templates/search/block--search-form-block.html.twig similarity index 100% rename from core/themes/classy/templates/block--search-form-block.html.twig rename to core/themes/classy/templates/search/block--search-form-block.html.twig diff --git a/core/themes/classy/templates/search-result.html.twig b/core/themes/classy/templates/search/search-result.html.twig similarity index 100% rename from core/themes/classy/templates/search-result.html.twig rename to core/themes/classy/templates/search/search-result.html.twig diff --git a/core/themes/classy/templates/system/block--system-branding-block.html.twig b/core/themes/classy/templates/system/block--system-branding-block.html.twig new file mode 100644 index 0000000..f648773 --- /dev/null +++ b/core/themes/classy/templates/system/block--system-branding-block.html.twig @@ -0,0 +1,32 @@ +{% extends "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 %} +
+ {{ site_name }} +
+ {% endif %} + {% if site_slogan %} +
{{ site_slogan }}
+ {% endif %} +{% endblock %} diff --git a/core/themes/classy/templates/block.html.twig b/core/themes/classy/templates/system/block--system-menu-block.html.twig similarity index 51% rename from core/themes/classy/templates/block.html.twig rename to core/themes/classy/templates/system/block--system-menu-block.html.twig index aa750cb..dff7e39 100644 --- a/core/themes/classy/templates/block.html.twig +++ b/core/themes/classy/templates/system/block--system-menu-block.html.twig @@ -1,7 +1,7 @@ {# /** * @file - * Default theme implementation to display a block. + * Default theme implementation for a menu block. * * Available variables: * - plugin_id: The ID of the block implementation. @@ -19,17 +19,23 @@ * - 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: array of HTML attributes populated by modules, intended to - * be added to the main container tag of this template. + * - attributes: HTML attributes for the containing element. * - id: A valid HTML ID and guaranteed unique. - * - title_attributes: Same as attributes, except applied to the main title - * tag that appears in the template. + * - 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. * - * @see template_preprocess_block() + * 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 */ @@ -37,16 +43,23 @@ {% set classes = [ 'block', - 'block-' ~ configuration.provider|clean_class, + 'block-menu', + 'navigation', + 'menu--' ~ derivative_plugin_id|clean_class, ] %} - - {{ title_prefix }} - {% if label %} - {{ label }} +{% 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 %} - + diff --git a/core/themes/classy/templates/system/breadcrumb.html.twig b/core/themes/classy/templates/system/breadcrumb.html.twig new file mode 100644 index 0000000..f6a1705 --- /dev/null +++ b/core/themes/classy/templates/system/breadcrumb.html.twig @@ -0,0 +1,27 @@ +{# +/** + * @file + * Default theme implementation for a breadcrumb trail. + * + * Available variables: + * - breadcrumb: Breadcrumb trail items. + * + * @ingroup themeable + */ +#} +{% if breadcrumb %} + +{% endif %} diff --git a/core/themes/classy/templates/system/checkboxes.html.twig b/core/themes/classy/templates/system/checkboxes.html.twig new file mode 100644 index 0000000..7c56355 --- /dev/null +++ b/core/themes/classy/templates/system/checkboxes.html.twig @@ -0,0 +1,17 @@ +{# +/** + * @file + * Default theme implementation for a 'checkboxes' #type form element. + * + * Available variables + * - attributes: A list of HTML attributes for the wrapper element. + * - children: The rendered checkboxes. + * + * @see template_preprocess_checkboxes() + * + * @ingroup themeable + */ + @todo: remove this file once http://drupal.org/node/1819284 is resolved. + This is identical to core/modules/system/templates/container.html.twig +#} +{{ children }} diff --git a/core/themes/classy/templates/system/confirm-form.html.twig b/core/themes/classy/templates/system/confirm-form.html.twig new file mode 100644 index 0000000..d714917 --- /dev/null +++ b/core/themes/classy/templates/system/confirm-form.html.twig @@ -0,0 +1,15 @@ +{# +/** + * @file + * Default theme implementation for confirm form. + * + * By default this does not alter the appearance of a form at all, + * but is provided as a convenience for themers. + * + * Available variables: + * - form: The confirm form. + * + * @ingroup themeable + */ +#} +{{ form }} diff --git a/core/themes/classy/templates/system/container.html.twig b/core/themes/classy/templates/system/container.html.twig new file mode 100644 index 0000000..6fb8159 --- /dev/null +++ b/core/themes/classy/templates/system/container.html.twig @@ -0,0 +1,20 @@ +{# +/** + * @file + * Default theme implementation of a container used to wrap child elements. + * + * Used for grouped form items. Can also be used as a #theme_wrapper for any + * renderable element, to surround it with a
and HTML attributes. + * + * Available variables: + * - attributes: HTML attributes for the containing element. + * - children: The rendered child elements of the container. + * - has_parent: A flag to indicate that the container has one or more parent + containers. + * + * @see template_preprocess_container() + * + * @ingroup themeable + */ +#} +{{ children }}
diff --git a/core/themes/classy/templates/system/datetime-form.html.twig b/core/themes/classy/templates/system/datetime-form.html.twig new file mode 100644 index 0000000..bf31668 --- /dev/null +++ b/core/themes/classy/templates/system/datetime-form.html.twig @@ -0,0 +1,17 @@ +{# +/** + * @file + * Default theme implementation of a datetime form element. + * + * Available variables: + * - attributes: HTML attributes for the datetime form element. + * - content: The datelist form element to be output. + * + * @see template_preprocess_datetime_form() + * + * @ingroup themeable + */ +#} + + {{ content }} + diff --git a/core/themes/classy/templates/system/datetime-wrapper.html.twig b/core/themes/classy/templates/system/datetime-wrapper.html.twig new file mode 100644 index 0000000..45ba069 --- /dev/null +++ b/core/themes/classy/templates/system/datetime-wrapper.html.twig @@ -0,0 +1,30 @@ +{# +/** + * @file + * Default theme implementation of a datetime form wrapper. + * + * Available variables: + * - content: The form element to be output, usually a datelist, or datetime. + * - title: The title of the form element. + * - title_attributes: HTML attributes for the title wrapper. + * - description: Description text for the form element. + * - required: An indicator for whether the associated form element is required. + * + * @see template_preprocess_datetime_wrapper() + * + * @ingroup themeable + */ +#} +{% + set title_classes = [ + 'label', + required ? 'form-required', + ] +%} +{% if title %} + {{ title }} +{% endif %} +{{ content }} +{% if description %} +
{{ description }}
+{% endif %} diff --git a/core/themes/classy/templates/system/details.html.twig b/core/themes/classy/templates/system/details.html.twig new file mode 100644 index 0000000..17ea820 --- /dev/null +++ b/core/themes/classy/templates/system/details.html.twig @@ -0,0 +1,33 @@ +{# +/** + * @file + * Default theme implementation for a details element. + * + * Available variables + * - attributes: A list of HTML attributes for the details element. + * - title: (optional) The title of the element, may not be set. + * - description: (optional) The description of the element, may not be set. + * - children: (optional) The children of the element, may not be set. + * - value: (optional) The value of the element, may not be set. + * + * @see template_preprocess_details() + * + * @ingroup themeable + */ +#} + + {%- if title -%} + {{ title }} + {%- endif -%} +
+ {%- if description -%} +
{{ description }}
+ {%- endif -%} + {%- if children -%} + {{ children }} + {%- endif -%} + {%- if value -%} + {{ value }} + {%- endif -%} +
+ diff --git a/core/themes/classy/templates/system/dropbutton-wrapper.html.twig b/core/themes/classy/templates/system/dropbutton-wrapper.html.twig new file mode 100644 index 0000000..ca0ff7e --- /dev/null +++ b/core/themes/classy/templates/system/dropbutton-wrapper.html.twig @@ -0,0 +1,23 @@ +{# +/** + * @file + * Default theme implementation for a dropbutton wrapper. + * + * Available variables: + * - children: Contains the child elements of the dropbutton menu. + * + * @see template_preprocess() + * @see template_preprocess_dropbutton_wrapper() + * + * @ingroup themeable + */ +#} +{% if children %} + {% spaceless %} +
+
+ {{ children }} +
+
+ {% endspaceless %} +{% endif %} diff --git a/core/themes/classy/templates/system/feed-icon.html.twig b/core/themes/classy/templates/system/feed-icon.html.twig new file mode 100644 index 0000000..b3c10d1 --- /dev/null +++ b/core/themes/classy/templates/system/feed-icon.html.twig @@ -0,0 +1,18 @@ +{# +/** + * @file + * Default theme implementation for a feed icon. + * + * Available variables: + * - url: An internal system path or a fully qualified external URL of the feed. + * - icon: The rendered HTML ( tag) for the feed icon image. + * - attributes: Remaining HTML attributes for the feed link. + * - title: A descriptive title of the feed link. + * - class: HTML classes to be applied to the feed link. + * + * @see template_preprocess_feed_icon() + * + * @ingroup themeable + */ +#} +{{ icon }} diff --git a/core/themes/classy/templates/system/field-multiple-value-form.html.twig b/core/themes/classy/templates/system/field-multiple-value-form.html.twig new file mode 100644 index 0000000..f18a853 --- /dev/null +++ b/core/themes/classy/templates/system/field-multiple-value-form.html.twig @@ -0,0 +1,36 @@ +{# +/** + * @file + * Default theme implementation for an individual form element. + * + * Available variables for all fields: + * - multiple: Whether there are multiple instances of the field. + * + * Available variables for single cardinality fields: + * - elements: Form elements to be rendered. + * + * Available variables when there are multiple fields. + * - table: Table of field items. + * - description: Description text for the form element. + * - button: "Add another item" button. + * + * @see template_preprocess_field_multiple_value_form() + * + * @ingroup themeable + */ +#} +{% if multiple %} +
+ {{ table }} + {% if description %} +
{{ description }}
+ {% endif %} + {% if button %} +
{{ button }}
+ {% endif %} +
+{% else %} + {% for element in elements %} + {{ element }} + {% endfor %} +{% endif %} diff --git a/core/themes/classy/templates/system/field.html.twig b/core/themes/classy/templates/system/field.html.twig new file mode 100644 index 0000000..0745f84 --- /dev/null +++ b/core/themes/classy/templates/system/field.html.twig @@ -0,0 +1,67 @@ +{# +/** + * @file + * Default theme implementation for a field. + * + * To override output, copy the "field.html.twig" from the templates directory + * to your theme's directory and customize it, just like customizing other + * Drupal templates such as page.html.twig or node.html.twig. + * + * Instead of overriding the theming for all fields, you can also just override + * theming for a subset of fields using + * @link themeable Theme hook suggestions. @endlink For example, + * here are some theme hook suggestions that can be used for a field_foo field + * on an article node type: + * - field--node--field-foo--article.html.twig + * - field--node--field-foo.html.twig + * - field--node--article.html.twig + * - field--field-foo.html.twig + * - field--text-with-summary.html.twig + * - field.html.twig + * + * Available variables: + * - attributes: HTML attributes for the containing element. + * - label_hidden: Whether to show the field label or not. + * - title_attributes: HTML attributes for the title. + * - label: The label for the field. + * - content_attributes: HTML attributes for the content. + * - items: List of all the field items. Each item contains: + * - attributes: List of HTML attributes for each item. + * - content: The field item's content. + * - entity_type: The entity type to which the field belongs. + * - field_name: The name of the field. + * - field_type: The type of the field. + * - label_display: The display settings for the label. + * + * @see template_preprocess_field() + * + * @ingroup themeable + */ +#} +{% set field_name_class = field_name|clean_class %} +{% + set classes = [ + 'field', + 'field-' ~ entity_type|clean_class ~ '--' ~ field_name_class, + 'field-name-' ~ field_name_class, + 'field-type-' ~ field_type|clean_class, + 'field-label-' ~ label_display, + label_display == 'inline' ? 'clearfix', + ] +%} +{% + set title_classes = [ + 'field-label', + label_display == 'visually_hidden' ? 'visually-hidden', + ] +%} + + {% if not label_hidden %} + {{ label }} + {% endif %} + + {% for item in items %} + {{ item.content }} + {% endfor %} + + diff --git a/core/themes/classy/templates/system/fieldset.html.twig b/core/themes/classy/templates/system/fieldset.html.twig new file mode 100644 index 0000000..ab6796c --- /dev/null +++ b/core/themes/classy/templates/system/fieldset.html.twig @@ -0,0 +1,47 @@ +{# +/** + * @file + * Default theme implementation for a fieldset element and its children. + * + * Available variables: + * - attributes: HTML attributes for the fieldset element. + * - required: Boolean indicating whether the fieldeset element is required. + * - legend: The legend element containing the following properties: + * - title: Title of the fieldset, intended for use as the text of the legend. + * - attributes: HTML attributes to apply to the legend. + * - description: The description element containing the following properties: + * - content: The description content of the fieldset. + * - attributes: HTML attributes to apply to the description container. + * - children: The rendered child elements of the fieldset. + * - prefix: The content to add before the fieldset children. + * - suffix: The content to add after the fieldset children. + * + * @see template_preprocess_fieldset() + * + * @ingroup themeable + */ +#} + + {% + set legend_span_classes = [ + 'fieldset-legend', + required ? 'form-required', + ] + %} + {# Always wrap fieldset legends in a SPAN for CSS positioning. #} + + {{ legend.title }} + +
+ {% if prefix %} + {{ prefix }} + {% endif %} + {{ children }} + {% if suffix %} + {{ suffix }} + {% endif %} + {% if description.content %} + {{ description.content }}
+ {% endif %} + + diff --git a/core/themes/classy/templates/system/form-element-label.html.twig b/core/themes/classy/templates/system/form-element-label.html.twig new file mode 100644 index 0000000..6ececd9 --- /dev/null +++ b/core/themes/classy/templates/system/form-element-label.html.twig @@ -0,0 +1,26 @@ +{# +/** + * @file + * Default theme implementation for a form element label. + * + * Available variables: + * - title: The label's text. + * - title_display: Elements title_display setting. + * - required: An indicator for whether the associated form element is required. + * - attributes: A list of HTML attributes for the label. + * + * @see template_preprocess_form_element_label() + * + * @ingroup themeable + */ +#} +{% + set classes = [ + title_display == 'after' ? 'option', + title_display == 'invisible' ? 'visually-hidden', + required ? 'form-required', + ] +%} +{% if title is not empty or required -%} + {{ title }} +{%- endif %} diff --git a/core/themes/classy/templates/system/form-element.html.twig b/core/themes/classy/templates/system/form-element.html.twig new file mode 100644 index 0000000..a961801 --- /dev/null +++ b/core/themes/classy/templates/system/form-element.html.twig @@ -0,0 +1,87 @@ +{# +/** + * @file + * Default theme implementation for a form element. + * + * Available variables: + * - attributes: HTML attributes for the containing element. + * - prefix: (optional) The form element prefix, may not be set. + * - suffix: (optional) The form element suffix, may not be set. + * - required: The required marker, or empty if the associated form element is + * not required. + * - type: The type of the element. + * - name: The name of the element. + * - label: A rendered label element. + * - label_display: Label display setting. It can have these values: + * - before: The label is output before the element. This is the default. + * The label includes the #title and the required marker, if #required. + * - after: The label is output after the element. For example, this is used + * for radio and checkbox #type elements. If the #title is empty but the + * field is #required, the label will contain only the required marker. + * - invisible: Labels are critical for screen readers to enable them to + * properly navigate through forms but can be visually distracting. This + * property hides the label for everyone except screen readers. + * - attribute: Set the title attribute on the element to create a tooltip but + * output no label element. This is supported only for checkboxes and radios + * in \Drupal\Core\Render\Element\CompositeFormElementTrait::preRenderCompositeFormElement(). + * It is used where a visual label is not needed, such as a table of + * checkboxes where the row and column provide the context. The tooltip will + * include the title and required marker. + * - description: (optional) A list of description properties containing: + * - content: A description of the form element, may not be set. + * - attributes: (optional) A list of HTML attributes to apply to the + * description content wrapper. Will only be set when description is set. + * - description_display: Description display setting. It can have these values: + * - before: The description is output before the element. + * - after: The description is output after the element. This is the default + * value. + * - invisible: The description is output after the element, hidden visually + * but available to screen readers. + * - disabled: True if the element is disabled. + * - title_display: Title display setting. + * + * @see template_preprocess_form_element() + * + * @ingroup themeable + */ +#} +{% + set classes = [ + 'form-item', + 'form-type-' ~ type|clean_class, + 'form-item-' ~ name|clean_class, + title_display not in ['after', 'before'] ? 'form-no-label', + disabled == 'disabled' ? 'form-disabled', + ] +%} +{% + set description_classes = [ + 'description', + description_display == 'invisible' ? 'visually-hidden', + ] +%} + + {% if label_display in ['before', 'invisible'] %} + {{ label }} + {% endif %} + {% if prefix is not empty %} + {{ prefix }} + {% endif %} + {% if description_display == 'before' and description.content %} + + {{ description.content }} + + {% endif %} + {{ children }} + {% if suffix is not empty %} + {{ suffix }} + {% endif %} + {% if label_display == 'after' %} + {{ label }} + {% endif %} + {% if description_display in ['after', 'invisible'] and description.content %} + + {{ description.content }} + + {% endif %} + diff --git a/core/themes/classy/templates/system/form.html.twig b/core/themes/classy/templates/system/form.html.twig new file mode 100644 index 0000000..2cd1e95 --- /dev/null +++ b/core/themes/classy/templates/system/form.html.twig @@ -0,0 +1,17 @@ +{# +/** + * @file + * Default theme implementation for a 'form' element. + * + * Available variables + * - attributes: A list of HTML attributes for the wrapper element. + * - children: The child elements of the form. + * + * @see template_preprocess_form() + * + * @ingroup themeable + */ +#} + + {{ children }} + diff --git a/core/themes/classy/templates/system/html.html.twig b/core/themes/classy/templates/system/html.html.twig new file mode 100644 index 0000000..888cf2d --- /dev/null +++ b/core/themes/classy/templates/system/html.html.twig @@ -0,0 +1,56 @@ +{# +/** + * @file + * Default theme implementation for the basic structure of a single Drupal page. + * + * Variables: + * - logged_in: A flag indicating if user is logged in. + * - root_path: The root path of the current page (e.g., node, admin, user). + * - node_type: The content type for the current node, if the page is a node. + * - css: A list of CSS files for the current page. + * - head: Markup for the HEAD element (including meta tags, keyword tags, and + * so on). + * - head_title: A modified version of the page title, for use in the TITLE tag. + * - head_title_array: List of text elements that make up the head_title + * variable. May contain or more of the following: + * - title: The title of the page. + * - name: The name of the site. + * - slogan: The slogan of the site. + * - page_top: Initial rendered markup. This should be printed before 'page'. + * - page: The rendered page markup. + * - page_bottom: Closing rendered markup. This variable should be printed after + * 'page'. + * - styles: Style tags necessary to import all necessary CSS files in the head. + * - scripts: Script tags necessary to load the JavaScript files and settings + * in the head. + * + * @see template_preprocess_html() + * + * @ingroup themeable + */ +#} +{% + set body_classes = [ + logged_in ? 'user-logged-in', + not root_path ? 'path-frontpage' : 'path-' ~ root_path|clean_class, + node_type ? 'node--type-' ~ node_type|clean_class, + ] +%} + + + + {{ head }} + {{ head_title }} + {{ styles }} + {{ scripts }} + + + + {{ page_top }} + {{ page }} + {{ page_bottom }} + {{ scripts_bottom }} + + diff --git a/core/themes/classy/templates/system/image.html.twig b/core/themes/classy/templates/system/image.html.twig new file mode 100644 index 0000000..2f29304 --- /dev/null +++ b/core/themes/classy/templates/system/image.html.twig @@ -0,0 +1,20 @@ +{# +/** + * @file + * Default theme implementation of an image. + * + * Available variables: + * - attributes: HTML attributes for the img tag. + * - style_name: (optional) The name of the image style applied. + * + * @see template_preprocess_image() + * + * @ingroup themeable + */ +#} +{% +set classes = [ + style_name ? 'image-style-' ~ style_name|clean_class, +] +%} + diff --git a/core/themes/classy/templates/system/indentation.html.twig b/core/themes/classy/templates/system/indentation.html.twig new file mode 100644 index 0000000..e5e7b32 --- /dev/null +++ b/core/themes/classy/templates/system/indentation.html.twig @@ -0,0 +1,20 @@ +{# +/** + * @file + * Default theme implementation for a set of indentation divs. + * + * These
tags are used for drag and drop tables. + * + * Available variables: + * - size: Optional. The number of indentations to create. + * + * @ingroup themeable + */ +#} + +{% for i in 1..size if size > 0 %}
 
{% endfor %} diff --git a/core/themes/classy/templates/system/input.html.twig b/core/themes/classy/templates/system/input.html.twig new file mode 100644 index 0000000..1409c25 --- /dev/null +++ b/core/themes/classy/templates/system/input.html.twig @@ -0,0 +1,15 @@ +{# +/** + * @file + * Default theme implementation for an 'input' #type form element. + * + * Available variables: + * - attributes: A list of HTML attributes for the input element. + * - children: Optional additional rendered elements. + * + * @see template_preprocess_input() + * + * @ingroup themeable + */ +#} +{{ children }} diff --git a/core/themes/classy/templates/system/item-list.html.twig b/core/themes/classy/templates/system/item-list.html.twig new file mode 100644 index 0000000..bd71e7f --- /dev/null +++ b/core/themes/classy/templates/system/item-list.html.twig @@ -0,0 +1,36 @@ +{# +/** + * @file + * Default theme implementation for an item list. + * + * Available variables: + * - items: A list of items. Each item contains: + * - attributes: HTML attributes to be applied to each list item. + * - value: The content of the list element. + * - title: The title of the list. + * - list_type: The tag for list element ("ul" or "ol"). + * - attributes: HTML attributes to be applied to the list. + * - empty: A message to display when there are no items. Allowed value is a + * string or render array. + * + * @see template_preprocess_item_list() + * + * @ingroup themeable + */ +#} +{%- if items or empty -%} +
+ {%- if title is not empty -%} +

{{ title }}

+ {%- endif -%} + {%- if items -%} + <{{ list_type }}{{ attributes }}> + {%- for item in items -%} + {{ item.value }} + {%- endfor -%} + + {%- else -%} + {{- empty -}} + {%- endif -%} +
+{%- endif %} diff --git a/core/themes/classy/templates/links.html.twig b/core/themes/classy/templates/system/links.html.twig similarity index 100% rename from core/themes/classy/templates/links.html.twig rename to core/themes/classy/templates/system/links.html.twig diff --git a/core/themes/classy/templates/system/maintenance-page.html.twig b/core/themes/classy/templates/system/maintenance-page.html.twig new file mode 100644 index 0000000..fd780d4 --- /dev/null +++ b/core/themes/classy/templates/system/maintenance-page.html.twig @@ -0,0 +1,67 @@ +{# +/** + * @file + * Default theme implementation to display a single Drupal page while offline. + * + * All available variables are mirrored in page.html.twig. + * Some may be blank but they are provided for consistency. + * + * @see template_preprocess_maintenance_page() + * + * @ingroup themeable + */ +#} +
+ +
+ {% if logo %} + + {{ 'Home'|t }} + + {% endif %} + + {% if site_name or site_slogan %} +
+ {% if site_name %} +

+ {{ site_name }} +

+ {% endif %} + + {% if site_slogan %} +
{{ site_slogan }}
+ {% endif %} +
{# /.name-and-slogan #} + {% endif %} + +
+ +
+ {% if title %} +

{{ title }}

+ {% endif %} + + {{ messages }} + + {{ page.content }} +
+ + {% if page.sidebar_first %} + {# /.layout-sidebar-first #} + {% endif %} + + {% if page.sidebar_second %} + {# /.layout-sidebar-second #} + {% endif %} + + {% if page.footer %} +
+ {{ page.footer }} +
+ {% endif %} + +
{# /.layout-container #} diff --git a/core/themes/classy/templates/system/mark.html.twig b/core/themes/classy/templates/system/mark.html.twig new file mode 100644 index 0000000..2798bb0 --- /dev/null +++ b/core/themes/classy/templates/system/mark.html.twig @@ -0,0 +1,22 @@ +{# +/** + * @file + * Default theme implementation for a marker for new or updated content. + * + * Available variables: + * - status: Number representing the marker status to display. Use the constants + * below for comparison: + * - MARK_NEW + * - MARK_UPDATED + * - MARK_READ + * + * @ingroup themeable + */ +#} +{% if logged_in %} + {% if status is constant('MARK_NEW') %} + {{ 'new'|t }} + {% elseif status is constant('MARK_UPDATED') %} + {{ 'updated'|t }} + {% endif %} +{% endif %} diff --git a/core/themes/classy/templates/system/menu-local-action.html.twig b/core/themes/classy/templates/system/menu-local-action.html.twig new file mode 100644 index 0000000..0eb03a9 --- /dev/null +++ b/core/themes/classy/templates/system/menu-local-action.html.twig @@ -0,0 +1,15 @@ +{# +/** + * @file + * Default theme implementation for a single local action link. + * + * Available variables: + * - attributes: HTML attributes for the wrapper element. + * - link: A rendered link element. + * + * @see template_preprocess_menu_local_action() + * + * @ingroup themeable + */ +#} +{{ link }} diff --git a/core/themes/classy/templates/system/menu-local-task.html.twig b/core/themes/classy/templates/system/menu-local-task.html.twig new file mode 100644 index 0000000..5939203 --- /dev/null +++ b/core/themes/classy/templates/system/menu-local-task.html.twig @@ -0,0 +1,18 @@ +{# +/** + * @file + * Default theme implementation for a local task link. + * + * Available variables: + * - attributes: HTML attributes for the wrapper element. + * - link: A rendered link element. + * + * Note: This template renders the content for each task item in + * menu-local-tasks.html.twig. + * + * @see template_preprocess_menu_local_task() + * + * @ingroup themeable + */ +#} +{{ link }} diff --git a/core/themes/classy/templates/system/menu-local-tasks.html.twig b/core/themes/classy/templates/system/menu-local-tasks.html.twig new file mode 100644 index 0000000..dce922b --- /dev/null +++ b/core/themes/classy/templates/system/menu-local-tasks.html.twig @@ -0,0 +1,25 @@ +{# +/** + * @file + * Default theme implementation to display primary and secondary local tasks. + * + * Available variables: + * - primary: HTML list items representing primary tasks. + * - secondary: HTML list items representing primary tasks. + * + * Each item in these variables (primary and secondary) can be individually + * themed in menu-local-task.html.twig. + * + * @see template_preprocess_menu_local_tasks() + * + * @ingroup themeable + */ +#} +{% if primary %} +

{{ 'Primary tabs'|t }}

+
    {{ primary }}
+{% endif %} +{% if secondary %} +

{{ 'Secondary tabs'|t }}

+
    {{ secondary }}
+{% endif %} diff --git a/core/themes/classy/templates/system/menu.html.twig b/core/themes/classy/templates/system/menu.html.twig new file mode 100644 index 0000000..f01ce84 --- /dev/null +++ b/core/themes/classy/templates/system/menu.html.twig @@ -0,0 +1,44 @@ +{# +/** + * @file + * Default theme implementation to display a menu. + * + * Available variables: + * - menu_name: The machine name of the menu. + * - items: A nested list of menu items. Each menu item contains: + * - attributes: HTML attributes for the menu item. + * - below: The menu item child items. + * - title: The menu link title. + * - url: The menu link url, instance of \Drupal\Core\Url + * - localized_options: Menu link localized options. + * + * @ingroup themeable + */ +#} +{% import _self as menus %} + +{# + We call a macro which calls itself to render the full tree. + @see http://twig.sensiolabs.org/doc/tags/macro.html +#} +{{ menus.menu_links(items, attributes, 0) }} + +{% macro menu_links(items, attributes, menu_level) %} + {% import _self as menus %} + {% if items %} + {% if menu_level == 0 %} + + {% else %} + + {% endif %} +{% endmacro %} diff --git a/core/themes/classy/templates/system/page.html.twig b/core/themes/classy/templates/system/page.html.twig new file mode 100644 index 0000000..627d7c7 --- /dev/null +++ b/core/themes/classy/templates/system/page.html.twig @@ -0,0 +1,144 @@ +{# +/** + * @file + * Default theme implementation to display a single page. + * + * The doctype, html, head and body tags are not in this template. Instead they + * can be found in the html.html.twig template in this directory. + * + * Available variables: + * + * General utility variables: + * - base_path: The base URL path of the Drupal installation. Will usually be + * "/" unless you have installed Drupal in a sub-directory. + * - is_front: A flag indicating if the current page is the front page. + * - logged_in: A flag indicating if the user is registered and signed in. + * - is_admin: A flag indicating if the user has permission to access + * administration pages. + * + * Site identity: + * - front_page: The URL of the front page. Use this instead of base_path when + * linking to the front page. This includes the language domain or prefix. + * - logo: The url of the logo image, as defined in theme settings. + * - site_name: The name of the site. This is empty when displaying the site + * name has been disabled in the theme settings. + * - site_slogan: The slogan of the site. This is empty when displaying the site + * slogan has been disabled in theme settings. + * + * Page content (in order of occurrence in the default page.html.twig): + * - title_prefix: Additional output populated by modules, intended to be + * displayed in front of the main title tag that appears in the template. + * - title: The page title, for use in the actual content. + * - title_suffix: Additional output populated by modules, intended to be + * displayed after the main title tag that appears in the template. + * - messages: Status and error messages. Should be displayed prominently. + * - tabs: Tabs linking to any sub-pages beneath the current page (e.g., the + * view and edit tabs when displaying a node). + * - action_links: Actions local to the page, such as "Add menu" on the menu + * administration interface. + * - node: Fully loaded node, if there is an automatically-loaded node + * associated with the page and the node ID is the second argument in the + * page's path (e.g. node/12345 and node/12345/revisions, but not + * comment/reply/12345). + * + * Regions: + * - page.header: Items for the header region. + * - page.primary_menu: Items for the primary menu region. + * - page.secondary_menu: Items for the secondary menu region. + * - page.highlighted: Items for the highlighted content region. + * - page.help: Dynamic help text, mostly for admin pages. + * - page.content: The main content of the current page. + * - page.sidebar_first: Items for the first sidebar. + * - page.sidebar_second: Items for the second sidebar. + * - page.footer: Items for the footer region. + * - page.breadcrumb: Items for the breadcrumb region. + * + * @see template_preprocess_page() + * @see html.html.twig + * + * @ingroup themeable + */ +#} +
+ +
+ {% if logo %} + + {{ 'Home'|t }} + + {% endif %} + + {% if site_name or site_slogan %} +
+ + {# Use h1 when the content title is empty #} + {% if title %} + + {{ site_name }} + + {% else %} +

+ {{ site_name }} +

+ {% endif %} + + {% if site_slogan %} +
{{ site_slogan }}
+ {% endif %} +
{# ./name-and-slogan #} + {% endif %} + + {{ page.header }} +
+ + {{ page.primary_menu }} + {{ page.secondary_menu }} + + {{ page.breadcrumb }} + + {{ messages }} + + {{ page.help }} + +
+ {# link is in html.html.twig #} + +
+ {{ page.highlighted }} + + {{ title_prefix }} + {% if title %} +

{{ title }}

+ {% endif %} + {{ title_suffix }} + + {{ tabs }} + + {% if action_links %} + + {% endif %} + + {{ page.content }} +
{# /.layout-content #} + + {% if page.sidebar_first %} + + {% endif %} + + {% if page.sidebar_second %} + + {% endif %} + +
+ + {% if page.footer %} +
+ {{ page.footer }} +
+ {% endif %} + +
{# /.layout-container #} diff --git a/core/themes/classy/templates/system/pager.html.twig b/core/themes/classy/templates/system/pager.html.twig new file mode 100644 index 0000000..a7acd5e --- /dev/null +++ b/core/themes/classy/templates/system/pager.html.twig @@ -0,0 +1,100 @@ +{# +/** + * @file + * Default theme implementation to display a pager. + * + * Available variables: + * - items: List of pager items. + * The list is keyed by the following elements: + * - first: Item for the first page; not present on the first page of results. + * - previous: Item for the previous page; not present on the first page + * of results. + * - next: Item for the next page; not present on the last page of results. + * - last: Item for the last page; not present on the last page of results. + * - pages: List of pages, keyed by page number. + * Sub-sub elements: + * items.first, items.previous, items.next, items.last, and each item inside + * items.pages contain the following elements: + * - href: URL with appropriate query parameters for the item. + * - attributes: A keyed list of HTML attributes for the item. + * - text: The visible text used for the item link, such as "‹ previous" + * or "next ›". + * - current: The page number of the current page. + * - ellipses: If there are more pages than the quantity allows, then an + * ellipsis before or after the listed pages may be present. + * - previous: Present if the currently visible list of pages does not start + * at the first page. + * - next: Present if the visible list of pages ends before the last page. + * + * @see template_preprocess_pager() + * + * @ingroup themeable + */ +#} +{% if items %} + +{% endif %} diff --git a/core/themes/classy/templates/system/progress-bar.html.twig b/core/themes/classy/templates/system/progress-bar.html.twig new file mode 100644 index 0000000..885a80f --- /dev/null +++ b/core/themes/classy/templates/system/progress-bar.html.twig @@ -0,0 +1,23 @@ +{# +/** + * @file + * Default theme implementation for a progress bar. + * + * Note that the core Batch API uses this only for non-JavaScript batch jobs. + * + * Available variables: + * - label: The label of the working task. + * - percent: The percentage of the progress. + * - message: A string containing information to be displayed. + * + * @ingroup themeable + */ +#} +
+ {% if label %} +
{{ label }}
+ {% endif %} +
+
{{ percent }}%
+
{{ message }}
+
diff --git a/core/themes/classy/templates/system/radios.html.twig b/core/themes/classy/templates/system/radios.html.twig new file mode 100644 index 0000000..bf38830 --- /dev/null +++ b/core/themes/classy/templates/system/radios.html.twig @@ -0,0 +1,15 @@ +{# +/** + * @file + * Default theme implementation for a 'radios' #type form element. + * + * Available variables + * - attributes: A list of HTML attributes for the wrapper element. + * - children: The rendered radios. + * + * @see template_preprocess_radios() + * + * @ingroup themeable + */ +#} +{{ children }}
diff --git a/core/themes/classy/templates/system/region.html.twig b/core/themes/classy/templates/system/region.html.twig new file mode 100644 index 0000000..b2c5471 --- /dev/null +++ b/core/themes/classy/templates/system/region.html.twig @@ -0,0 +1,27 @@ +{# +/** + * @file + * Default theme implementation to display a region. + * + * Available variables: + * - content: The content for this region, typically blocks. + * - attributes: HTML attributes for the region div. + * - region: The name of the region variable as defined in the theme's + * .info.yml file. + * + * @see template_preprocess_region() + * + * @ingroup themeable + */ +#} +{% + set classes = [ + 'region', + 'region-' ~ region|clean_class, + ] +%} +{% if content %} + + {{ content }} + +{% endif %} diff --git a/core/themes/classy/templates/system/select.html.twig b/core/themes/classy/templates/system/select.html.twig new file mode 100644 index 0000000..21f32ac --- /dev/null +++ b/core/themes/classy/templates/system/select.html.twig @@ -0,0 +1,15 @@ +{# +/** + * @file + * Default theme implementation for a select element. + * + * Available variables: + * - attributes: HTML attributes for the select tag. + * - options: The option element children. + * + * @see template_preprocess_select() + * + * @ingroup themeable + */ +#} +{{ options }} diff --git a/core/themes/classy/templates/system/status-messages.html.twig b/core/themes/classy/templates/system/status-messages.html.twig new file mode 100644 index 0000000..a2f3631 --- /dev/null +++ b/core/themes/classy/templates/system/status-messages.html.twig @@ -0,0 +1,57 @@ +{# +/** + * @file + * Default theme implementation for status messages. + * + * Displays status, error, and warning messages, grouped by type. + * + * An invisible heading identifies the messages for assistive technology. + * Sighted users see a colored box. See http://www.w3.org/TR/WCAG-TECHS/H69.html + * for info. + * + * Add an ARIA label to the contentinfo area so that assistive technology + * user agents will better describe this landmark. + * + * Available variables: + * - message_list: List of messages to be displayed, grouped by type. + * - status_headings: List of all status types. + * - display: (optional) May have a value of 'status' or 'error' when only + * displaying messages of that specific type. + * - attributes: HTML attributes for the element, including: + * - class: HTML classes. + * + * @see template_preprocess_status_messages() + * + * @ingroup themeable + */ +#} +{% for type, messages in message_list %} + {% + set classes = [ + 'messages', + 'messages--' ~ type, + ] + %} + + {# Remove type specific classes. #} + {{ attributes.removeClass(classes) }} +{% endfor %} diff --git a/core/themes/classy/templates/system/table.html.twig b/core/themes/classy/templates/system/table.html.twig new file mode 100644 index 0000000..3d0252e --- /dev/null +++ b/core/themes/classy/templates/system/table.html.twig @@ -0,0 +1,115 @@ +{# +/** + * @file + * Default theme implementation to display a table. + * + * Available variables: + * - attributes: HTML attributes to apply to the tag. + * - caption: A localized string for the tag. + * Note: Drupal currently supports only one table header row, see + * http://drupal.org/node/893530 and + * http://api.drupal.org/api/drupal/includes!theme.inc/function/theme_table/7#comment-5109. + * - header: Table header cells. Each cell contains the following properties: + * - tag: The HTML tag name to use; either TH or TD. + * - attributes: HTML attributes to apply to the tag. + * - content: A localized string for the title of the column. + * - field: Field name (required for column sorting). + * - sort: Default sort order for this column ("asc" or "desc"). + * - sticky: A flag indicating whether to use a "sticky" table header. + * - rows: Table rows. Each row contains the following properties: + * - attributes: HTML attributes to apply to the tag. + * - data: Table cells. + * - no_striping: A flag indicating that the row should receive no + * 'even / odd' styling. Defaults to FALSE. + * - cells: Table cells of the row. Each cell contains the following keys: + * - tag: The HTML tag name to use; either TH or TD. + * - attributes: Any HTML attributes, such as "colspan", to apply to the + * table cell. + * - content: The string to display in the table cell. + * - active_table_sort: A boolean indicating whether the cell is the active + table sort. + * - footer: Table footer rows, in the same format as the rows variable. + * - empty: The message to display in an extra row if table does not have + * any rows. + * - no_striping: A boolean indicating that the row should receive no striping. + * - header_columns: The number of columns in the header. + * + * @see template_preprocess_table() + * + * @ingroup themeable + */ +#} + + {% if caption %} + + {% endif %} + + {% for colgroup in colgroups %} + {% if colgroup.cols %} + + {% for col in colgroup.cols %} + + {% endfor %} + + {% else %} + + {% endif %} + {% endfor %} + + {% if header %} + + + {% for cell in header %} + {% + set cell_classes = [ + cell.active_table_sort ? 'active', + ] + %} + <{{ cell.tag }}{{ cell.attributes.addClass(cell_classes) }}> + {{- cell.content -}} + + {% endfor %} + + + {% endif %} + + {% if rows %} + + {% for row in rows %} + {% + set row_classes = [ + not no_striping ? cycle(['odd', 'even'], loop.index0), + ] + %} + + {% for cell in row.cells %} + <{{ cell.tag }}{{ cell.attributes }}> + {{- cell.content -}} + + {% endfor %} + + {% endfor %} + + {% elseif empty %} + + + + + + {% endif %} + {% if footer %} + + {% for row in footer %} + + {% for cell in row.cells %} + <{{ cell.tag }}{{ cell.attributes }}> + {{- cell.content -}} + + {% endfor %} + + {% endfor %} + + {% endif %} +
tag. + * - colgroups: Column groups. Each group contains the following properties: + * - attributes: HTML attributes to apply to the
{{ caption }}
{{ empty }}
diff --git a/core/themes/classy/templates/system/tablesort-indicator.html.twig b/core/themes/classy/templates/system/tablesort-indicator.html.twig new file mode 100644 index 0000000..059805f --- /dev/null +++ b/core/themes/classy/templates/system/tablesort-indicator.html.twig @@ -0,0 +1,18 @@ +{# +/** + * @file + * Default theme implementation for displaying a tablesort indicator. + * + * Available variables: + * - style: Either 'asc' or 'desc', indicating the sorting direction. + * + * @see template_preprocess_tablesort_indicator() + * + * @ingroup themeable + */ +#} +{% if style == 'asc' -%} + {{ 'sort ascending'|t }} +{% else -%} + {{ 'sort descending'|t }} +{% endif %} diff --git a/core/themes/classy/templates/system/textarea.html.twig b/core/themes/classy/templates/system/textarea.html.twig new file mode 100644 index 0000000..8a8426d --- /dev/null +++ b/core/themes/classy/templates/system/textarea.html.twig @@ -0,0 +1,27 @@ +{# +/** + * @file + * Default theme implementation for a 'textarea' #type form element. + * + * Available variables + * - wrapper_attributes: A list of HTML attributes for the wrapper element. + * - attributes: A list of HTML attributes for the textarea element. + * - resizable: An indicator for whether the textarea is resizable. + * - required: An indicator for whether the textarea is required. + * - value: The textarea content. + * + * @see template_preprocess_textarea() + * + * @ingroup themeable + */ +#} +{% + set classes = [ + 'form-textarea', + resizable ? 'resize-' ~ resizable, + required ? 'required', + ] +%} + + {{ value }} + diff --git a/core/themes/classy/templates/system/time.html.twig b/core/themes/classy/templates/system/time.html.twig new file mode 100644 index 0000000..521df56 --- /dev/null +++ b/core/themes/classy/templates/system/time.html.twig @@ -0,0 +1,28 @@ +{# +/** + * @file + * Default theme implementation for a date / time element. + * + * Available variables + * - timestamp: (optional) A UNIX timestamp for the datetime attribute. If the + * datetime cannot be represented as a UNIX timestamp, use a valid datetime + * attribute value in attributes.datetime. + * - text: (optional) The content to display within the