Unverified Commit 21080259 authored by Lauri Timmanee's avatar Lauri Timmanee
Browse files

Issue #3176910 by kishor_kolekar, anmolgoyal74, hansa11, kostyashupenko,...

Issue #3176910 by kishor_kolekar, anmolgoyal74, hansa11, kostyashupenko, mherchel: Move Olivero's preload.twig documentation to  @file and include variables passed for the template
parent 5deb8d7c
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
{#
  Preload the fonts for the headings and normal body copy (non bold and non italic).
/**
 * @file
 * Preload the non-bold & non-italic fonts for the headings and the body copy.
 *
 * Available variables:
 * - olivero_path: Returns the path to the Olivero theme.
 */
#}

<link rel="preload" href="/{{ olivero_path }}/fonts/metropolis/Metropolis-SemiBold.woff2" as="font" type="font/woff2" crossorigin>
+2 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
 * - db_offline: A flag indicating if the database is offline.
 * - placeholder_token: The token for generating head, css, js and js-bottom
 *   placeholders.
 * - olivero_path: Returns the path to an Olivero theme
 *
 * @see template_preprocess_html()
 */
@@ -38,7 +39,7 @@
    <title>{{ head_title|safe_join(' | ') }}</title>
    <css-placeholder token="{{ placeholder_token }}">
    <js-placeholder token="{{ placeholder_token }}">
    {% include '@olivero/includes/preload.twig' %}
    {% include '@olivero/includes/preload.twig' with { olivero_path: olivero_path } only %}
    {{ noscript_styles }}
  </head>
  <body{{ attributes.addClass(body_classes) }}>