-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Dark Theme #581
base: main
Are you sure you want to change the base?
Add Dark Theme #581
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ <h5 class="text-break">{{ result.title }}</h5> | |
{{ result.specific.date|date:"SHORT_DATE_FORMAT" }} | ||
</time> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
</hgroup> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
<span class="text-dark"> | ||
<span class="search-preview"> | ||
{% if result.search_description %} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
{{ result.search_description }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
{% else %} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
.footer-myhpi { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
background-color: var(--bs-gray-700); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
background-color: var(--bs-gray-800); | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
.page-content { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
padding-top: 1.5rem; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,20 +5,25 @@ | |
$primary: #F5631E; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
$secondary: #F5631E; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In
Could be addressed now, since we updated to 5.3 |
||
$body-bg: #F5F5F5; | ||
$body-color-dark: white; | ||
$body-color: black; | ||
|
||
$gray-100: #e9e9e9; | ||
$gray-200: #EEE; | ||
$gray-300: #DDD; | ||
$gray-400: #CCC; | ||
$gray-500: #BBB; | ||
$gray-600: #999; | ||
$gray-700: #777; | ||
$gray-800: #555; | ||
$gray-900: #333; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
// 3. Include remainder of required Bootstrap stylesheets | ||
@import "./bootstrap/variables"; | ||
@import "./bootstrap/mixins"; | ||
@import "./bootstrap/maps"; | ||
|
||
$custom-colors: ( | ||
"gray-700": $gray-700, | ||
"text-muted": $text-muted, | ||
"border": #EEE, | ||
"border-dark": #B2B2B2, | ||
"body-bg-light": #FBFBFB, | ||
"body-bg-overlay": #EEE | ||
); | ||
$colors: map-merge($colors, $custom-colors); | ||
$color-mode-type: media-query; | ||
|
||
@import "./bootstrap/root"; | ||
|
||
|
@@ -62,10 +67,24 @@ $colors: map-merge($colors, $custom-colors); | |
|
||
// 6. Add additional custom code here | ||
|
||
|
||
|
||
:root { | ||
--bs-body-bg-overlay: var(--bs-gray-200); | ||
--bs-p-2: 0.5rem; | ||
--bs-p-4: 1rem; | ||
--myhpi-round-border: 2px; | ||
--content-bg: white; | ||
--bs-border-dark: var(--bs-gray-500); | ||
} | ||
|
||
@include color-mode(dark) { | ||
:root { | ||
--bs-body-bg-overlay: var(--bs-gray-700); | ||
--bs-breadcrumb-divider-color: var(--bs-gray-500); | ||
--content-bg: var(--bs-dark-bg); | ||
--bs-border-dark: var(--bs-gray-600); | ||
} | ||
} | ||
|
||
a { | ||
|
@@ -121,7 +140,7 @@ p { | |
|
||
a, | ||
a:hover { | ||
color: var(--bs-text-muted); | ||
color: var(--bs-body-color); | ||
text-decoration: none; | ||
} | ||
|
||
|
@@ -186,6 +205,10 @@ h1.side-panel-title::after { | |
padding: 0; | ||
margin: -0.5rem -0.8rem; | ||
|
||
.search-preview { | ||
color: var(--bs-body-color); | ||
} | ||
|
||
.search-result { | ||
h5 { | ||
hyphens: auto; | ||
|
@@ -200,13 +223,13 @@ h1.side-panel-title::after { | |
|
||
&:hover, | ||
&:focus-visible { | ||
border-color: var(--bs-border); | ||
background-color: var(--bs-body-bg-light); | ||
border-color: var(--bs-border-dark); | ||
background-color: var(--bs-light-bg-subtle); | ||
} | ||
|
||
&:active { | ||
border-color: var(--bs-border-dark); | ||
background-color: var(--bs-body-bg-overlay); | ||
background-color: var(--bs-light-bg-overlay); | ||
} | ||
} | ||
} | ||
|
@@ -328,3 +351,7 @@ img { | |
padding: 3px; | ||
} | ||
} | ||
|
||
#page { | ||
background-color: var(--content-bg) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding comments to random lines to make them resolvable one by one
Is it possible to remove the border (or make it same color as the highlight) on hover?
For that to work, we might need a more significant contrast between the hover highlight and the background color
This design:
Old design: