All files / apps/developer-portal/layers/projects/app/components ProjectsWelcome.vue

100% Statements 13/13
100% Branches 4/4
100% Functions 4/4
100% Lines 12/12

Press n or j to go to the next uncovered block, b, p or k for the previous block.

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 31 32 33 34 35 36 37 38 39 40 41 42  32x 32x 32x     32x         32x 18x           18x 32x     32x                 6x           6x 6x      
<template>
    <section class="flex flex-col gap-3">
        <div class="max-w-3xl">
            <h1 class="text-2xl font-semibold">
                {{ readme?.title ?? $t("projectsWelcome.title") }}
            </h1>
            <p class="mt-1 text-sm text-muted">
                {{ readme?.description ?? $t("projectsWelcome.noSummary") }}
            </p>
        </div>
 
        <div class="grid gap-3 @2xl:grid-cols-3">
            <NuxtLink
                v-for="route in ROUTES"
                :key="route.to"
                :to="route.to"
                class="border border-default bg-default p-4 hover:bg-elevated"
            >
                <UIcon :name="route.icon" class="size-5 text-muted" />
                <h2 class="mt-3 font-semibold">
                    {{ $t(`projectsWelcome.routes.${route.id}.title`) }}
                </h2>
                <p class="mt-1 text-sm text-muted">
                    {{ $t(`projectsWelcome.routes.${route.id}.line`) }}
                </p>
            </NuxtLink>
        </div>
    </section>
</template>
 
<script setup lang="ts">
const ROUTES = [
    { id: "explore", to: "/projects", icon: "i-lucide-boxes" },
    { id: "understand", to: "/graph", icon: "i-lucide-git-fork" },
    { id: "contribute", to: "/wiki/docs/guides/first-hour", icon: "i-lucide-play" },
];
 
const { data: readme } = await useAsyncData("repository-readme", () =>
    queryCollection("docs").path("/readme").select("title", "description").first(),
);
</script>