Release 01.00.18 — minify pipeline, header color var, hero centering #2

Merged
jmiller merged 62 commits from dev into main 2026-04-23 20:01:27 +00:00
2 changed files with 29 additions and 3 deletions
Showing only changes of commit 4423294272 - Show all commits

View File

@@ -97,8 +97,8 @@ if ($params_favicon_source) {
}
}
}
$faviconOutputDir = JPATH_ROOT . '/images/favicons';
$faviconUrlBase = Uri::root(true) . '/images/favicons';
$faviconOutputDir = JPATH_ROOT . '/media/templates/site/' . $this->template . '/images/favicons';
$faviconUrlBase = Uri::root(true) . '/media/templates/site/' . $this->template . '/images/favicons';
if (MokoFaviconHelper::generate($faviconSourceAbs, $faviconOutputDir)) {
$faviconHeadTags = MokoFaviconHelper::getHeadTags($faviconUrlBase);

View File

@@ -100,14 +100,40 @@ class Tpl_MokoonyxInstallerScript implements InstallerScriptInterface
/**
* Delete the favicon stamp file so favicons and site.webmanifest
* are regenerated on the next page load after install/update.
* Also removes the old /images/favicons/ location.
*/
private function clearFaviconStamp(): void
{
$stampFile = JPATH_ROOT . '/images/favicons/.favicon_generated';
// Clear new location stamp
$stampFile = JPATH_ROOT . '/media/templates/site/' . self::NEW_NAME . '/images/favicons/.favicon_generated';
if (is_file($stampFile)) {
@unlink($stampFile);
$this->logMessage('Cleared favicon stamp — will regenerate on next page load.');
}
// Remove old /images/favicons/ directory from previous versions
$oldDir = JPATH_ROOT . '/images/favicons';
if (is_dir($oldDir)) {
$files = glob($oldDir . '/*');
if ($files) {
foreach ($files as $file) {
@unlink($file);
}
}
@unlink($oldDir . '/.favicon_generated');
@rmdir($oldDir);
$this->logMessage('Removed old favicon directory: images/favicons/');
}
// Remove any favicon files left in the site root
$rootFavicons = ['favicon.ico', 'favicon.png', 'apple-touch-icon.png', 'site.webmanifest'];
foreach ($rootFavicons as $file) {
$path = JPATH_ROOT . '/' . $file;
if (is_file($path)) {
@unlink($path);
$this->logMessage('Removed root favicon: ' . $file);
}
}
}
/**