Commit 4f120b2a authored by Kaushal Modi's avatar Kaushal Modi

Add the jump to top/bottom fixed links on the right

parent 14e83f6f
...@@ -81,6 +81,8 @@ ...@@ -81,6 +81,8 @@
</div> </div>
{{ end }} {{ end }}
{{ partial "jump.html" }}
<!-- Back to top --> <!-- Back to top -->
<div class="backtotop center no-text-decoration"> <div class="backtotop center no-text-decoration">
<a href="#top">back to <span class="top">top</span></a> <a href="#top">back to <span class="top">top</span></a>
...@@ -93,6 +95,7 @@ ...@@ -93,6 +95,7 @@
<!-- Prev/next post --> <!-- Prev/next post -->
{{ partial "prev_next.html" . }} {{ partial "prev_next.html" . }}
<a id="bottom"></a>
<!-- Send/receive Webmentions --> <!-- Send/receive Webmentions -->
{{ partial "webmention_send.html" . }} {{ partial "webmention_send.html" . }}
{{ partial "webmention_rcv.html" . }} {{ partial "webmention_rcv.html" . }}
......
<div class="no-text-decoration">
<div class="jump top"><a href="#top" title="Top of this page"></a></div>
<div class="jump bottom"><a href="#bottom" title="Bottom of this page"></a></div>
</div>
#!/usr/bin/env bash #!/usr/bin/env bash
# Time-stamp: <2018-05-22 11:21:55 kmodi> # Time-stamp: <2018-06-18 10:40:51 kmodi>
# https://github.com/be5invis/Iosevka/issues/238#issuecomment-351527918 # https://github.com/be5invis/Iosevka/issues/238#issuecomment-351527918
# pyftsubset - https://github.com/fonttools/fonttools # pyftsubset - https://github.com/fonttools/fonttools
...@@ -23,6 +23,7 @@ IFS=$'\n\t' ...@@ -23,6 +23,7 @@ IFS=$'\n\t'
# U+00C0-00FF : more from Latin 1 Supplement, needed to cover non-English names of commentors like "Frédéric" # U+00C0-00FF : more from Latin 1 Supplement, needed to cover non-English names of commentors like "Frédéric"
# U+2000-205E : General Punctuation : https://unicode-table.com/en/blocks/general-punctuation/ (includes zero width space, curly quotes, etc.) # U+2000-205E : General Punctuation : https://unicode-table.com/en/blocks/general-punctuation/ (includes zero width space, curly quotes, etc.)
# U+25A0,U+25CB : Unicode chars BLACK SQUARE and WHITE CIRCLE for unordered list bullets # U+25A0,U+25CB : Unicode chars BLACK SQUARE and WHITE CIRCLE for unordered list bullets
# U+2B06,U+2B07 : Unicode chars UPWARDS BLACK ARROW and DOWNWARDS BLACK ARROW for the top/bottom jump links
common_args='--layout-features=""' common_args='--layout-features=""'
run_pyftsubset () { run_pyftsubset () {
...@@ -63,6 +64,6 @@ run_pyftsubset "libre-baskerville/2012" "U+0020-007E,U+00A7-00BE,U+ ...@@ -63,6 +64,6 @@ run_pyftsubset "libre-baskerville/2012" "U+0020-007E,U+00A7-00BE,U+
run_pyftsubset "source-sans-pro/2.020R-ro-1.075R-it" "U+0020-007E,U+00A7-00BE,U+2000-205E,U+25A0,U+25CB" run_pyftsubset "source-sans-pro/2.020R-ro-1.075R-it" "U+0020-007E,U+00A7-00BE,U+2000-205E,U+25A0,U+25CB"
run_pyftsubset "linux-libertine/5.3.0" "U+0020-007E,U+00A7-00BE,U+2000-205E,U+25A0,U+25CB" run_pyftsubset "linux-libertine/5.3.0" "U+0020-007E,U+00A7-00BE,U+2000-205E,U+25A0,U+25CB"
run_pyftsubset "andada/2013" "U+0020-007E,U+00A7-00BE,U+2000-205E,U+25A0,U+25CB" run_pyftsubset "andada/2013" "U+0020-007E,U+00A7-00BE,U+2000-205E,U+25A0,U+25CB"
run_pyftsubset "iosevka/1.14.1" "U+0020-007E,U+00A7-00BE,U+2000-205E,U+25A0,U+25CB" run_pyftsubset "iosevka/1.14.1" "U+0020-007E,U+00A7-00BE,U+2000-205E,U+25A0,U+25CB,U+2B06-2B07"
echo "Done!" echo "Done!"
...@@ -100,6 +100,7 @@ ...@@ -100,6 +100,7 @@
/* Small Caps */ /* Small Caps */
/* Display Inline */ /* Display Inline */
/* RSS/ATOM feed buttons */ /* RSS/ATOM feed buttons */
/* Jump */
/* * Global */ /* * Global */
/* The --theme-color and --theme-color-light root variables are set in /* The --theme-color and --theme-color-light root variables are set in
...@@ -2152,6 +2153,24 @@ footer .social, ...@@ -2152,6 +2153,24 @@ footer .social,
} }
} }
/* * Jump */
.jump {
font-family: var(--mono);
font-size: 3rem;
position: fixed;
right: 0;
z-index: 999; /* Always on top */
}
.jump.top {
top: 3rem; /* Offset required so that the arrow does not overlap with the hamburger icon on small screens. */
}
.jump.bottom {
bottom: 0;
}
.jump a:hover {
color: var(--theme-color);
}
/* em vs rem: https://j.eremy.net/confused-about-rem-and-em/ /* em vs rem: https://j.eremy.net/confused-about-rem-and-em/
> While em is relative to the font-size of its direct or nearest parent, > While em is relative to the font-size of its direct or nearest parent,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment