annotate core/themes/classy/templates/layout/html.html.twig @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 4c8ae668cc8c
children
rev   line source
Chris@0 1 {#
Chris@0 2 /**
Chris@0 3 * @file
Chris@0 4 * Theme override for the basic structure of a single Drupal page.
Chris@0 5 *
Chris@0 6 * Variables:
Chris@0 7 * - logged_in: A flag indicating if user is logged in.
Chris@0 8 * - root_path: The root path of the current page (e.g., node, admin, user).
Chris@0 9 * - node_type: The content type for the current node, if the page is a node.
Chris@0 10 * - head_title: List of text elements that make up the head_title variable.
Chris@0 11 * May contain one or more of the following:
Chris@0 12 * - title: The title of the page.
Chris@0 13 * - name: The name of the site.
Chris@0 14 * - slogan: The slogan of the site.
Chris@0 15 * - page_top: Initial rendered markup. This should be printed before 'page'.
Chris@0 16 * - page: The rendered page markup.
Chris@0 17 * - page_bottom: Closing rendered markup. This variable should be printed after
Chris@0 18 * 'page'.
Chris@0 19 * - db_offline: A flag indicating if the database is offline.
Chris@0 20 * - placeholder_token: The token for generating head, css, js and js-bottom
Chris@0 21 * placeholders.
Chris@0 22 *
Chris@0 23 * @see template_preprocess_html()
Chris@0 24 */
Chris@0 25 #}
Chris@0 26 {%
Chris@0 27 set body_classes = [
Chris@0 28 logged_in ? 'user-logged-in',
Chris@0 29 not root_path ? 'path-frontpage' : 'path-' ~ root_path|clean_class,
Chris@0 30 node_type ? 'page-node-type-' ~ node_type|clean_class,
Chris@0 31 db_offline ? 'db-offline',
Chris@0 32 ]
Chris@0 33 %}
Chris@0 34 <!DOCTYPE html>
Chris@0 35 <html{{ html_attributes }}>
Chris@0 36 <head>
Chris@0 37 <head-placeholder token="{{ placeholder_token }}">
Chris@0 38 <title>{{ head_title|safe_join(' | ') }}</title>
Chris@0 39 <css-placeholder token="{{ placeholder_token }}">
Chris@0 40 <js-placeholder token="{{ placeholder_token }}">
Chris@0 41 </head>
Chris@0 42 <body{{ attributes.addClass(body_classes) }}>
Chris@0 43 {#
Chris@0 44 Keyboard navigation/accessibility link to main content section in
Chris@0 45 page.html.twig.
Chris@0 46 #}
Chris@0 47 <a href="#main-content" class="visually-hidden focusable skip-link">
Chris@0 48 {{ 'Skip to main content'|t }}
Chris@0 49 </a>
Chris@0 50 {{ page_top }}
Chris@0 51 {{ page }}
Chris@0 52 {{ page_bottom }}
Chris@0 53 <js-bottom-placeholder token="{{ placeholder_token }}">
Chris@0 54 </body>
Chris@0 55 </html>