mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-17 20:01:33 +02:00

- remove astro-compress to improve build speed - add target and rel attributes to footer links - rename unocss opacity utility from 'opacity' to 'op' - update PostList component's page logic from 'isTag' to 'isHome' - create extend.css file for markdown extended features - reorganize and sort styles in heti.css - fix inline code wrapping issue
48 lines
1.3 KiB
Text
48 lines
1.3 KiB
Text
---
|
|
import { defaultLocale, themeConfig } from '@/config'
|
|
import { getLangFromPath } from '@/i18n/lang'
|
|
|
|
const { author } = themeConfig.site
|
|
const { links: socialLinks, startYear } = themeConfig.footer
|
|
|
|
const currentYear = new Date().getFullYear()
|
|
const year = Number(startYear) === currentYear
|
|
? startYear
|
|
: `${startYear}-${currentYear}`
|
|
|
|
// i18n RSS Path
|
|
const currentLang = getLangFromPath(Astro.url.pathname)
|
|
const links = socialLinks.map((link) => {
|
|
if (link.name === 'RSS') {
|
|
return {
|
|
...link,
|
|
url: currentLang === defaultLocale ? link.url : `/${currentLang}${link.url}`,
|
|
}
|
|
}
|
|
return link
|
|
})
|
|
---
|
|
|
|
<footer
|
|
class="text-3 leading-4.75 font-navbar lg:text-3.5"
|
|
lg="uno-desktop-column bottom-20"
|
|
>
|
|
<p>
|
|
{links.map((link, index) => (
|
|
<>
|
|
<a class="transition-colors hover:c-primary" href={link.url} target="_blank" rel="noopener noreferrer">
|
|
{link.name}
|
|
</a>
|
|
{index < links.length - 1 && ' / '}
|
|
</>
|
|
))}
|
|
</p>
|
|
|
|
<p>
|
|
Powered by <a class="transition-colors hover:c-primary" href="https://astro.build/" target="_blank" rel="noopener noreferrer">Astro</a> and <a class="transition-colors hover:c-primary" href="https://github.com/radishzzz/astro-theme-retypeset" target="_blank" rel="noopener noreferrer">Retypeset</a>
|
|
</p>
|
|
|
|
<p>
|
|
© {year} {author}
|
|
</p>
|
|
</footer>
|