fix(docs): fixed external link rendering
Some checks failed
Pylint / Pylint (3.12) (push) Failing after 37s
Some checks failed
Pylint / Pylint (3.12) (push) Failing after 37s
This commit is contained in:
parent
3ae4ed0712
commit
d27bdda769
4 changed files with 15 additions and 28 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
__pycache__
|
||||
.cache
|
||||
|
|
13
docs/css/external.css
Normal file
13
docs/css/external.css
Normal file
|
@ -0,0 +1,13 @@
|
|||
:root {
|
||||
--external-link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Clink xmlns='' type='text/css' rel='stylesheet' id='dark-mode-custom-link'/%3E%3Clink xmlns='' type='text/css' rel='stylesheet' id='dark-mode-general-link'/%3E%3Cstyle xmlns='' lang='en' type='text/css' id='dark-mode-custom-style'/%3E%3Cstyle xmlns='' lang='en' type='text/css' id='dark-mode-native-style'/%3E%3Cpath d='M432 320h-32a16 16 0 0 0-16 16v112H64V128h144a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16H48a48 48 0 0 0-48 48v352a48 48 0 0 0 48 48h352a48 48 0 0 0 48-48V336a16 16 0 0 0-16-16zM488 0H360c-21.37 0-32.05 25.91-17 41l35.73 35.73L135 320.37a24 24 0 0 0 0 34L157.67 377a24 24 0 0 0 34 0l243.61-243.68L471 169c15 15 41 4.5 41-17V24a24 24 0 0 0-24-24z'/%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
a[href^="http" ]:not(.md-button, [data-sub-html], .md-footer-social__link, .md-source, .md-search-result__link, .md-logo, .md-version__link, [href*="config.discordsrv.com"], [href*="squidfunk.github.io"], [href*="Documentation/edit"]):after {
|
||||
background: transparent var(--external-link-icon) 0 0 no-repeat;
|
||||
content: "";
|
||||
display: inline-block;
|
||||
height: 12px;
|
||||
margin-left: 3px;
|
||||
width: 12px;
|
||||
filter: invert(1);
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
/* Indentation. */
|
||||
div.doc-contents:not(.first) {
|
||||
padding-left: 25px;
|
||||
border-left: .05rem solid var(--md-typeset-table-color);
|
||||
}
|
||||
|
||||
/* Mark external links as such. */
|
||||
a.external::after,
|
||||
a.autorefs-external::after {
|
||||
/* https://primer.style/octicons/arrow-up-right-24 */
|
||||
mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.25 15.5a.75.75 0 00.75-.75v-9a.75.75 0 00-.75-.75h-9a.75.75 0 000 1.5h7.19L6.22 16.72a.75.75 0 101.06 1.06L17.5 7.56v7.19c0 .414.336.75.75.75z"></path></svg>');
|
||||
-webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.25 15.5a.75.75 0 00.75-.75v-9a.75.75 0 00-.75-.75h-9a.75.75 0 000 1.5h7.19L6.22 16.72a.75.75 0 101.06 1.06L17.5 7.56v7.19c0 .414.336.75.75.75z"></path></svg>');
|
||||
content: ' ';
|
||||
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
position: relative;
|
||||
|
||||
height: 1em;
|
||||
width: 1em;
|
||||
background-color: var(--md-typeset-a-color);
|
||||
}
|
||||
|
||||
a.external:hover::after,
|
||||
a.autorefs-external:hover::after {
|
||||
background-color: var(--md-accent-fg-color);
|
||||
}
|
|
@ -25,7 +25,7 @@ plugins:
|
|||
# paths: [pyzipline]
|
||||
|
||||
extra_css:
|
||||
- css/material.css
|
||||
- css/external.css
|
||||
|
||||
theme:
|
||||
name: material
|
||||
|
|
Loading…
Reference in a new issue