Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
{#
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>
<link rel="preload" href="/{{ olivero_path }}/fonts/metropolis/Metropolis-Bold.woff2" as="font" type="font/woff2" crossorigin>
......
......@@ -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) }}>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment