summaryrefslogtreecommitdiff
path: root/src/components/Header.astro
blob: 0d7a700324535a4a59f92de6244ab4b82624b1fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
---
import Logo from '../components/Logo.astro';

const navItems = [
    { linkText: 'Home', href: '/' },
    { linkText: 'Revalidation', href: '/revalidation' },
    { linkText: 'Image CDN', href: '/image-cdn' },
    { linkText: 'Edge Function', href: '/edge' },
    { linkText: 'Blobs', href: '/blobs' }
];
---

<nav class="flex flex-wrap items-center gap-4 pt-6 pb-16 sm:pt-12 sm:pb-24">
    <a href="/">
        <Logo />
    </a>
    {
        !!navItems?.length && (
            <ul class="flex flex-wrap gap-x-4 gap-y-1">
                {navItems.map((item) => (
                    <li>
                        <a href={item.href} class="inline-block px-1.5 py-1 sm:px-3 sm:py-2">
                            {item.linkText}
                        </a>
                    </li>
                ))}
            </ul>
        )
    }
</nav>