style/calendar collection: add basic support for the legacy theme

This commit is contained in:
Adorian Doran 2025-12-01 01:55:03 +02:00
parent 415d2826c6
commit 0f7a48b323
4 changed files with 29 additions and 3 deletions

View File

@ -27,6 +27,9 @@
--bs-body-bg: var(--main-background-color) !important; --bs-body-bg: var(--main-background-color) !important;
--ck-mention-list-max-height: 500px; --ck-mention-list-max-height: 500px;
--tn-modal-max-height: 90vh; --tn-modal-max-height: 90vh;
--tree-item-light-theme-max-color-lightness: 50;
--tree-item-dark-theme-min-color-lightness: 75;
} }
body#trilium-app.motion-disabled *, body#trilium-app.motion-disabled *,
@ -2579,4 +2582,12 @@ iframe.print-iframe {
position: relative; position: relative;
flex-grow: 1; flex-grow: 1;
width: 100%; width: 100%;
}
/* Calendar collection */
.calendar-view a.fc-timegrid-event,
.calendar-view a.fc-daygrid-event {
/* Workaround: set font weight only if the theme-next is not active */
font-weight: var(--root-background, 800);
} }

View File

@ -76,6 +76,9 @@
--mermaid-theme: dark; --mermaid-theme: dark;
--native-titlebar-background: #00000000; --native-titlebar-background: #00000000;
--calendar-coll-event-background-saturation: 30%;
--calendar-coll-event-background-lightness: 30%;
} }
body ::-webkit-calendar-picker-indicator { body ::-webkit-calendar-picker-indicator {

View File

@ -80,6 +80,9 @@ html {
--mermaid-theme: default; --mermaid-theme: default;
--native-titlebar-background: #ffffff00; --native-titlebar-background: #ffffff00;
--calendar-coll-event-background-lightness: 95%;
--calendar-coll-event-background-saturation: 80%;
} }
#left-pane .fancytree-node.tinted { #left-pane .fancytree-node.tinted {

View File

@ -1,3 +1,12 @@
:root {
/* Default values to be overridden by themes */
--calendar-coll-event-background-lightness: 95%;
--calendar-coll-event-background-saturation: 80%;
--calendar-coll-event-background-color: var(--accented-background-color);
--calendar-coll-event-text-color: var(--primary-button-text-color);
--calendar-cell-event-hover-filter: none;
}
.calendar-view { .calendar-view {
--fc-event-border-color: var(--calendar-coll-event-text-color); --fc-event-border-color: var(--calendar-coll-event-text-color);
--fc-event-bg-color: var(--calendar-coll-event-background-color); --fc-event-bg-color: var(--calendar-coll-event-background-color);
@ -115,8 +124,8 @@ body.desktop:not(.zen) .calendar-view .calendar-header {
color: currentColor; color: currentColor;
} }
.fc-timegrid-event.with-hue, .calendar-view .fc-timegrid-event.with-hue,
.fc-daygrid-event:not(.fc-daygrid-dot-event).with-hue { .calendar-view .fc-daygrid-event:not(.fc-daygrid-dot-event).with-hue {
--fc-event-text-color: var(--custom-color); --fc-event-text-color: var(--custom-color);
background: hsl(var(--custom-color-hue), background: hsl(var(--custom-color-hue),
@ -124,7 +133,7 @@ body.desktop:not(.zen) .calendar-view .calendar-header {
var(--calendar-coll-event-background-lightness)) !important; var(--calendar-coll-event-background-lightness)) !important;
} }
.fc-event-time { .calendar-view .fc-event-time {
opacity: .75; opacity: .75;
} }