mirror of
https://github.com/VSCodium/vscodium.github.io.git
synced 2025-12-12 16:00:27 -06:00
added anchors to headers using anchor.js
This commit is contained in:
parent
a542949e4a
commit
baf38f9fd5
@ -58,6 +58,15 @@ pre {
|
|||||||
nav > ul > li > a:focus, [aria-hidden="true"] > a { box-shadow: none; }
|
nav > ul > li > a:focus, [aria-hidden="true"] > a { box-shadow: none; }
|
||||||
a:focus { box-shadow: 0 0 0 3px {{ site.colors.purple }}cc; }
|
a:focus { box-shadow: 0 0 0 3px {{ site.colors.purple }}cc; }
|
||||||
|
|
||||||
|
/* creates an invisible pseudo-element to adjust for the fixed navbar so the anchors takes you to a location above the link */
|
||||||
|
:target::before {
|
||||||
|
content: "";
|
||||||
|
display: block;
|
||||||
|
margin-top: -80px;
|
||||||
|
height: 80px;
|
||||||
|
width: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
/* ----- base elements ----- */
|
/* ----- base elements ----- */
|
||||||
|
|
||||||
img {
|
img {
|
||||||
|
|||||||
13
index.html
13
index.html
@ -59,5 +59,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script src="site.js"></script>
|
<script src="site.js"></script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/anchor-js/anchor.min.js"></script>
|
||||||
|
<script>
|
||||||
|
// configure options for anchors
|
||||||
|
anchors.options = {
|
||||||
|
placement: "left",
|
||||||
|
};
|
||||||
|
|
||||||
|
// add anchors to all h2, h3, h4, h5, h6
|
||||||
|
anchors
|
||||||
|
.add()
|
||||||
|
// remove anchors from the following elements
|
||||||
|
.remove("#free-libre-open-source-software-binaries-of-vs-code");
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user