Skip to content

Commit 827e00a

Browse files
authored
Use FontAwesome for backtotop icon (#629)
Some computers do not have the unicode fonts required to render ⮝
1 parent d6cfcde commit 827e00a

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

assets/theme-css/backtotop.css

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@
2121
background: #f39200;
2222
}
2323
#backtotop a {
24+
display: flex;
25+
align-items: center;
2426
outline: none;
2527
text-decoration: none;
2628
border: 0;
27-
display: block;
2829
width: 46px;
2930
height: 46px;
3031
background-color: var(
@@ -35,20 +36,14 @@
3536
border-radius: 50%;
3637
text-align: center;
3738
font-size: 1.625rem;
39+
color: var(--spht-color-light);
3840
}
39-
body #backtotop a {
40-
outline: none;
41-
color: var(--colorSecondary);
42-
}
43-
#backtotop a:after {
44-
outline: none;
45-
content: "⮝";
46-
position: relative;
41+
42+
#backtotop svg {
43+
margin: 0 auto;
4744
display: block;
48-
top: 50%;
49-
-webkit-transform: translateY(-55%);
50-
transform: translateY(-55%);
5145
}
46+
5247
#backtotop.visible #backtotop-color:hover {
5348
background: var(--pst-color-link-hover);
5449
}

layouts/_default/baseof.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
{{ end }}
3434

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

3838
{{ if .Site.Params.footer }}
3939
{{ partial "footer.html" . -}}

0 commit comments

Comments
 (0)