Upgraded FontAwesome 6 to FontAwesome 7 Free
This commit is contained in:
@@ -45,8 +45,7 @@ $params_googleanalytics = $this->params->get('googleanalytics', false);
|
||||
$params_googleanalyticsid = $this->params->get('googleanalyticsid', null);
|
||||
$params_custom_head_start = $this->params->get('custom_head_start', null);
|
||||
$params_custom_head_end = $this->params->get('custom_head_end', null);
|
||||
$params_leftIcon = htmlspecialchars($this->params->get('drawerLeftIcon', 'fa-solid fa-chevron-left'), ENT_COMPAT, 'UTF-8');
|
||||
$params_rightIcon = htmlspecialchars($this->params->get('drawerRightIcon', 'fa-solid fa-chevron-right'), ENT_COMPAT, 'UTF-8');
|
||||
$params_developmentmode = $this->params->get('developmentmode', false);
|
||||
|
||||
// Bootstrap behaviors (assets handled via WAM)
|
||||
HTMLHelper::_('bootstrap.framework');
|
||||
@@ -165,9 +164,6 @@ if ($params_FontScheme) {
|
||||
}
|
||||
}
|
||||
|
||||
// Expose CSS variables (and any computed font variables)
|
||||
$wa->addInlineStyle(":root {\n --hue: 214;\n --template-bg-light: #f0f4fb;\n --template-text-dark: #495057;\n --template-text-light: #ffffff;\n --template-link-color: #2a69b8;\n --template-special-color: #001B4C;\n $fontStyles\n}");
|
||||
|
||||
// -------------------------------------
|
||||
// Brand: logo from params OR siteTitle
|
||||
// -------------------------------------
|
||||
@@ -206,11 +202,43 @@ $stickyHeader = $this->params->get('stickyHeader') ? 'position-sticky sticky-top
|
||||
// Meta
|
||||
$this->setMetaData('viewport', 'width=device-width, initial-scale=1');
|
||||
|
||||
// Optional Font Awesome Kit (not defined in JSON)
|
||||
if ($this->params->get('fA6KitCode')) {
|
||||
$fa6Kit = "https://kit.fontawesome.com/" . $this->params->get('fA6KitCode') . ".js";
|
||||
HTMLHelper::_('script', $fa6Kit, ['crossorigin' => 'anonymous']);
|
||||
if ($this->params->get('faKitCode')) {
|
||||
$faKit = "https://kit.fontawesome.com/" . $this->params->get('faKitCode') . ".js";
|
||||
HTMLHelper::_('script', $faKit, ['crossorigin' => 'anonymous']);
|
||||
} else {
|
||||
try {
|
||||
if($params_developmentmode){
|
||||
$wa->useStyle('vendor.fa7free.all');
|
||||
$wa->useStyle('vendor.fa7free.brands');
|
||||
$wa->useStyle('vendor.fa7free.fontawesome');
|
||||
$wa->useStyle('vendor.fa7free.regular');
|
||||
$wa->useStyle('vendor.fa7free.solid');
|
||||
} else {
|
||||
$wa->useStyle('vendor.fa7free.all.min');
|
||||
$wa->useStyle('vendor.fa7free.brands.min');
|
||||
$wa->useStyle('vendor.fa7free.fontawesome.min');
|
||||
$wa->useStyle('vendor.fa7free.regular.min');
|
||||
$wa->useStyle('vendor.fa7free.solid.min');
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
if($params_developmentmode){
|
||||
$wa->registerAndUseStyle('vendor.fa7free.all.dynamic', $templatePath . '/vendor/fa7free/css/all.css');
|
||||
$wa->registerAndUseStyle('vendor.fa7free.brands.dynamic', $templatePath . '/vendor/fa7free/css/brands.css');
|
||||
$wa->registerAndUseStyle('vendor.fa7free.fontawesome.dynamic', $templatePath . '/vendor/fa7free/css/fontawesome.css');
|
||||
$wa->registerAndUseStyle('vendor.fa7free.regular.dynamic', $templatePath . '/vendor/fa7free/css/regular.css');
|
||||
$wa->registerAndUseStyle('vendor.fa7free.solid.dynamic', $templatePath . '/vendor/fa7free/css/solid.css');
|
||||
} else {
|
||||
$wa->registerAndUseStyle('vendor.fa7free.all.min.dynamic', $templatePath . '/vendor/fa7free/css/all.min.css');
|
||||
$wa->registerAndUseStyle('vendor.fa7free.brands.min.dynamic', $templatePath . '/vendor/fa7free/css/brands.min.css');
|
||||
$wa->registerAndUseStyle('vendor.fa7free.fontawesome.min.dynamic', $templatePath . '/vendor/fa7free/css/fontawesome.min.css');
|
||||
$wa->registerAndUseStyle('vendor.fa7free.regular.min.dynamic', $templatePath . '/vendor/fa7free/css/regular.min.css');
|
||||
$wa->registerAndUseStyle('vendor.fa7free.solid.min.dynamic', $templatePath . '/vendor/fa7free/css/solid.min.css');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
$params_leftIcon = htmlspecialchars($this->params->get('drawerLeftIcon', 'fa-solid fa-chevron-left'), ENT_COMPAT, 'UTF-8');
|
||||
$params_rightIcon = htmlspecialchars($this->params->get('drawerRightIcon', 'fa-solid fa-chevron-right'), ENT_COMPAT, 'UTF-8');
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
{
|
||||
"name": "vendor.bootstrap-toc",
|
||||
"type": "style",
|
||||
"uri": "media/templates/site/moko-cassiopeia/css/vendor/afeld/bootstrap-toc.min.css",
|
||||
"uri": "media/templates/site/moko-cassiopeia/vendor/afeld/bootstrap-toc.min.css",
|
||||
"attributes":
|
||||
{
|
||||
"media": "all"
|
||||
@@ -123,11 +123,61 @@
|
||||
{
|
||||
"name": "vendor.bootstrap-toc.js",
|
||||
"type": "script",
|
||||
"uri": "media/templates/site/moko-cassiopeia/js/vendor/afeld/bootstrap-toc.min.js",
|
||||
"uri": "media/templates/site/moko-cassiopeia/vendor/afeld/bootstrap-toc.min.js",
|
||||
"attributes":
|
||||
{
|
||||
"defer": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "vendor.fa7free.all",
|
||||
"type": "style",
|
||||
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/all.css"
|
||||
},
|
||||
{
|
||||
"name": "vendor.fa7free.all.min",
|
||||
"type": "style",
|
||||
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/all.min.css"
|
||||
},
|
||||
{
|
||||
"name": "vendor.fa7free.brands",
|
||||
"type": "style",
|
||||
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/brands.css"
|
||||
},
|
||||
{
|
||||
"name": "vendor.fa7free.brands.min",
|
||||
"type": "style",
|
||||
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/brands.min.css"
|
||||
},
|
||||
{
|
||||
"name": "vendor.fa7free.fontawesome",
|
||||
"type": "style",
|
||||
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/fontawesome.css"
|
||||
},
|
||||
{
|
||||
"name": "vendor.fa7free.fontawesome.min",
|
||||
"type": "style",
|
||||
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/fontawesome.min.css"
|
||||
},
|
||||
{
|
||||
"name": "vendor.fa7free.regular",
|
||||
"type": "style",
|
||||
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/regular.css"
|
||||
},
|
||||
{
|
||||
"name": "vendor.fa7free.regular.min",
|
||||
"type": "style",
|
||||
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/regular.min.css"
|
||||
},
|
||||
{
|
||||
"name": "vendor.fa7free.solid",
|
||||
"type": "style",
|
||||
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/solid.css"
|
||||
},
|
||||
{
|
||||
"name": "vendor.fa7free.solid.min",
|
||||
"type": "style",
|
||||
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/solid.min.css"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
<folder>css</folder>
|
||||
<folder>images</folder>
|
||||
<folder>fonts</folder>
|
||||
<folder>vendor</folder>
|
||||
</media>
|
||||
<positions>
|
||||
<position>topbar</position>
|
||||
@@ -185,9 +186,6 @@
|
||||
<field name="theme_sep_typo" type="spacer" label="Typography" hr="false" class="text fw-bold" />
|
||||
<field name="useFontScheme" type="groupedlist" label="TPL_MOKO-CASSIOPEIA_FONT_LABEL" default="0">
|
||||
<option value="0">JNONE</option>
|
||||
<group label="TPL_MOKO-CASSIOPEIA_FONT_GROUP_LOCAL">
|
||||
<option value="media/templates/site/moko-cassiopeia/css/global/fonts-local_roboto.css">Roboto (local)</option>
|
||||
</group>
|
||||
<group label="TPL_MOKO-CASSIOPEIA_FONT_GROUP_WEB">
|
||||
<option value="https://fonts.googleapis.com/css2?family=Fira+Sans:wght@100;300;400;700&display=swap">Fira Sans (web)</option>
|
||||
<option value="https://fonts.googleapis.com/css2?family=Noto+Sans:wght@100;300;400;700&family=Roboto:wght@100;300;400;700&display=swap">Roboto + Noto Sans (web)</option>
|
||||
@@ -204,7 +202,7 @@
|
||||
<field name="logoFile" type="media" default="media/templates/site/moko-cassiopeia/images/logo.svg" label="TPL_MOKO-CASSIOPEIA_LOGO_LABEL" showon="brand:1" />
|
||||
<field name="siteTitle" type="text" default="" label="TPL_MOKO-CASSIOPEIA_TITLE" filter="string" showon="brand:1" />
|
||||
<field name="siteDescription" type="text" default="" label="TPL_MOKO-CASSIOPEIA_TAGLINE_LABEL" description="TPL_MOKO-CASSIOPEIA_TAGLINE_DESC" filter="string" showon="brand:1" />
|
||||
<field name="fA6KitCode" type="text" default="" label="TPL_MOKO-CASSIOPEIA_FA6KITCODE_LABEL" description="TPL_MOKO-CASSIOPEIA_FA6KITCODE_DESC" filter="string" />
|
||||
<field name="faKitCode" type="text" default="" label="TPL_MOKO-CASSIOPEIA_FAKITCODE_LABEL" description="TPL_MOKO-CASSIOPEIA_FA6KITCODE_DESC" filter="string" />
|
||||
|
||||
<!-- Header & Navigation UI -->
|
||||
<field name="theme_sep_header" type="spacer" label="Header & Navigation" hr="false" class="text fw-bold" />
|
||||
|
||||
Reference in New Issue
Block a user