Skip to content

Commit

Permalink
Use FontAwesome for backtotop icon (#629)
Browse files Browse the repository at this point in the history
Some computers do not have the unicode fonts required to render ⮝
  • Loading branch information
stefanv authored Jul 19, 2024
1 parent d6cfcde commit 827e00a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
19 changes: 7 additions & 12 deletions assets/theme-css/backtotop.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@
background: #f39200;
}
#backtotop a {
display: flex;
align-items: center;
outline: none;
text-decoration: none;
border: 0;
display: block;
width: 46px;
height: 46px;
background-color: var(
Expand All @@ -35,20 +36,14 @@
border-radius: 50%;
text-align: center;
font-size: 1.625rem;
color: var(--spht-color-light);
}
body #backtotop a {
outline: none;
color: var(--colorSecondary);
}
#backtotop a:after {
outline: none;
content: "⮝";
position: relative;

#backtotop svg {
margin: 0 auto;
display: block;
top: 50%;
-webkit-transform: translateY(-55%);
transform: translateY(-55%);
}

#backtotop.visible #backtotop-color:hover {
background: var(--pst-color-link-hover);
}
2 changes: 1 addition & 1 deletion layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
{{ end }}

<!-- Back To Top Button -->
<div id="backtotop"><a href="#" id="backtotop-color"></a></div>
<div id="backtotop"><a href="#" id="backtotop-color"><i class="fa-solid fa-arrow-up"></i></a></div>

{{ if .Site.Params.footer }}
{{ partial "footer.html" . -}}
Expand Down

0 comments on commit 827e00a

Please sign in to comment.