Skip to content

Commit

Permalink
chore: remove darkmode & colored header less variables
Browse files Browse the repository at this point in the history
  • Loading branch information
SychO9 committed Jun 8, 2024
1 parent 477f1f4 commit 6483421
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 24 deletions.
22 changes: 14 additions & 8 deletions extensions/subscriptions/less/forum.less
Original file line number Diff line number Diff line change
@@ -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);
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion framework/core/less/admin/UsersListPage.less
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
&--shaded {
background: var(--body-bg-shaded);

& when (@config-dark-mode = true) {
[data-theme=dark] & {
background: var(--body-bg-light);
}
}
Expand Down
2 changes: 0 additions & 2 deletions framework/core/less/common/variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

@config-primary-color: #536F90;
@config-secondary-color: #536F90;
@config-dark-mode: false;
@config-colored-header: false;

// ---------------------------------
// COLORS
Expand Down
2 changes: 1 addition & 1 deletion framework/core/src/Api/Serializer/ForumSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')) {
Expand Down
12 changes: 0 additions & 12 deletions framework/core/src/Frontend/FrontendServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
},
],
];
});

Expand Down

0 comments on commit 6483421

Please sign in to comment.