style back-to-top with css

This commit is contained in:
John Bowdre 2024-01-21 21:16:15 -06:00
parent 4c71de46a9
commit 208b3c19c3
2 changed files with 12 additions and 6 deletions

View file

@ -6,11 +6,7 @@
<!-- Back to Top button via https://github.com/vfeskov/vanilla-back-to-top --> <!-- Back to Top button via https://github.com/vfeskov/vanilla-back-to-top -->
{{ $jsToTop := resources.Get "js/back-to-top.js" | minify }} {{ $jsToTop := resources.Get "js/back-to-top.js" | minify }}
<script src="{{ $jsToTop.RelPermalink }}"></script> <script src="{{ $jsToTop.RelPermalink }}"></script>
<script>addBackToTop({ <script>addBackToTop()</script>
diameter: 56,
backgroundColor: '#383838',
textColor: '#c45a5a'
})</script>
<!-- Search index via https://victoria.dev/blog/add-search-to-hugo-static-sites-with-lunr/ --> <!-- Search index via https://victoria.dev/blog/add-search-to-hugo-static-sites-with-lunr/ -->
{{ partial "search-index.html" .}} {{ partial "search-index.html" .}}

View file

@ -260,7 +260,6 @@ form button {
display: grid; display: grid;
grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
grid-gap: 0.5rem; grid-gap: 0.5rem;
/* justify-content: center; */
margin: 0.5rem 0; margin: 0.5rem 0;
} }
@ -333,4 +332,15 @@ button.tinylytics_kudos:hover {
.frontmatter_tags { .frontmatter_tags {
font-size: 0.8rem; font-size: 0.8rem;
color: var(--off-fg); color: var(--off-fg);
}
/* back-to-top styling */
#back-to-top {
background: var(--inner-bg);
height: 56px;
width: 56px;
}
#back-to-top svg {
fill: var(--link);
} }