feat: use Phoenix config for theme injection (cleaner approach)

This commit is contained in:
2025-11-09 08:48:22 +01:00
parent d37ff0de47
commit f0540c52bc
4 changed files with 17 additions and 78 deletions

View File

@@ -1,22 +0,0 @@
// Inject custom theme CSS and favicon
(function() {
// Inject custom CSS
var link = document.createElement('link');
link.rel = 'stylesheet';
link.href = '/theme/custom.css';
document.head.appendChild(link);
// Inject custom favicon
var favicon = document.createElement('link');
favicon.rel = 'icon';
favicon.type = 'image/svg+xml';
favicon.href = '/theme/favicon.svg';
// Remove existing favicons first
var existingFavicons = document.querySelectorAll('link[rel*="icon"]');
existingFavicons.forEach(function(el) {
el.remove();
});
document.head.appendChild(favicon);
})();