This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
---
|
||||
import type { Translation } from "../data/translations";
|
||||
|
||||
interface Props {
|
||||
t: Translation;
|
||||
}
|
||||
|
||||
const { t } = Astro.props;
|
||||
---
|
||||
|
||||
<footer class="footer">
|
||||
|
||||
<p>
|
||||
© 2026 {t.profile.name}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{t.profile.footerRole}
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
|
||||
<button id="backToTop" aria-label={t.ui.backToTop}>
|
||||
↑
|
||||
</button>
|
||||
|
||||
<script>
|
||||
const backToTopButton = document.querySelector("#backToTop");
|
||||
|
||||
const toggleBackToTop = () => {
|
||||
backToTopButton?.classList.toggle("show", window.scrollY > 500);
|
||||
};
|
||||
|
||||
window.addEventListener("scroll", toggleBackToTop, { passive: true });
|
||||
toggleBackToTop();
|
||||
|
||||
backToTopButton?.addEventListener("click", () => {
|
||||
window.scrollTo({
|
||||
top: 0,
|
||||
behavior: "smooth"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user