Requested by Razem

Preloaded fonts include in Vartheme so it’s already properly used with preload https://web.dev/preload-critical-assets/

Problem/Motivation

Preload critical assets to improve loading speed
Preload W3C Candidate Recommendation 26 June 2019

Can I use link rel preload

Proposed resolution

Follow the new way in the new Drupal default front end theme Olivero
{% include '@olivero/includes/preload.twig' with { olivero_path: olivero_path } only %}

https://git.drupalcode.org/project/drupal/-/blob/9.2.x/core/themes/olive...
https://git.drupalcode.org/project/drupal/-/blob/9.2.x/core/themes/olive...

Should have in Vartheme BS4 and VARTHEM_BS4_SUBTHEME
And the include
{%- include '@vartheme_bs4/includes/preload.twig' with { vartheme_bs4_path: vartheme_bs4_path, html_dir: html_attributes['dir'] } only -%}

{%- include '@VARTHEME_BS4_SUBTHEME/includes/preload.twig' with { VARTHEME_BS4_SUBTHEME_path: VARTHEME_BS4_SUBTHEME_path, html_dir: html_attributes['dir'] } only -%}
Themes should be able to add their preload assets as they like

Remaining tasks

  • Change
  • Test
  • Rrelease

User interface changes

Faster load of face fonts
or could be used for any other preloaded assets

API changes

None

Data model changes

None

CommentFileSizeAuthor
#9 Can-I-use-preload.png409.39 KBrajab natshah

Comments

RajabNatshah created an issue. See original summary.

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
StatusFileSize
new409.39 KB
rajab natshah’s picture

Issue summary: View changes

  • RajabNatshah committed 25849d2 on 8.x-6.x
    Issue #3192508: Add Preloaded fonts include in Vartheme BS4
    

  • RajabNatshah committed 6af7b1c on 9.0.x
    Issue #3192508: Add Preloaded fonts include in Vartheme BS4
    

  • RajabNatshah committed 83a77d6 on 8.x-6.x
    Issue #3192508: Add Preloaded fonts include in Vartheme BS4
    
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Assigned: rajab natshah » mohammed j. razem
Status: Active » Needs review
Issue tags: +varbase-8.8.9, +varbase-9.0.0-rc2, +varbase-9.0.0
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
rajab natshah’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.