All files / apps/huella-legal/layers/reading/app/components/article View.vue

100% Statements 7/7
100% Branches 2/2
100% Functions 3/3
100% Lines 7/7

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  5x       4x   3x                     3x   4x               5x   5x    
<template>
    <article v-if="article">
        <ArticleHeader :article :comment-count="comments?.count" />
 
        <UContainer class="grid grid-cols-1 pt-10 pb-12 md:pt-12 lg:grid-cols-12 lg:gap-x-8">
            <ArticleToc :items="article.body.toc" class="mb-10 lg:col-span-3 lg:mb-0" />
 
            <div class="min-w-0 lg:col-span-9">
                <ArticleProse
                    :lead="article.body.lead"
                    :html="article.body.html"
                    :image="article.image"
                />
                <ArticleBackMatter :article :author-counts class="mt-12 lg:mt-16" />
            </div>
        </UContainer>
 
        <UContainer class="grid grid-cols-1 pb-16 lg:grid-cols-12 lg:gap-x-8 lg:pb-20">
            <div class="min-w-0 lg:col-span-9 lg:col-start-4">
                <slot name="comments" :article :comments />
            </div>
        </UContainer>
 
        <ArticleRelated v-if="article.category" :category="article.category" :articles="related" />
    </article>
</template>
 
<script setup lang="ts">
const { article, related, authorCounts, comments } = await useArticle();
 
useScholarlyMeta(article);
</script>