diff --git a/extensions/subscriptions/less/forum.less b/extensions/subscriptions/less/forum.less index c35f76e0a8..5f624abb26 100644 --- a/extensions/subscriptions/less/forum.less +++ b/extensions/subscriptions/less/forum.less @@ -1,9 +1,20 @@ +@following-bg: #ffea7b; +@following-color: #de8e00; + :root { - --following-bg: #ffea7b; - --following-color: #de8e00; + --following-bg: @following-bg; + --following-color: @following-color; --ignoring-bg: #aaa; } +[data-theme=light] { + .Button--color-vars(@following-color, #fff2ae, 'button--follow'); +} + +[data-theme=dark] { + .Button--color-vars(#784d00, #fbb94c, 'button--follow'); +} + .Badge--following { --badge-bg: var(--following-bg); --badge-color: var(--following-color); @@ -12,12 +23,7 @@ --badge-bg: var(--ignoring-bg); } .SubscriptionMenu-button--follow { - & when (@config-dark-mode = false) { - .Button--color(#de8e00, #fff2ae); - } - & when (@config-dark-mode = true) { - .Button--color(#784d00, #fbb94c); - } + .Button--color-auto('button--follow'); } .SubscriptionMenu .Dropdown-menu { min-width: 260px; diff --git a/framework/core/less/admin/UsersListPage.less b/framework/core/less/admin/UsersListPage.less index 54ee110926..eb8fc81071 100644 --- a/framework/core/less/admin/UsersListPage.less +++ b/framework/core/less/admin/UsersListPage.less @@ -82,7 +82,7 @@ &--shaded { background: var(--body-bg-shaded); - & when (@config-dark-mode = true) { + [data-theme=dark] & { background: var(--body-bg-light); } } diff --git a/framework/core/less/common/variables.less b/framework/core/less/common/variables.less index ee14496a8f..850a4d48ea 100644 --- a/framework/core/less/common/variables.less +++ b/framework/core/less/common/variables.less @@ -3,8 +3,6 @@ @config-primary-color: #536F90; @config-secondary-color: #536F90; -@config-dark-mode: false; -@config-colored-header: false; // --------------------------------- // COLORS diff --git a/framework/core/src/Api/Serializer/ForumSerializer.php b/framework/core/src/Api/Serializer/ForumSerializer.php index 911811b714..29f467e3a3 100644 --- a/framework/core/src/Api/Serializer/ForumSerializer.php +++ b/framework/core/src/Api/Serializer/ForumSerializer.php @@ -91,7 +91,7 @@ protected function getDefaultAttributes(object|array $model): array 'canModerateAccessTokens' => $this->actor->can('moderateAccessTokens'), 'canEditUserCredentials' => $this->actor->hasPermission('user.editCredentials'), 'assetsBaseUrl' => rtrim($this->assetsFilesystem->url(''), '/'), - 'jsChunksBaseUrl' => $this->assetsFilesystem->url('js') + 'jsChunksBaseUrl' => $this->assetsFilesystem->url('js'), ]; if ($this->actor->can('administrate')) { diff --git a/framework/core/src/Frontend/FrontendServiceProvider.php b/framework/core/src/Frontend/FrontendServiceProvider.php index 995514b7af..bc859d89e9 100644 --- a/framework/core/src/Frontend/FrontendServiceProvider.php +++ b/framework/core/src/Frontend/FrontendServiceProvider.php @@ -164,18 +164,6 @@ function (Container $container) { 'config-secondary-color' => [ 'key' => 'theme_secondary_color', ], - 'config-dark-mode' => [ - 'key' => 'theme_dark_mode', - 'callback' => function ($value) { - return $value ? 'true' : 'false'; - }, - ], - 'config-colored-header' => [ - 'key' => 'theme_colored_header', - 'callback' => function ($value) { - return $value ? 'true' : 'false'; - }, - ], ]; });