mirror of
https://github.com/krahets/hello-algo.git
synced 2024-12-26 12:26:29 +08:00
build
This commit is contained in:
parent
0a7cf721d1
commit
ae89d7ecac
2 changed files with 39 additions and 17 deletions
|
@ -25,7 +25,7 @@
|
||||||
/* Set palette on initial load */
|
/* Set palette on initial load */
|
||||||
var palette = __md_get("__palette")
|
var palette = __md_get("__palette")
|
||||||
if (palette && typeof palette.color === "object") {
|
if (palette && typeof palette.color === "object") {
|
||||||
var theme = palette.color.scheme === "slate" ? "dark" : "light"
|
var theme = palette.color.scheme === "slate" ? "dark_dimmed" : "light"
|
||||||
giscus.setAttribute("data-theme", theme)
|
giscus.setAttribute("data-theme", theme)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
ref.addEventListener("change", function() {
|
ref.addEventListener("change", function() {
|
||||||
var palette = __md_get("__palette")
|
var palette = __md_get("__palette")
|
||||||
if (palette && typeof palette.color === "object") {
|
if (palette && typeof palette.color === "object") {
|
||||||
var theme = palette.color.scheme === "slate" ? "dark" : "light"
|
var theme = palette.color.scheme === "slate" ? "dark_dimmed" : "light"
|
||||||
|
|
||||||
/* Instruct Giscus to change theme */
|
/* Instruct Giscus to change theme */
|
||||||
var frame = document.querySelector(".giscus-frame")
|
var frame = document.querySelector(".giscus-frame")
|
||||||
|
|
|
@ -1,30 +1,43 @@
|
||||||
|
|
||||||
/* Color Settings */
|
/* Color Settings */
|
||||||
/* https://github.com/squidfunk/mkdocs-material/blob/6b5035f5580f97532d664e3d1babf5f320e88ee9/src/assets/stylesheets/main/_colors.scss */
|
/* https://github.com/squidfunk/mkdocs-material/blob/6b5035f5580f97532d664e3d1babf5f320e88ee9/src/assets/stylesheets/main/_colors.scss */
|
||||||
/* https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#custom-colors */
|
/* https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#custom-colors */
|
||||||
:root > * {
|
:root > * {
|
||||||
--md-primary-fg-color: #FFFFFF;
|
--md-primary-fg-color: #ffffff;
|
||||||
--md-primary-bg-color: #1D1D20;
|
--md-primary-bg-color: #1d1d20;
|
||||||
|
|
||||||
--md-accent-fg-color: #999;
|
--md-default-fg-color: #1d1d20;
|
||||||
|
--md-default-bg-color: #ffffff;
|
||||||
|
|
||||||
--md-typeset-color: #1D1D20;
|
--md-accent-fg-color: #999;
|
||||||
--md-typeset-a-color: #2AA996;
|
|
||||||
|
--md-admonition-fg-color: #1d1d20;
|
||||||
|
|
||||||
|
--md-typeset-color: #1d1d20;
|
||||||
|
--md-typeset-a-color: #2aa996;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-md-color-scheme="slate"] {
|
[data-md-color-scheme="slate"] {
|
||||||
--md-primary-fg-color: #2E303E;
|
--md-primary-fg-color: #22272e;
|
||||||
--md-primary-bg-color: #FEFEFE;
|
--md-primary-bg-color: #adbac7;
|
||||||
|
|
||||||
--md-accent-fg-color: #999;
|
--md-default-fg-color: #adbac7;
|
||||||
|
--md-default-bg-color: #22272e;
|
||||||
|
|
||||||
--md-typeset-color: #FEFEFE;
|
--md-code-bg-color: #1c2329;
|
||||||
--md-typeset-a-color: #21C8B8 !important;
|
|
||||||
|
--md-accent-fg-color: #999;
|
||||||
|
|
||||||
|
--md-admonition-fg-color: #adbac7;
|
||||||
|
|
||||||
|
--md-footer-fg-color: #adbac7;
|
||||||
|
|
||||||
|
--md-typeset-color: #adbac7;
|
||||||
|
--md-typeset-a-color: #21c8b8 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* https://github.com/squidfunk/mkdocs-material/issues/4832#issuecomment-1374891676 */
|
/* https://github.com/squidfunk/mkdocs-material/issues/4832#issuecomment-1374891676 */
|
||||||
.md-nav__link[for] {
|
.md-nav__link[for] {
|
||||||
color: var(--md-default-fg-color) !important
|
color: var(--md-default-fg-color) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Center Markdown Tables (requires md_in_html extension) */
|
/* Center Markdown Tables (requires md_in_html extension) */
|
||||||
|
@ -33,7 +46,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Reset alignment for table cells */
|
/* Reset alignment for table cells */
|
||||||
.md-typeset .center-table :is(td,th):not([align]) {
|
.md-typeset .center-table :is(td, th):not([align]) {
|
||||||
text-align: initial;
|
text-align: initial;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,8 +83,10 @@
|
||||||
|
|
||||||
/* font-family setting for Win10 */
|
/* font-family setting for Win10 */
|
||||||
body {
|
body {
|
||||||
--md-text-font-family: -apple-system,BlinkMacSystemFont,var(--md-text-font,_),Helvetica,Arial,sans-serif;
|
--md-text-font-family: -apple-system, BlinkMacSystemFont,
|
||||||
--md-code-font-family: var(--md-code-font,_),SFMono-Regular,Consolas,Menlo,-apple-system,BlinkMacSystemFont,var(--md-text-font,_),monospace;
|
var(--md-text-font, _), Helvetica, Arial, sans-serif;
|
||||||
|
--md-code-font-family: var(--md-code-font, _), SFMono-Regular, Consolas, Menlo,
|
||||||
|
-apple-system, BlinkMacSystemFont, var(--md-text-font, _), monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* max height of code block */
|
/* max height of code block */
|
||||||
|
@ -79,3 +94,10 @@ body {
|
||||||
.md-typeset pre > code {
|
.md-typeset pre > code {
|
||||||
max-height: 25rem;
|
max-height: 25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Make the picture not glare in dark theme */
|
||||||
|
[data-md-color-scheme="slate"] .md-typeset img,
|
||||||
|
[data-md-color-scheme="slate"] .md-typeset svg,
|
||||||
|
[data-md-color-scheme="slate"] .md-typeset video {
|
||||||
|
filter: brightness(0.85) invert(0.05);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue