Skip to content

Commit

Permalink
Docs: Update JS deps
Browse files Browse the repository at this point in the history
  • Loading branch information
facelessuser committed Jan 24, 2025
1 parent 968c6c7 commit 5849b74
Show file tree
Hide file tree
Showing 8 changed files with 522 additions and 438 deletions.
36 changes: 21 additions & 15 deletions docs/src/scss/extensions/_highlight.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
@use "../utilities/break";
@use "../utilities/convert";

:root > * {
--highlight-svg-console: svg-load("@mdi/svg/svg/console.svg");
--highlight-svg-arrow-expand: svg-load("@mdi/svg/svg/arrow-expand.svg");
--highlight-svg-arrow-collapse: svg-load("@mdi/svg/svg/arrow-collapse.svg");
}

.highlight {
.kc { // Keyword constant
color: var(--md-code-hl-constant-color);
Expand Down Expand Up @@ -44,7 +50,7 @@
padding: 0 convert.px2em( 4px, 13.6px);
color: var(--md-code-fg-color);
background-color: var(--md-code-inline-bg-color);
border-radius: px2rem(2px);
border-radius: convert.px2rem(2px);
box-shadow: none;
}

Expand Down Expand Up @@ -86,7 +92,7 @@
tab-size: 8;

+ .result {
border-width: px2rem(2px);
border-width: convert.px2rem(2px);
}

/* `pymdownx-inline` mode */
Expand Down Expand Up @@ -121,10 +127,10 @@
margin-top: 1em;
padding: convert.px2em(8px) convert.px2em(16px, 13.6px) convert.px2em(8px) convert.px2em(40px, 13.6px);
font-weight: 700;
font-size: px2rem(13.6px);
font-size: convert.px2rem(13.6px);
background-color: var(--md-code-title-bg-color);
border-top-left-radius: px2rem(2px);
border-top-right-radius: px2rem(2px);
border-top-left-radius: convert.px2rem(2px);
border-top-right-radius: convert.px2rem(2px);

// Adjust margins and and general container look of code block
+ pre {
Expand All @@ -143,7 +149,7 @@
width: convert.px2em(20px, 13.6px);
height: convert.px2em(20px, 13.6px);
background-color: var(--md-default-fg-color);
mask-image: svg-load("@mdi/svg/svg/console.svg");
mask-image: var(--highlight-svg-console);
mask-repeat: no-repeat;
mask-size: contain;
content: "";
Expand Down Expand Up @@ -177,7 +183,7 @@
background-color: var(--md-primary-fg-color);
mask-repeat: no-repeat;
mask-size: contain;
border-radius: px2rem(2px);
border-radius: convert.px2rem(2px);
cursor: pointer;
content: "";

Expand All @@ -202,11 +208,11 @@
display: none;

&::before {
mask-image: svg-load("@mdi/svg/svg/arrow-expand.svg");
mask-image: var(--highlight-svg-arrow-expand);
}
}
&.collapse::before {
mask-image: svg-load("@mdi/svg/svg/arrow-collapse.svg");
mask-image: var(--highlight-svg-arrow-collapse);
}
}
}
Expand All @@ -229,7 +235,7 @@
position: absolute;
bottom: 0;
left: 0;
padding: convert.px2em(32px) convert.px2em(8px) convert.px2em(8px) px2rem(16px);
padding: convert.px2em(32px) convert.px2em(8px) convert.px2em(8px) convert.px2rem(16px);
background-image: linear-gradient(to bottom,
transparent,
var(--md-default-bg-color) 80%
Expand All @@ -243,15 +249,15 @@

> {
diagram-div {
margin-right: px2rem(-16px);
margin-left: px2rem(-16px);
margin-right: convert.px2rem(-16px);
margin-left: convert.px2rem(-16px);
}
.collapse-code {
margin-right: px2rem(-16px);
margin-left: px2rem(-16px);
margin-right: convert.px2rem(-16px);
margin-left: convert.px2rem(-16px);

label.collapse {
left: px2rem(16px);
left: convert.px2rem(16px);
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion docs/src/scss/extensions/_toc.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
@use "../utilities/convert";

:root > * {
--toc-svg-link: svg-load("@mdi/svg/svg/link.svg");
}

// Header anchors
.md-typeset {
.headerlink {
Expand All @@ -11,7 +15,7 @@
mask-size: convert.px2em(16px);
mask-repeat: no-repeat;
visibility: visible;
mask-image: svg-load("@mdi/svg/svg/link.svg");
mask-image: var(--toc-svg-link);
}

.headerlink:hover,
Expand Down
1 change: 0 additions & 1 deletion docs/theme/assets/pymdownx-extras/extra-3005714f37.css.map

This file was deleted.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/theme/assets/pymdownx-extras/extra-38dae67b1c.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ extra:
link: https://github.com/facelessuser
extra_css:
# - https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css
- assets/pymdownx-extras/extra-3005714f37.css
- assets/pymdownx-extras/extra-38dae67b1c.css
extra_javascript:
- https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.min.js
# - https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js
Expand Down
Loading

0 comments on commit 5849b74

Please sign in to comment.