|
17 | 17 | <title>UC OSPO Network events</title> |
18 | 18 | <link href="https://cdn.jsdelivr.net/npm/fullcalendar@6.1.15/index.global.min.css" rel="stylesheet" /> |
19 | 19 | <style> |
| 20 | + /* Site font (Atkinson Hyperlegible), mirrored from static/css/custom.css. |
| 21 | + The iframe is a separate document, so the @font-face must be redeclared |
| 22 | + here. MyST hashes files under static/, so the build (aggregate-events.js) |
| 23 | + vendors these woff2s to /fonts/ next to the embed, same as purify.min.js. */ |
| 24 | + @font-face { |
| 25 | + font-family: "Atkinson Hyperlegible"; |
| 26 | + font-style: normal; |
| 27 | + font-weight: 400; |
| 28 | + src: url("/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); |
| 29 | + } |
| 30 | + @font-face { |
| 31 | + font-family: "Atkinson Hyperlegible"; |
| 32 | + font-style: normal; |
| 33 | + font-weight: 700; |
| 34 | + src: url("/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); |
| 35 | + } |
20 | 36 | :root { |
21 | | - /* Mirror the site brand palette (static/css/custom.css) so the popover |
22 | | - matches the rest of the page. This iframe is a separate document and |
23 | | - does NOT inherit the parent's --pst-* variables, so they're restated |
24 | | - here; keep in sync with custom.css if the brand colors change. */ |
25 | | - --uco-primary: #003cb3; /* --pst-color-primary / --pst-color-link */ |
| 37 | + /* Mirror the site brand palette + font (static/css/custom.css) so the |
| 38 | + embed matches the rest of the page. This iframe is a separate document |
| 39 | + and does NOT inherit the parent's --pst-* variables, so they're |
| 40 | + restated here. Change them in one place; keep in sync with custom.css. */ |
| 41 | + --uco-font: "Atkinson Hyperlegible", sans-serif; |
| 42 | + --uco-primary: #003cb3; /* links, event tiles, button (--pst-color-link) */ |
26 | 43 | --uco-link-hover: #ff9100; /* --pst-color-link-hover */ |
27 | | - --uco-text: #222832; /* --tw-prose-body */ |
| 44 | + --uco-text: #222832; /* body / popover text (--tw-prose-body) */ |
| 45 | + --uco-surface: #fff; /* popover card + button background */ |
| 46 | + --uco-border: #e0e0e0; /* popover card border */ |
| 47 | + --uco-muted: #767676; /* source label, close button */ |
| 48 | + --uco-daynum: #1a1a1a; /* current-month day number */ |
| 49 | + --uco-daynum-muted: #6b6b6b; /* other-month day number */ |
| 50 | + --uco-event-text: #fff; /* text on event tiles + button hover */ |
| 51 | + } |
| 52 | + /* Dark mode follows the OS (prefers-color-scheme), which is how the site's |
| 53 | + book-theme resolves its default/"system" appearance. Values mirror the |
| 54 | + site's dark palette (#7ab3ff accent, light text on dark surfaces). */ |
| 55 | + @media (prefers-color-scheme: dark) { |
| 56 | + :root { |
| 57 | + --uco-primary: #7ab3ff; /* .dark .article a in custom.css */ |
| 58 | + --uco-text: #e3e3e8; |
| 59 | + --uco-surface: #1f1f1f; |
| 60 | + --uco-border: #3a3a3a; |
| 61 | + --uco-muted: #9aa0a6; |
| 62 | + --uco-daynum: #e3e3e8; |
| 63 | + --uco-daynum-muted: #8a8a8a; |
| 64 | + --uco-event-text: #10243f; /* dark text on the lighter dark-mode tiles */ |
| 65 | + } |
28 | 66 | } |
29 | 67 | body { |
30 | 68 | margin: 0; |
31 | | - font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; |
| 69 | + font-family: var(--uco-font); |
32 | 70 | color: var(--uco-text); |
| 71 | + /* The parent page sizes this iframe to fit its content, so an internal |
| 72 | + scrollbar is never needed; hide the sub-pixel-overflow one. */ |
| 73 | + overflow: hidden; |
33 | 74 | } |
34 | 75 | #calendar { |
35 | 76 | max-width: 100%; |
|
39 | 80 | .fc .fc-scrollgrid { |
40 | 81 | border: 0; |
41 | 82 | } |
42 | | - /* Brand-blue event tiles. FullCalendar's default event color renders white |
43 | | - text at ~3.7:1 (fails WCAG AA); #00609c gives ~6.6:1. */ |
| 83 | + /* Brand-blue event tiles (site --uco-primary). FullCalendar's default event |
| 84 | + color renders white text at ~3.7:1 (fails WCAG AA); #003cb3 gives ~9:1. */ |
44 | 85 | .fc { |
45 | | - --fc-event-bg-color: #00609c; |
46 | | - --fc-event-border-color: #00609c; |
| 86 | + --fc-event-bg-color: var(--uco-primary); |
| 87 | + --fc-event-border-color: var(--uco-primary); |
| 88 | + --fc-event-text-color: var(--uco-event-text); |
47 | 89 | } |
48 | 90 | /* FullCalendar's default day numbers are low-contrast: current-month ones |
49 | 91 | are a light gray, and other-month ones are faded with opacity (which |
50 | 92 | tanks contrast regardless of color). Darken current-month, and replace |
51 | 93 | the other-month opacity with a muted-but-AA-passing gray. */ |
52 | 94 | .fc .fc-daygrid-day-number { |
53 | | - color: #1a1a1a; |
| 95 | + color: var(--uco-daynum); |
54 | 96 | } |
55 | 97 | .fc .fc-daygrid-day.fc-day-other .fc-daygrid-day-top { |
56 | 98 | opacity: 1; |
57 | 99 | } |
58 | 100 | .fc .fc-day-other .fc-daygrid-day-number { |
59 | | - color: #6b6b6b; |
| 101 | + color: var(--uco-daynum-muted); |
60 | 102 | } |
61 | 103 | a { |
62 | 104 | color: var(--uco-primary); |
|
79 | 121 | } |
80 | 122 | .evt-card { |
81 | 123 | position: relative; |
82 | | - background: #fff; |
| 124 | + background: var(--uco-surface); |
| 125 | + border: 1px solid var(--uco-border); |
83 | 126 | width: 100%; |
84 | 127 | max-width: 420px; |
85 | 128 | max-height: 90%; |
|
96 | 139 | background: none; |
97 | 140 | font-size: 22px; |
98 | 141 | line-height: 1; |
99 | | - color: #666; |
| 142 | + color: var(--uco-muted); |
100 | 143 | cursor: pointer; |
101 | 144 | } |
102 | 145 | .evt-source { |
103 | 146 | font-size: 0.8em; |
104 | 147 | text-transform: uppercase; |
105 | 148 | letter-spacing: 0.03em; |
106 | | - color: #767676; |
| 149 | + color: var(--uco-muted); |
107 | 150 | } |
108 | 151 | .evt-card .evt-title { |
109 | 152 | margin: 4px 24px 8px 0; |
|
134 | 177 | } |
135 | 178 | .evt-ics { |
136 | 179 | border: 1px solid var(--uco-primary); |
137 | | - background: #fff; |
| 180 | + background: var(--uco-surface); |
138 | 181 | color: var(--uco-primary); |
139 | 182 | border-radius: 6px; |
140 | 183 | padding: 7px 12px; |
|
144 | 187 | } |
145 | 188 | .evt-ics:hover { |
146 | 189 | background: var(--uco-primary); |
147 | | - color: #fff; |
| 190 | + color: var(--uco-event-text); |
148 | 191 | } |
149 | 192 | </style> |
150 | 193 | </head> |
|
0 commit comments