Skip to content

Commit a4f09c8

Browse files
committed
docs(sidebar): Link size and unlink hostname
1 parent 48eda47 commit a4f09c8

File tree

2 files changed

+21
-9
lines changed

2 files changed

+21
-9
lines changed

docs/_static/css/custom.css

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
11
h2 {
2-
font-size: 2rem;
32
margin-bottom: 1.25rem;
43
margin-top: 1.25rem;
54
scroll-margin-top: 0.5rem;
65
}
76

87
h3 {
9-
font-size: 1.5rem;
108
margin-bottom: 1.25rem;
119
margin-top: 1.25rem;
1210
scroll-margin-top: 0.5rem;
1311
}
1412

1513
h4 {
16-
font-size: 1.25rem;
1714
margin-bottom: 1.25rem;
1815
scroll-margin-top: 0.5rem;
1916
}
2017

2118
.sidebar-tree p.indented-block {
22-
padding: var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal) 0 var(--sidebar-item-spacing-horizontal);
19+
padding: var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal) 0
20+
var(--sidebar-item-spacing-horizontal);
2321
margin-bottom: 0;
2422
}
2523

@@ -28,13 +26,12 @@ h4 {
2826
display: block;
2927
}
3028

31-
.sidebar-tree p.indented-block > :not(.project-name) {
32-
font-size: var(--toc-font-size);
33-
}
34-
3529
.sidebar-tree p.indented-block .project-name {
3630
font-size: var(--sidebar-item-font-size);
3731
font-weight: bold;
3832
margin-right: calc(var(--sidebar-item-spacing-horizontal) / 2.5);
3933
}
4034

35+
.sidebar-tree .active {
36+
font-weight: bold;
37+
}

docs/_templates/sidebar/projects.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="sidebar-tree projects">
1+
<div class="sidebar-tree projects" id="sidebar-projects">
22
<p class="caption" role="heading">
33
<span class="caption-text"
44
>team git-pull / <a href="https://www.git-pull.com/">Tony Narlock</a></span
@@ -29,3 +29,18 @@
2929
</span>
3030
</p>
3131
</div>
32+
<script type="text/javascript">
33+
(() => {
34+
console.log(window.location.hostname)
35+
const sidebar = document.getElementById("sidebar-projects")
36+
sidebar.querySelectorAll(`a[href*="${window.location.hostname}"]`)
37+
.forEach((link) => {
38+
if (!link.classList.contains("active")) {
39+
const d = document.createElement('span');
40+
d.innerHTML = link.innerHTML;
41+
d.classList.add("active");
42+
link.parentNode.replaceChild(d, link);
43+
}
44+
});
45+
})()
46+
</script>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy