|
20 | 20 | $menu = $app->getMenu()->getActive();
|
21 | 21 | $pageclass = $menu !== null ? $menu->getParams()->get('pageclass_sfx', '') : '';
|
22 | 22 | $themeSwitcher = (boolean)$this->params->get('theme-switcher', 1);
|
| 23 | +$fontAwesome = (boolean)$this->params->get('font-awesome-thats-actually-rather-shit', 1); |
23 | 24 |
|
24 | 25 | // Template params
|
25 | 26 | if ($themeSwitcher)
|
26 | 27 | {
|
27 | 28 | HTMLHelper::_('stylesheet', 'switch.css', ['version' => 'auto', 'relative' => true]);
|
28 | 29 | }
|
29 |
| -HTMLHelper::_('script', 'switch.min.js', ['version' => 'auto', 'relative' => true], ['type' => 'module']); |
30 | 30 |
|
31 | 31 | // Fetch CSS
|
32 |
| -$css = file_get_contents(__DIR__ . '/css/template.css'); |
| 32 | +HTMLHelper::_('stylesheet', 'template.css', ['version' => 'auto', 'relative' => true]); |
| 33 | +HTMLHelper::_('stylesheet', 'custom-variables.css', ['version' => 'auto', 'relative' => true]); |
| 34 | +HTMLHelper::_('stylesheet', 'user.css', ['version' => 'auto', 'relative' => true]); |
| 35 | + |
| 36 | +// Font Awesome |
| 37 | +if ($fontAwesome) |
| 38 | +{ |
| 39 | + HTMLHelper::_('stylesheet', 'fontawesome.css', ['version' => 'auto', 'relative' => true]); |
| 40 | +} |
| 41 | + |
| 42 | +// Load switcher JS |
| 43 | +// This should be loaded even if the themeSwitcher is disabled, so that the system preference will still dictate the theme |
| 44 | +HTMLHelper::_('script', 'switch.min.js', ['version' => 'auto', 'relative' => true], ['type' => 'module']); |
33 | 45 |
|
34 | 46 | // Logo file or site title param
|
35 | 47 | $logo = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 508.928 508.928" height="50"><path fill="hsl(210, 100%, 50%)" d="M403.712 201.04H256.288L329.792 0 105.216 307.888H252.64l-73.504 201.04z"/></svg>';
|
|
53 | 65 | <html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
|
54 | 66 | <head>
|
55 | 67 | <jdoc:include type="metas" />
|
56 |
| - <style><?php echo $css; ?></style> |
| 68 | + <jdoc:include type="styles" /> |
| 69 | + <jdoc:include type="scripts" /> |
57 | 70 | </head>
|
58 | 71 |
|
59 | 72 | <body class="site-grid site <?php echo $pageclass; ?>">
|
|
129 | 142 | <?php endif; ?>
|
130 | 143 |
|
131 | 144 | <jdoc:include type="modules" name="debug" style="none" />
|
132 |
| - |
133 |
| - <jdoc:include type="styles" /> |
134 |
| - <jdoc:include type="scripts" /> |
135 | 145 | </body>
|
136 | 146 | </html>
|
0 commit comments