44 lines
796 B
Plaintext
44 lines
796 B
Plaintext
---
|
|
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>
|