I realize this might not be what you're actually asking for, but a local extension can be used to change which logo URL is used depending on Flarum's admin Dark Mode switcher.
This doesn't, and can't work with FriendOfFlarum's Nightmode extension since detection happens client-side. It seems like the FoF extension doesn't export its detection method nor adds a global class or variable so while it would also be possible to use javascript to change the forum's logoUrl
, I can't be bothered to do all the copy-pasting it requires 😅
<?php
use Flarum\Extend;
return [
// Register extenders here to customize your forum!
(new Extend\ApiSerializer(\Flarum\Api\Serializer\ForumSerializer::class))
->attributes(function (): array {
if (resolve('flarum.settings')->get('theme_dark_mode')) {
return ['logoUrl' => 'https://lorempixel.com/300/60/abstract/'];
}
return [];
}),
];