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
5deb8d7ce5
commit
210802590a
|
@ -1,5 +1,11 @@
|
|||
{#
|
||||
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>
|
||||
|
|
|
@ -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) }}>
|
||||
|
|
Loading…
Reference in New Issue