wilson I can't say for sure if this would be what you're wanting, and I'm just sharing it in case it might help.
Either yourself (or one of the more experienced members perhaps) might possibly be able to modify this (example) Java to achieve the dynamic logo switching you've described.
document.addEventListener('DOMContentLoaded', function() {
const logo = document.getElementById('forum-logo');
const toggleButton = document.getElementById('theme-toggle'); // Assuming you have a button to toggle themes
function updateLogo() {
const isDarkMode = document.body.classList.contains('dark-mode'); // Adjust this based on your actual dark mode class
logo.src = isDarkMode ? 'https://anomalum.flarum.cloud/assets/logo-dark.png' : 'https://anomalum.flarum.cloud/assets/logo-light.png';
}
// Initial logo update based on current theme
updateLogo();
// Event listener for theme toggle
toggleButton.addEventListener('click', function() {
document.body.classList.toggle('dark-mode'); // Toggle the dark mode class
updateLogo(); // Update the logo after toggling
});
});
This example Java is taken from a more thorough concept guide, at the Anomalum forum, for dynamic logo switching... however I'm not allowed to share links here unfortunately, so hopefully this code is sufficient.