Browse Source
Task/enable dark mode of Bootstrap (#8167)
Enable dark mode of Bootstrap
pull/8168/head
Thomas Kaul
1 day ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with
26 additions and
4 deletions
-
CHANGELOG.md
-
apps/client/src/app/app.component.ts
-
apps/client/src/app/components/admin-settings/admin-settings.component.html
-
apps/client/src/styles/bootstrap.scss
-
libs/ui/.storybook/preview.js
-
libs/ui/src/lib/membership-card/membership-card.component.html
|
|
@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
|
### Changed |
|
|
### Changed |
|
|
|
|
|
|
|
|
|
|
|
- Improved the colors of the muted texts and borders by enabling the dark mode of `bootstrap` |
|
|
- Reduced the size of the global stylesheet by removing the unused utilities of `bootstrap` |
|
|
- Reduced the size of the global stylesheet by removing the unused utilities of `bootstrap` |
|
|
- Upgraded `bootstrap` from version `4.6.2` to `5.3.8` |
|
|
- Upgraded `bootstrap` from version `4.6.2` to `5.3.8` |
|
|
|
|
|
|
|
|
|
|
|
@ -350,9 +350,11 @@ export class GfAppComponent implements OnInit { |
|
|
if (isDarkColorScheme(userPreferredColorScheme)) { |
|
|
if (isDarkColorScheme(userPreferredColorScheme)) { |
|
|
this.document.body.classList.add('theme-dark'); |
|
|
this.document.body.classList.add('theme-dark'); |
|
|
this.document.body.classList.remove('theme-light'); |
|
|
this.document.body.classList.remove('theme-light'); |
|
|
|
|
|
this.document.documentElement.setAttribute('data-bs-theme', 'dark'); |
|
|
} else { |
|
|
} else { |
|
|
this.document.body.classList.add('theme-light'); |
|
|
this.document.body.classList.add('theme-light'); |
|
|
this.document.body.classList.remove('theme-dark'); |
|
|
this.document.body.classList.remove('theme-dark'); |
|
|
|
|
|
this.document.documentElement.setAttribute('data-bs-theme', 'light'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
this.document |
|
|
this.document |
|
|
|
|
|
@ -3,7 +3,11 @@ |
|
|
<div class="col"> |
|
|
<div class="col"> |
|
|
<h2 class="text-center" i18n>Data Providers</h2> |
|
|
<h2 class="text-center" i18n>Data Providers</h2> |
|
|
@if (isGhostfolioApiKeyValid === false) { |
|
|
@if (isGhostfolioApiKeyValid === false) { |
|
|
<mat-card appearance="outlined" class="my-3 special"> |
|
|
<mat-card |
|
|
|
|
|
appearance="outlined" |
|
|
|
|
|
class="my-3 special" |
|
|
|
|
|
data-bs-theme="light" |
|
|
|
|
|
> |
|
|
<mat-card-header> |
|
|
<mat-card-header> |
|
|
<mat-card-title class="align-items-center d-flex m-0" |
|
|
<mat-card-title class="align-items-center d-flex m-0" |
|
|
>Ghostfolio Premium |
|
|
>Ghostfolio Premium |
|
|
|
|
|
@ -25,7 +25,6 @@ $container-max-widths: ( |
|
|
xl: 1140px |
|
|
xl: 1140px |
|
|
); |
|
|
); |
|
|
$cyan: #17a2b8; |
|
|
$cyan: #17a2b8; |
|
|
$enable-dark-mode: false; |
|
|
|
|
|
$enable-rfs: false; |
|
|
$enable-rfs: false; |
|
|
$enable-smooth-scroll: false; |
|
|
$enable-smooth-scroll: false; |
|
|
$figure-caption-font-size: 90%; |
|
|
$figure-caption-font-size: 90%; |
|
|
|
|
|
@ -1,5 +1,8 @@ |
|
|
import '@angular/localize/init'; |
|
|
import '@angular/localize/init'; |
|
|
import { withThemeByClassName } from '@storybook/addon-themes'; |
|
|
import { |
|
|
|
|
|
withThemeByClassName, |
|
|
|
|
|
withThemeByDataAttribute |
|
|
|
|
|
} from '@storybook/addon-themes'; |
|
|
|
|
|
|
|
|
const preview = { |
|
|
const preview = { |
|
|
decorators: [ |
|
|
decorators: [ |
|
|
@ -10,6 +13,15 @@ const preview = { |
|
|
Dark: 'theme-dark', |
|
|
Dark: 'theme-dark', |
|
|
Light: 'theme-light' |
|
|
Light: 'theme-light' |
|
|
} |
|
|
} |
|
|
|
|
|
}), |
|
|
|
|
|
withThemeByDataAttribute({ |
|
|
|
|
|
attributeName: 'data-bs-theme', |
|
|
|
|
|
defaultTheme: 'Light', |
|
|
|
|
|
parentSelector: 'html', |
|
|
|
|
|
themes: { |
|
|
|
|
|
Dark: 'dark', |
|
|
|
|
|
Light: 'light' |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
] |
|
|
] |
|
|
}; |
|
|
}; |
|
|
|
|
|
@ -1,5 +1,9 @@ |
|
|
<div class="card-wrapper position-relative" [class.hover-3d]="hover3d"> |
|
|
<div class="card-wrapper position-relative" [class.hover-3d]="hover3d"> |
|
|
<div class="card-container" [class.premium]="name === 'Premium'"> |
|
|
<div |
|
|
|
|
|
class="card-container" |
|
|
|
|
|
[attr.data-bs-theme]="name === 'Premium' ? null : 'light'" |
|
|
|
|
|
[class.premium]="name === 'Premium'" |
|
|
|
|
|
> |
|
|
<a |
|
|
<a |
|
|
class="card-item d-flex flex-column justify-content-between p-4" |
|
|
class="card-item d-flex flex-column justify-content-between p-4" |
|
|
[routerLink]="routerLinkPricing" |
|
|
[routerLink]="routerLinkPricing" |
|
|
|