All files / apps/portfolio/app/pages/work index.vue

100% Statements 7/7
100% Branches 0/0
100% Functions 1/1
100% Lines 6/6

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 43 44 45 46 47 48 49 50 51 52 53 54 55 56                                                    1x 1x             1x 1x 1x                                 2x    
<template>
    <PageHero
        carry="hero-work"
        :title="$t('work.title')"
        :mark="$t('work.titleMark')"
        :lead="$t('work.lead')"
    />
 
    <UContainer as="section" class="flex flex-col">
        <ULink
            v-for="(item, index) in cases"
            :key="item.slug"
            :to="`/work/${item.slug}`"
            class="group grid gap-6 border-t border-accented py-10 md:grid-cols-12 md:gap-10"
        >
            <img
                v-bind="workScreenshot(item)"
                sizes="(min-width: 48rem) 58vw, 100vw"
                :loading="index ? 'lazy' : 'eager'"
                :fetchpriority="index ? 'auto' : 'high'"
                :alt="item.screenshot.alt"
                :style="carried(`work-shot-${item.slug}`)"
                width="1440"
                height="900"
                class="w-full border border-default md:col-span-7"
            />
            <div class="flex flex-col gap-3 md:col-span-5">
                <p class="font-mono text-xs text-muted uppercase">{{ item.kind }}</p>
                <h2
                    class="font-display text-section text-highlighted group-hover:text-primary"
                    :style="carried(`work-title-${item.slug}`)"
                >
                    {{ item.name }}
                </h2>
                <p class="text-lg">{{ item.line }}</p>
                <p class="font-mono text-sm text-muted">{{ item.facts.join(" · ") }}</p>
                <span class="mt-2 text-primary underline underline-offset-4">
                    {{ $t("work.cta") }} →
                </span>
            </div>
        </ULink>
    </UContainer>
</template>
 
<script setup lang="ts">
import { isStudy } from "~/utils/work";
 
const { t } = useI18n();
 
const { data: work } = await useWorkList();
 
const cases = computed(() => work.value.filter(isStudy));
 
useSeoMeta({ title: () => t("work.head"), description: () => t("work.lead") });
</script>