Skip to content

Commit 87de095

Browse files
committed
init dark mode
1 parent ecdb9fe commit 87de095

7 files changed

Lines changed: 199 additions & 51 deletions

File tree

_quarto.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ website:
3232

3333
navbar:
3434

35-
background: "#1D4F91"
36-
foreground: "#ffffff"
35+
# background: "#1D4F91"
36+
# foreground: "#ffffff"
3737

3838
logo: images/Columbia_University_Logo-Crown_white.png
3939
logo-href: /index.qmd
@@ -150,7 +150,9 @@ website:
150150

151151
format:
152152
html:
153-
theme: default
153+
theme:
154+
light: [default, theme-light.scss]
155+
dark: [default, theme-dark.scss]
154156
css: custom.css
155157
toc: true
156158
toc-location: right
@@ -168,8 +170,8 @@ format:
168170
fig-dpi: 300
169171
fig-alt-text: true
170172
lightbox: true
171-
navbar:
172-
type: default
173+
# navbar:
174+
# type: default
173175
sidebar:
174176
collapse-level: 2
175177
float: false

_quarto_internal_scss_error.scss

Lines changed: 60 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,6 +1040,21 @@ $theme-name: null !default;
10401040
// quarto-scss-analysis-annotation { "origin": "Defaults from user-defined SCSS" }
10411041

10421042

