Consolidate JS files and add theme functionality to index.php

Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-30 00:04:24 +00:00
parent dcc3327f7c
commit f6ededf2b3
6 changed files with 236 additions and 302 deletions

View File

@@ -42,6 +42,11 @@ $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_developmentmode = $this->params->get('developmentmode', false);
// Theme params
$params_theme_enabled = $this->params->get('theme_enabled', 1);
$params_theme_fab_enabled = $this->params->get('theme_fab_enabled', 1);
$params_theme_fab_pos = $this->params->get('theme_fab_pos', 'br');
/*
// Bootstrap behaviors (assets handled via WAM)
HTMLHelper::_('bootstrap.framework');
@@ -117,6 +122,11 @@ try {
// Scripts
$wa->useScript('template.js');
// Load GTM script if GTM is enabled
if (!empty($params_googletagmanager) && !empty($params_googletagmanagerid)) {
$wa->useScript('gtm.js');
}
/**
* VirtueMart detection:
* - Component must exist and be enabled
@@ -289,7 +299,10 @@ $wa->useStyle('template.user'); // css/user.css
<?php if (trim($params_custom_head_end)) : ?><?php echo $params_custom_head_end; ?><?php endif; ?>
</head>
<body data-bs-spy="scroll" data-bs-target="#toc" class="site <?php
<body data-bs-spy="scroll" data-bs-target="#toc"
data-theme-fab-enabled="<?php echo $params_theme_fab_enabled ? '1' : '0'; ?>"
data-theme-fab-pos="<?php echo htmlspecialchars($params_theme_fab_pos, ENT_QUOTES, 'UTF-8'); ?>"
class="site <?php
echo $option . ' ' . $wrapper
. ' view-' . $view
. ($layout ? ' layout-' . $layout : ' no-layout')