add back-to-top.svg

This commit is contained in:
Steven Lynn
2024-08-07 19:23:11 +08:00
parent 2007b6392f
commit 3e122dbd39
2 changed files with 14 additions and 16 deletions

View File

@@ -0,0 +1,10 @@
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round">
<polyline points="18 15 12 9 6 15"></polyline>
</svg>

After

Width:  |  Height:  |  Size: 244 B

View File

@@ -42,6 +42,8 @@ const seoParams = {
const HEADER_INJECT = getEnv(import.meta.env, Astro, 'HEADER_INJECT')
const FOOTER_INJECT = getEnv(import.meta.env, Astro, 'FOOTER_INJECT')
const backToTopIcon = 'src/assets/back-to-top.svg'
---
<!doctype html>
@@ -124,22 +126,8 @@ const FOOTER_INJECT = getEnv(import.meta.env, Astro, 'FOOTER_INJECT')
</div>
</div>
</div>
<a
href="#wrapper"
id="back-to-top"
aria-label="Back to top"
title="Back to top"
>
<svg
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<polyline points="18 15 12 9 6 15"></polyline>
</svg>
<a href="#wrapper" id="back-to-top" aria-label="Back to top">
<img src={backToTopIcon} alt="Back to Top" />
</a>
<Fragment set:html={FOOTER_INJECT} />
</body>