1043+
// Bootstrap Sass variable overrides — light mode, colors only.
1044+
// These compile into Bootstrap's generated CSS for Quarto elements
1045+
// (TOC, sidebar, search, callouts, tables, etc.)
1046+
1047+
$body-bg: #ffffff;
1048+
$body-color: #212529;
1049+
$headings-color: #1D4F91;
1050+
$link-color: #1D4F91;
1051+
$link-hover-color: darken(#1D4F91, 10%);
1052+
$border-color: #dee2e6;
1053+
$code-color: #495057;
1054+
$secondary: #5D6D7E;
1055+
1056+
1057+
10431058
// Heading font size customization
10441059
$h1-font-size: 2rem !default;
10451060
$h2-font-size: 1.65rem !default;
@@ -1107,8 +1122,6 @@ $tbl-cap-location: top !default;
11071122
$footer-border: true !default;
11081123
$sidebar-border: true !default;
11091124
$sidebar-bg: if(variable-exists(body-bg), $body-bg, #fff) !default;
1110-
$navbar-fg: # !default;
1111-
$navbar-bg: #1D4F91 !default;
11121125
// Default the theme name
11131126
$theme-name: if(variable-exists(theme), $theme, "");
11141127

@@ -3220,7 +3233,7 @@ $nested-kbd-font-weight: null !default; // Deprecated in v5.2.0, remo
32203233
$pre-bg: $code-bg !default;
32213234
$pre-color: $body-emphasis-color !default;
32223235
$pre-line-height: $line-height-base !default;
3223-
3236+
$link-color: #1D4F91;
32243237

32253238

32263239

@@ -8009,7 +8022,7 @@ $valuebox-colors: (
80098022
flex-direction: column;
80108023
}
80118024

8012-
#quarto-resources {
8025+
#quarto-appendix {
80138026
display: none;
80148027
}
80158028

@@ -11438,7 +11451,7 @@ figure .quarto-notebook-link {
1143811451
.toc-actions i.bi,
1143911452
.quarto-code-links i.bi,
1144011453
.quarto-other-links i.bi,
11441-
.quarto-alternate-pages i.bi,
11454+
.quarto-alternate-notebooks i.bi,
1144211455
.quarto-alternate-formats i.bi {
1144311456
margin-right: 0.4em;
1144411457
font-size: $toc-tools-font-size;
@@ -11458,7 +11471,7 @@ figure .quarto-notebook-link {
1145811471
.toc-actions i.bi.empty,
1145911472
.quarto-code-links i.bi.empty,
1146011473
.quarto-other-links i.bi.empty,
11461-
.quarto-alternate-pages i.bi.empty,
11474+
.quarto-alternate-notebooks i.bi.empty,
1146211475
.quarto-alternate-formats i.bi.empty {
1146311476
padding-left: 1em;
1146411477
}
@@ -11497,14 +11510,14 @@ figure .quarto-notebook-link {
1149711510
.quarto-alternate-formats,
1149811511
.quarto-other-links,
1149911512
.quarto-code-links,
11500-
.quarto-alternate-pages {
11513+
.quarto-alternate-notebooks {
1150111514
padding-left: 0em;
1150211515
}
1150311516
.sidebar .toc-actions a,
1150411517
.sidebar .quarto-alternate-formats a,
1150511518
.sidebar .quarto-other-links a,
1150611519
.sidebar .quarto-code-links a,
11507-
.sidebar .quarto-alternate-pages a,
11520+
.sidebar .quarto-alternate-notebooks a,
1150811521
.sidebar nav[role="doc-toc"] a {
1150911522
text-decoration: none;
1151011523
}
@@ -11513,14 +11526,14 @@ figure .quarto-notebook-link {
1151311526
.sidebar .quarto-other-links a:hover,
1151411527
.sidebar .quarto-code-links a:hover,
1151511528
.sidebar .quarto-alternate-formats a:hover,
11516-
.sidebar .quarto-alternate-pages a:hover {
11529+
.sidebar .quarto-alternate-notebooks a:hover {
1151711530
color: $link-color;
1151811531
}
1151911532

1152011533
.sidebar .toc-actions h2,
1152111534
.sidebar .quarto-code-links h2,
1152211535
.sidebar .quarto-other-links h2,
11523-
.sidebar .quarto-alternate-pages h2,
11536+
.sidebar .quarto-alternate-notebooks h2,
1152411537
.sidebar .quarto-alternate-formats h2,
1152511538
.sidebar nav[role="doc-toc"] > h2 {
1152611539
font-weight: 500;
@@ -11535,7 +11548,7 @@ figure .quarto-notebook-link {
1153511548
.sidebar .toc-actions > h2,
1153611549
.sidebar .quarto-code-links > h2,
1153711550
.sidebar .quarto-other-links > h2,
11538-
.sidebar .quarto-alternate-pages > h2,
11551+
.sidebar .quarto-alternate-notebooks > h2,
1153911552
.sidebar .quarto-alternate-formats > h2 {
1154011553
font-size: $toc-tools-font-size;
1154111554
}
@@ -11552,7 +11565,7 @@ figure .quarto-notebook-link {
1155211565
.sidebar .toc-actions h2 > ul a,
1155311566
.sidebar .quarto-code-links h2 > ul a,
1155411567
.sidebar .quarto-other-links h2 > ul a,
11555-
.sidebar .quarto-alternate-pages h2 > ul a,
11568+
.sidebar .quarto-alternate-notebooks h2 > ul a,
1155611569
.sidebar .quarto-alternate-formats h2 > ul a {
1155711570
border-left: none;
1155811571
padding-left: 0.6rem;
@@ -11561,7 +11574,7 @@ figure .quarto-notebook-link {
1156111574
.sidebar .toc-actions ul a:empty,
1156211575
.sidebar .quarto-code-links ul a:empty,
1156311576
.sidebar .quarto-other-links ul a:empty,
11564-
.sidebar .quarto-alternate-pages ul a:empty,
11577+
.sidebar .quarto-alternate-notebooks ul a:empty,
1156511578
.sidebar .quarto-alternate-formats ul a:empty,
1156611579
.sidebar nav[role="doc-toc"] > ul a:empty {
1156711580
display: none;
@@ -11570,7 +11583,7 @@ figure .quarto-notebook-link {
1157011583
.sidebar .toc-actions ul,
1157111584
.sidebar .quarto-code-links ul,
1157211585
.sidebar .quarto-other-links ul,
11573-
.sidebar .quarto-alternate-pages ul,
11586+
.sidebar .quarto-alternate-notebooks ul,
1157411587
.sidebar .quarto-alternate-formats ul {
1157511588
padding-left: 0;
1157611589
list-style: none;
@@ -11593,7 +11606,7 @@ figure .quarto-notebook-link {
1159311606
.sidebar .toc-actions > ul,
1159411607
.sidebar .quarto-code-links > ul,
1159511608
.sidebar .quarto-other-links > ul,
11596-
.sidebar .quarto-alternate-pages > ul,
11609+
.sidebar .quarto-alternate-notebooks > ul,
1159711610
.sidebar .quarto-alternate-formats > ul {
1159811611
font-size: $toc-tools-font-size;
1159911612
}
@@ -11605,7 +11618,7 @@ figure .quarto-notebook-link {
1160511618
.sidebar .toc-actions ul li a,
1160611619
.sidebar .quarto-code-links ul li a,
1160711620
.sidebar .quarto-other-links ul li a,
11608-
.sidebar .quarto-alternate-pages ul li a,
11621+
.sidebar .quarto-alternate-notebooks ul li a,
1160911622
.sidebar .quarto-alternate-formats ul li a,
1161011623
.sidebar nav[role="doc-toc"] > ul li a {
1161111624
line-height: 1.1rem;
@@ -11650,11 +11663,11 @@ kbd,
1165011663
}
1165111664

1165211665
// tweak pandoc default hanging indent
11653-
.quarto-resources-contents div.hanging-indent {
11666+
.quarto-appendix-contents div.hanging-indent {
1165411667
margin-left: 0em;
1165511668
}
1165611669

11657-
.quarto-resources-contents div.hanging-indent div.csl-entry {
11670+
.quarto-appendix-contents div.hanging-indent div.csl-entry {
1165811671
margin-left: 1em;
1165911672
text-indent: -1em;
1166011673
}
@@ -12113,18 +12126,18 @@ nav[role="doc-toc"].slow > * {
1211312126
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#{colorToRGBA(theme-dim($body-color, 20%))}" class="bi bi-toggle-on" viewBox="0 0 16 16"><path d="M5 3a5 5 0 0 0 0 10h6a5 5 0 0 0 0-10H5zm6 9a4 4 0 1 1 0-8 4 4 0 0 1 0 8z"/></svg>');
1211412127
}
1211512128

12116-
// Quarto Resources Treatment
12117-
#quarto-resources.default {
12129+
// Quarto Appendix Treatment
12130+
#quarto-appendix.default {
1211812131
border-top: 1px solid $border-color;
1211912132
}
1212012133

12121-
#quarto-resources.default {
12134+
#quarto-appendix.default {
1212212135
background-color: $body-bg;
1212312136
padding-top: 1.5em;
1212412137
margin-top: 2em;
1212512138
z-index: $zindex-pagelayout;
1212612139

12127-
.quarto-resources-heading {
12140+
.quarto-appendix-heading {
1212812141
margin-top: 0;
1212912142
line-height: 1.4em;
1213012143
font-weight: 600;
@@ -12136,19 +12149,19 @@ nav[role="doc-toc"].slow > * {
1213612149
// Remove botoom margin from specific elements
1213712150
.footnotes ol,
1213812151
.footnotes ol li > p:last-of-type,
12139-
.quarto-resources-contents > p:last-of-type {
12152+
.quarto-appendix-contents > p:last-of-type {
1214012153
margin-bottom: 0;
1214112154
}
1214212155

1214312156
.footnotes ol {
1214412157
margin-left: 0.5em;
1214512158
}
1214612159

12147-
.quarto-resources-secondary-label {
12160+
.quarto-appendix-secondary-label {
1214812161
margin-bottom: 0.4em;
1214912162
}
1215012163

12151-
.quarto-resources-bibtex {
12164+
.quarto-appendix-bibtex {
1215212165
font-size: 0.7em;
1215312166
padding: 1em;
1215412167
border: solid 1px $border-color;
@@ -12158,19 +12171,19 @@ nav[role="doc-toc"].slow > * {
1215812171
}
1215912172
}
1216012173

12161-
.quarto-resources-citeas {
12174+
.quarto-appendix-citeas {
1216212175
font-size: 0.9em;
1216312176
padding: 1em;
1216412177
border: solid 1px $border-color;
1216512178
margin-bottom: 1em;
1216612179
}
1216712180

12168-
.quarto-resources-heading {
12181+
.quarto-appendix-heading {
1216912182
font-size: 1em !important;
1217012183
}
1217112184

1217212185
*[role="doc-endnotes"] > ol,
12173-
.quarto-resources-contents > *:not(h2) {
12186+
.quarto-appendix-contents > *:not(h2) {
1217412187
font-size: 0.9em;
1217512188
}
1217612189

@@ -12822,4 +12835,23 @@ main.quarto-banner-title-block > section:first-child > h4 {
1282212835
}
1282312836

1282412837

12838+
// CSS custom properties consumed by custom.css.
12839+
// Add any custom.css hardcoded color here and reference
12840+
// it with var(--ciesin-*) in custom.css.
12841+
12842+
:root {
12843+
--ciesin-brand: #1D4F91; /* navbar, buttons, back-to-top */
12844+
--ciesin-accent: #1D4F91; /* headings, links, borders, hr */
12845+
--ciesin-muted: #5D6D7E; /* subtitle / secondary text */
12846+
--ciesin-nav: #1D4F91; /* sidebar nav text and icons */
12847+
--ciesin-code-border: #2C3E50; /* code block left border */
12848+
--ciesin-code-bg: #f9fafb; /* code block background */
12849+
--ciesin-footer-rule: rgba(0, 0, 0, 0.08); /* footer top rule */
12850+
--ciesin-shadow: rgba(0, 0, 0, 0.14); /* card shadow */
12851+
--ciesin-shadow-hover: rgba(29, 79, 145, 0.28); /* card hover shadow */
12852+
12853+
--text-color
12854+
}
12855+
12856+
1282512857
// quarto-scss-analysis-annotation { "origin": null }

0 commit comments

Comments
 (0)