forked from openSUSE/open-build-service
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Users' profile provides a way to select a color theme
- Loading branch information
Moises Deniz
committed
Jan 12, 2024
1 parent
f802e85
commit 2a4bd02
Showing
14 changed files
with
68 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/*! | ||
* Color mode toggler for Bootstrap's docs (https://getbootstrap.com/) | ||
* Copyright 2011-2023 The Bootstrap Authors | ||
* Licensed under the Creative Commons Attribution 3.0 Unported License. | ||
*/ | ||
|
||
(() => { | ||
'use strict' | ||
|
||
const getPreferredTheme = () => { | ||
const userTheme = document.documentElement.getAttribute('data-bs-theme-from-user') | ||
if (userTheme == "system") { | ||
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light' | ||
} | ||
return userTheme | ||
} | ||
|
||
const setTheme = theme => { | ||
document.documentElement.setAttribute('data-bs-theme', theme) | ||
} | ||
|
||
setTheme(getPreferredTheme()) | ||
|
||
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => { | ||
setTheme(getPreferredTheme()) | ||
}) | ||
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 10 additions & 31 deletions
41
src/api/app/assets/stylesheets/webui/breadcrumbs-component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,16 @@ | ||
[data-bs-theme="light"] { | ||
ol.breadcrumb { | ||
padding-top: 0.5rem; | ||
ol.breadcrumb { | ||
padding-top: 0.5rem; | ||
|
||
& li { | ||
font-size: 0.9rem; | ||
& li { | ||
font-size: 0.9rem; | ||
|
||
&.active { | ||
color: $gray-700; | ||
font-weight: bold; | ||
} | ||
|
||
& a { | ||
color: $gray-700; | ||
} | ||
&.active { | ||
color: $breadcrumbs-item-text-color; | ||
font-weight: bold; | ||
} | ||
} | ||
} | ||
|
||
[data-bs-theme="dark"] { | ||
ol.breadcrumb { | ||
padding-top: 0.5rem; | ||
|
||
& li { | ||
font-size: 0.9rem; | ||
|
||
&.active { | ||
color: $gray-400; | ||
font-weight: bold; | ||
} | ||
|
||
& a { | ||
color: $gray-400; | ||
} | ||
& a { | ||
color: $breadcrumbs-item-text-color; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,3 @@ | ||
|
||
[data-bs-theme="light"] { | ||
.subscriptions-card-bg { | ||
@extend .bg-light; | ||
} | ||
} | ||
|
||
[data-bs-theme="dark"] { | ||
.subscriptions-card-bg { | ||
background-color: var(--bs-dark-bg-subtle); | ||
} | ||
.subscriptions-card-bg { | ||
background-color: var(--bs-secondary-bg); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters