mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
feat(website): social links in footer
This commit is contained in:
@@ -1,13 +1,19 @@
|
||||
---
|
||||
import { GITHUB_REPO_URL } from '@/consts';
|
||||
import { DISCORD_INVITE_URL, GITHUB_REPO_URL } from '@/consts';
|
||||
import { ArrowUpRight } from 'lucide-react';
|
||||
import GitHub from './icons/GitHub';
|
||||
import Discord from './icons/Discord';
|
||||
|
||||
const navLinks = [
|
||||
type NavLink = {
|
||||
href: string;
|
||||
label: string;
|
||||
external?: boolean;
|
||||
};
|
||||
const navLinks: NavLink[] = [
|
||||
{ href: '/', label: 'Home' },
|
||||
{ href: '/docs', label: 'Docs' },
|
||||
{ href: '/blog', label: 'Blog' },
|
||||
{ href: '/privacy', label: 'Privacy' },
|
||||
{ href: GITHUB_REPO_URL, label: 'GitHub', external: true },
|
||||
];
|
||||
|
||||
type Props = {
|
||||
@@ -17,14 +23,36 @@ const { class: className } = Astro.props;
|
||||
---
|
||||
|
||||
<footer class:list={['border-t border-light-40 py-6 px-3 grid gap-3', className]}>
|
||||
<nav class="text-center sm:text-left">
|
||||
{
|
||||
navLinks.map((link) => (
|
||||
<a href={link.href} class="intent:underline px-3 py-2 inline-flex gap-1 items-center">
|
||||
{link.label} {link.external ? <ArrowUpRight size="1em" /> : null}
|
||||
</a>
|
||||
))
|
||||
}
|
||||
<nav class="flex flex-col sm:flex-row">
|
||||
<div class="flex justify-center sm:justify-start">
|
||||
{
|
||||
navLinks.map((link) => (
|
||||
<a href={link.href} class="intent:underline px-3 py-2 inline-flex gap-1 items-center">
|
||||
{link.label} {link.external ? <ArrowUpRight size="1em" /> : null}
|
||||
</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
<div class="flex justify-center sm:justify-start">
|
||||
<a
|
||||
href={GITHUB_REPO_URL}
|
||||
class="group px-3 py-2 inline-flex items-center"
|
||||
aria-label="GitHub"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<GitHub size="1em" className="text-dark-80 intent:text-dark-100" />
|
||||
</a>
|
||||
<a
|
||||
href={DISCORD_INVITE_URL}
|
||||
class="group px-3 py-2 inline-flex items-center"
|
||||
aria-label="Discord"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Discord size="1em" className="text-dark-80 intent:text-dark-100" />
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<p class="text-sm text-center sm:text-left text-dark-40 px-3">
|
||||
@@ -34,7 +62,9 @@ const { class: className } = Astro.props;
|
||||
<br />
|
||||
Sponsored by <a
|
||||
href="https://www.mux.com?utm_source=videojs&utm_campaign=vjs10"
|
||||
class="underline intent:decoration-wavy">Mux</a
|
||||
class="underline intent:decoration-wavy"
|
||||
>
|
||||
Mux
|
||||
</a>
|
||||
</p>
|
||||
</footer>
|
||||
|
||||
Reference in New Issue
Block a user