Add back-to-index link to all pages

This commit is contained in:
Talia 2022-06-23 08:59:19 +02:00
parent bff1601f18
commit 849b623f04
5 changed files with 38 additions and 0 deletions

View file

@ -6,6 +6,8 @@
<scroll-to-top> <scroll-to-top>
</scroll-to-top> </scroll-to-top>
<a class="back" href="..">Module Index</a>
<h1 class="js module">debounce.js</h1> <h1 class="js module">debounce.js</h1>
<code-block>import debounce from 'debounce.js'</code-block> <code-block>import debounce from 'debounce.js'</code-block>

View file

@ -6,6 +6,8 @@
<scroll-to-top> <scroll-to-top>
</scroll-to-top> </scroll-to-top>
<a class="back" href="..">Module Index</a>
<h1 class="js module">element.js</h1> <h1 class="js module">element.js</h1>
<code-block>import element from 'element.js'</code-block> <code-block>import element from 'element.js'</code-block>

View file

@ -6,6 +6,8 @@
<scroll-to-top> <scroll-to-top>
</scroll-to-top> </scroll-to-top>
<a class="back" href="..">Module Index</a>
<h1 class="js module">listener.js</h1> <h1 class="js module">listener.js</h1>
<code-block>import listener from 'listener.js'</code-block> <code-block>import listener from 'listener.js'</code-block>

View file

@ -8,6 +8,8 @@
<scroll-to-top> <scroll-to-top>
</scroll-to-top> </scroll-to-top>
<a class="back" href="..">Module Index</a>
<h1>Skooma.js</h1> <h1>Skooma.js</h1>
<code-block>import {html} from 'skooma.js'</code-block> <code-block>import {html} from 'skooma.js'</code-block>

View file

@ -163,3 +163,33 @@ table-of-contents ul li::before {
color: var(--color-hl); color: var(--color-hl);
margin-right: 1ch; margin-right: 1ch;
} }
a.back {
--margin: .6em;
color: var(--color-hl);
text-decoration: none;
padding: .2em;
padding-top: .3em;
padding-right: .4em;
position: absolute;
top: var(--margin);
left: var(--margin);
border-radius: .3em;
}
a.back:hover {
color: white;
background: var(--color-hl);
}
a.back::before {
display: inline-block;
content: '';
width: 0;
height: 0;
border: solid transparent .4em;
border-color: transparent currentcolor transparent transparent;
margin-right: .8em;
transform: scale(2, 1);
}