SanYeCao-blog/src/components/Footer.astro

117 lines
2.6 KiB
Text
Raw Normal View History

2026-03-24 17:33:01 +00:00
---
2026-03-24 22:28:23 +00:00
import { getLangFromUrl, getTranslations, type Lang } from "@/i18n";
2026-04-16 18:10:25 +00:00
import BuildHashBlocks from "@/components/BuildHashBlocks.astro";
import Divider from "@/components/Divider.astro";
2026-06-21 19:40:11 +00:00
import Beian from "./Beian.astro";
2026-04-16 18:10:25 +00:00
const commit = import.meta.env.PUBLIC_GIT_COMMIT || "unknown";
2026-03-24 22:28:23 +00:00
const lang = getLangFromUrl(Astro.url);
const t = getTranslations(lang);
2026-03-24 17:33:01 +00:00
---
2026-03-24 22:28:23 +00:00
<footer class="footer">
<Divider />
2026-04-16 19:20:09 +00:00
<a
href="https://github.com/ClovertaTheTrilobita/SanYeCao-blog"
class="github"
aria-label="GitHub repository"></a>
<a href="mailto:cloverta@petalmail.com" class="email" aria-label="Email"></a>
<p class="footer-content-pc">
© 2026 ClovertaTheTrilobita · <a
href="https://github.com/ClovertaTheTrilobita/SanYeCao-blog"
>Source code</a
> licensed under MIT. Content rights reserved.
<!-- <code class="build-commit">{commit.slice(0, 7)}</code> -->
</p>
<div class="footer-content-mobile">
<p>© 2026 ClovertaTheTrilobita</p>
<p>Content rights reserved.</p>
</div>
2026-04-16 18:10:25 +00:00
<BuildHashBlocks />
2026-03-24 22:28:23 +00:00
2026-06-21 19:40:11 +00:00
<Beian />
2026-03-24 22:28:23 +00:00
</footer>
2026-03-26 23:23:19 +00:00
2026-03-24 22:28:23 +00:00
<style>
.footer {
margin-top: 1rem;
padding: 1.5rem 0 0;
font-size: 0.95rem;
opacity: 0.9;
position: relative;
}
2026-04-16 19:20:09 +00:00
.github {
display: inline-block;
width: 30px;
height: 30px;
background-color: #1f2328;
-webkit-mask: url("/images/github-outline-7.svg") no-repeat center / contain;
mask: url("/images/github-outline-7.svg") no-repeat center / contain;
vertical-align: middle;
margin-bottom: 0.5rem;
margin-right: 0.5rem;
transition:
transform 0.18s ease,
opacity 0.18s ease;
}
2026-03-26 23:23:19 +00:00
2026-04-16 19:20:09 +00:00
.email {
display: inline-block;
width: 30px;
height: 30px;
background-color: #1f2328;
-webkit-mask: url("/images/email.svg") no-repeat center / contain;
mask: url("/images/email.svg") no-repeat center / contain;
vertical-align: middle;
margin-bottom: 0.5rem;
transition:
transform 0.18s ease,
opacity 0.18s ease;
}
2026-03-26 23:23:19 +00:00
2026-04-16 19:20:09 +00:00
.github:hover {
transform: translateY(-2px);
}
.email:hover {
transform: translateY(-2px);
}
:global(html.dark .github) {
background-color: #e6e6e6;
}
2026-03-26 23:23:19 +00:00
2026-04-16 19:20:09 +00:00
:global(html.dark .email) {
background-color: #e6e6e6;
}
2026-03-24 22:28:23 +00:00
.footer {
margin-top: 1rem;
padding: 1.5rem 0 0;
font-size: 0.95rem;
opacity: 0.9;
position: relative;
2026-04-16 19:20:09 +00:00
text-align: center;
2026-03-24 22:28:23 +00:00
}
2026-04-16 19:20:09 +00:00
.footer-content-mobile {
display: none;
2026-03-24 22:28:23 +00:00
}
2026-04-16 19:20:09 +00:00
.footer p {
margin: 0.4rem 0;
font-size: 0.8rem;
/* display: inline-flex; */
2026-03-24 22:28:23 +00:00
}
2026-04-16 19:20:09 +00:00
@media (max-width: 700px) {
.footer-content-pc {
display: none;
2026-03-26 23:23:19 +00:00
}
2026-04-16 19:20:09 +00:00
.footer-content-mobile {
display: block;
2026-03-26 23:23:19 +00:00
}
2026-04-16 19:20:09 +00:00
}
2026-03-24 22:28:23 +00:00
</style>