浏览代码

Ticket #4480 - Update manifest and add service worker.

AntonLV 3 年之前
父节点
当前提交
0d1cce938d
共有 2 个文件被更改,包括 7 次插入 和 3 次删除
  1. 1 1
      modules/boonex/artificer/classes/BxArtificerTemplate.php
  2. 6 2
      sw.js.php

+ 1 - 1
modules/boonex/artificer/classes/BxArtificerTemplate.php

@@ -45,7 +45,7 @@ class BxArtificerTemplate extends BxBaseModGeneralTemplate
                 break;
 
             case 'footer':
-                $sResult .= $this->addJs([
+                $this->addJs([
                     'sidebar.js'
                 ]);
                 break;

+ 6 - 2
sw.js.php

@@ -51,8 +51,12 @@ if(!empty($sIconUrl))
 
 //--- Fonts
 if(getParam('sys_css_icons_default') != '') {
-    $aAssets[] = BX_DOL_URL_BASE . 'fonts/fa-solid-900.woff2';
-    $aAssets[] = BX_DOL_URL_BASE . 'fonts/fa-regular-400.woff2';
+    $sHomeUrl = BX_DOL_URL_ROOT;
+    if(BxDolModuleQuery::getInstance()->isEnabledByName('bx_fontawesome'))
+        $sHomeUrl = BxDolModule::getInstance('bx_fontawesome')->_oConfig->getHomeUrl();
+
+    $aAssets[] = $sHomeUrl . 'template/fonts/fa-solid-900.woff2';
+    $aAssets[] = $sHomeUrl . 'template/fonts/fa-regular-400.woff2';
 }
 
 //$aAssets[] = 'https://ci.una.io/test/cache_public/bx_templ_css_61777a77ec925fa4b36db9699d01c960.css'; // some basic styles are included here instead of main css file, these styles need to be moved there then tis cache isn't needed