UI: Implement Web Assets' theme system, and add 'dark' theme #103972

Merged
Márton Lente merged 23 commits from ui/theme-system into main 2024-09-30 15:03:39 +02:00
3 changed files with 24 additions and 2 deletions
Showing only changes of commit cfd832b503 - Show all commits

View File

@ -407,6 +407,7 @@ body.is-scrolled
.event .event
+box-card +box-card
display: flex display: flex
flex-direction: column flex-direction: column
+margin(3, bottom) +margin(3, bottom)
@ -414,7 +415,7 @@ body.is-scrolled
transition: background-color var(--transition-speed) ease-in-out, opacity 250ms ease-in-out transition: background-color var(--transition-speed) ease-in-out, opacity 250ms ease-in-out
&:hover &:hover
background-color: white !important background-color: var(--box-bg-color-hover)
text-decoration: none text-decoration: none
&[data-filtered] &[data-filtered]
@ -631,9 +632,26 @@ body.is-scrolled
position: absolute position: absolute
right: 0 right: 0
.event
backdrop-filter: brightness(110%)
background-color: transparent
transition: backdrop-filter var(--transition-speed)
&:hover
backdrop-filter: brightness(115%)
.schedule-filters-container .schedule-filters-container
+padding(2, y) +padding(2, y)
[data-theme="dark"]
.schedule-container
&.horizontal
.event
backdrop-filter: brightness(90%)
&:hover
backdrop-filter: brightness(85%)
.scroll-horizontal .scroll-horizontal
padding-top: var(--time-slots-height) padding-top: var(--time-slots-height)
overflow-x: auto overflow-x: auto

View File

@ -23,6 +23,8 @@ html[data-theme="light"]
--body-color-bg: #e9ecef --body-color-bg: #e9ecef
--color-bg: var(--body-color-bg) --color-bg: var(--body-color-bg)
--box-bg-color-hover: white
martonlente marked this conversation as resolved Outdated

Left over comment

Left over comment
\:root \:root
// TODO: check if component variables table colours are needed // TODO: check if component variables table colours are needed
--table-border-color: var(--color-bg-tertiary) --table-border-color: var(--color-bg-tertiary)
@ -41,6 +43,9 @@ html[data-theme="light"]
+media-sm +media-sm
--page-with-header-content-offset: calc(var(--spacer) * 8) --page-with-header-content-offset: calc(var(--spacer) * 8)
html[data-theme="dark"]
--box-bg-color-hover: var(--color-bg-secondary)
body.is-scrolled body.is-scrolled
.navbar .navbar
box-shadow: none box-shadow: none

View File

@ -63,7 +63,6 @@
| {% for event in events %} | {% for event in events %}
a.event.js-time-slot( a.event.js-time-slot(
style=" style="
background-color: hsl(var(--location-hue-{{ location }}), 60%, 97%);
left: calc(calc({{ event.start_time_in_minutes}} - {{ events_per_day_per_location_with_range.range_minutes.start }}) * 10px); left: calc(calc({{ event.start_time_in_minutes}} - {{ events_per_day_per_location_with_range.range_minutes.start }}) * 10px);
width: calc({{ event.duration_minutes}}px * {{ events_per_day_per_location_with_range.minute_to_pixel_multiplier }})" width: calc({{ event.duration_minutes}}px * {{ events_per_day_per_location_with_range.minute_to_pixel_multiplier }})"
id="#event-{{ event.id }}", id="#event-{{ event.id }}",