---
import {getCollection} from "astro:content";
import {astroI18n} from "astro-i18n";

import NavbarLayout from "../../layouts/NavbarLayout.astro";
import {l} from "../../util/util";
let posts = await getCollection("help", entry => entry.id.split("/")[0] === astroI18n.locale);
---

<NavbarLayout title="Helpcenter">
    <div>
        <h1>Helpcenter</h1>
        {posts.map(value => (
                <a href={l("/help/" + value.slug)}>
                    <h2>{value.data.title}</h2>
                </a>
        ))}
    </div>
</NavbarLayout>

<style>
    div {
        @apply mx-auto bg-gray-100 px-4 py-8 rounded-b-md shadow-md pt-40 sm:pt-28 md:pt-14
            dark:text-white dark:bg-neutral-900;
    }
</style>