1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-11 00:54:49 +02:00

e107::link() now supports a plain HTML string. Useful for font preloading.

eg. e107::link('rel="preload" href="{THEME}fonts/fontawesome-webfont.woff2?v=4.7.0" as="font" type="font/woff2" crossorigin');
Bootstrap automatic font preload added.
This commit is contained in:
Cameron
2020-12-03 08:22:51 -08:00
parent 6fd582655a
commit f621aeaa56
4 changed files with 44 additions and 10 deletions

View File

@@ -469,6 +469,16 @@ class core_library
),
'library_path' => '{e_WEB}lib/bootstrap',
'path' => '3',
'preload' => array(
0 => array(
'as' => 'font',
'type' => 'font/woff2',
'path' => 'fonts/glyphicons-halflings-regular.woff2',
'crossorigin' => true,
'browsercache' => false,
),
),
);
// Bootstrap Editable (CDN).
@@ -855,6 +865,7 @@ class core_library
/**
* Alters library information before detection and caching takes place.
* @param array $libraries
*/
function config_alter(&$libraries)
{