diff --git a/.gitignore b/.gitignore index e62f227..6454b86 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ # Keeping Knit html files out *.html - # Keeping Data out of the Repo data/raw/* !data/raw/.gitkeep @@ -63,3 +62,6 @@ rsconnect/ /.quarto/ **/*.quarto_ipynb + +# ignore .editorconfig +/.editorconfig \ No newline at end of file diff --git a/_quarto.yml b/_quarto.yml index d55e40a..0900636 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -15,8 +15,8 @@ format: light: - ./custom.scss dark: - - darkly - ./custom.scss + - ./custom-dark.scss pdf: margin-left: 20mm margin-top: 30mm diff --git a/custom-dark.scss b/custom-dark.scss new file mode 100644 index 0000000..dd57457 --- /dev/null +++ b/custom-dark.scss @@ -0,0 +1,26 @@ +/*-- scss:defaults --*/ +$gray-800: #444 !default; +$gray-900: #222 !default; +$white: #fff !default; + +$body-bg: $gray-900 !default; +$body-color: $white !default; + +// code +$code-color: $gray-800 !default; +$pre-color: inherit !default; + +/*-- scss:rules --*/ + +@include color-mode(dark) {} + +// source code +pre.sourceCode { + background-color: #444; +} + +.code-copy-button:hover { + & .bi::before { + background-image: url('data:image/svg+xml,') !important; + } +} diff --git a/custom.scss b/custom.scss index 0c97b9d..77a6e1e 100644 --- a/custom.scss +++ b/custom.scss @@ -1,13 +1,10 @@ -/*-- scss:uses --*/ - -/*-- scss:functions --*/ - /*-- scss:defaults --*/ // fonts -$font-family-sans-serif: "Helvetica", "Red Hat Display", sans-serif !default; +$font-size-root: null !default; +$font-size-base: 1rem !default; +$font-family-sans-serif: system-ui, -apple-system, "Helvetica", "Red Hat Display", sans-serif !default; $font-family-monospace: "Courier New", "Consolas", monospace !default; - $headings-font-weight: 500 !default; // colors @@ -23,12 +20,11 @@ $primary: $syndemics-blue !default; $secondary: $syndemics-cyan !default; $light: $background-light !default; $dark: $background-dark !default; +$link-color: $syndemics-pink !default; // options $enable-rounded: true !default; -/*-- scss:mixins --*/ - /*-- scss:rules --*/ :root { @@ -37,24 +33,34 @@ $enable-rounded: true !default; } body.quarto-light { - --bs-link-hover-color-rgb: #{colorToRGBA(#3d9be9)}; - h1,.h1,h2,.h2 { + --bs-heading-color: var(--bs-heading-color-light); + + h1, .h1, h2, .h2 { color: var(--bs-heading-color-light); } } body.quarto-dark { - --bs-link-color-rgb: #{colorToRGBA(#f0325f)}; - --bs-link-hover-color-rgb: #{colorToRGBA(#3d9be9)}; - h1,.h1,h2,.h2 { + --bs-heading-color: var(--bs-heading-color-dark); + + h1, .h1, h2, .h2 { color: var(--bs-heading-color-dark); } } -h1.title,.title.h1 { +h1.title, .title.h1 { font-size: calc(1.5rem + 0.9vw); } +// color toggle icon +.quarto-color-scheme-toggle { + position: fixed; + + .bi::before, .alternate .bi::before { + transition: background-image 0.5s; + } +} + #TOC { font-weight: 600; @@ -69,10 +75,13 @@ h1.title,.title.h1 { } } + .nav-link { + transition: unset; + } + .nav-link:not(:hover) { color: inherit !important; border-left: solid 1px var(--bs-body-color); - transition: color 0.5s; } .nav-link:hover { @@ -85,15 +94,9 @@ h1.title,.title.h1 { font-weight: 600 !important; } +// table style .table { - & > tbody { - border: 2px solid; - } - - & col:not(:last-of-type) { - border-right: 2px solid; - } - + // heading & tr:first-of-type { background-color: var(--bs-heading-color-dark); font-weight: 600; @@ -104,8 +107,29 @@ h1.title,.title.h1 { color: black; } } + + // table rules + & > tbody { + border: 2px solid; + } + + & col:not(:last-of-type) { + border-right: 2px solid; + } + + & > caption { + font-weight: 600; + color: var(--bs-heading-color); + } +} + +figcaption { + font-weight: 600; + color: var(--bs-heading-color); + text-align: center; } +// source code style pre code { font-weight: 600; } @@ -113,7 +137,8 @@ pre code { pre:not(.sourceCode) { border: 1px #ccc solid; border-radius: 5px; - overflow: visible; + overflow-x: clip; + overflow-y: visible; &:before { position: relative;