Have website use theme variables instead of custom SASS overrides (#285)

This commit is contained in:
Jelmer Borst
2022-10-09 19:41:32 +02:00
committed by GitHub
parent 8f8f57fc5b
commit 45cac6105e
8 changed files with 20 additions and 23 deletions

View File

@@ -12,7 +12,7 @@
<!-- XXX: The theme does not natively support both light and dark mode. Drop
this section once https://github.com/just-the-docs/just-the-docs/issues/234 is
resolved. -->
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-light.css' | relative_url }}"
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-eps-light.css' | relative_url }}"
media="(prefers-color-scheme: light)">
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-dark.css' | relative_url }}"
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-eps-dark.css' | relative_url }}"
media="(prefers-color-scheme: dark)">

View File

@@ -0,0 +1,5 @@
footer > img#logo {
width: 2rem;
margin: 0 auto;
display: block;
}

View File

@@ -0,0 +1 @@
$nav-width: 400px;

View File

@@ -0,0 +1,3 @@
@import "./color_schemes/dark";
@import "_variables";
@import "_common";

View File

@@ -0,0 +1,3 @@
@import "./color_schemes/light";
@import "_variables";
@import "_common";

View File

@@ -1,21 +0,0 @@
// XXX: We should override `$nav-width(-md)`, but this breaks code highlighting
// and other styles. See
// https://github.com/just-the-docs/just-the-docs/issues/982.
// Once the fix for the above issue is released, replace this section with the
// approach recommended at
// https://just-the-docs.github.io/just-the-docs/docs/customization/#custom-schemes.
@include mq(lg) {
.side-bar {
min-width: 400px;
}
.site-nav, .site-header {
width: 400px;
}
}
footer > img#logo {
width: 2rem;
margin: 0 auto;
display: block;
}

View File

@@ -0,0 +1,3 @@
---
---
{% include css/just-the-docs.scss.liquid color_scheme="eps-dark" %}

View File

@@ -0,0 +1,3 @@
---
---
{% include css/just-the-docs.scss.liquid color_scheme="eps-light" %}