- JournalPostCard: the title link is the card's only anchor; the image is no longer a link and the separate read-more link is gone; the whole card stays clickable through a CSS stretched link with the focus ring on the card; prop headingLevel (2 | 3, default 2) - related posts keep their h2 and render their cards at h3; JournalPostList passes headingLevel through - smoke checks headings=strict (one h1, no skipped level) and cardlinks=N on every fixture page; expectation files for postTitleTag forced to h1 and p (the documented two-h1 and no-h1 consequences) BREAKING CHANGE: .journal-post-card__more and the image link (.journal-post-card__image is now a div) are removed from post cards.
16 lines
551 B
Vue
16 lines
551 B
Vue
<script setup lang="ts">
|
|
// Related posts under a post. The page passes the API's related_posts, or
|
|
// the latest posts when the post has no category. The section heading is an
|
|
// h2 and the cards' titles h3 (D-52).
|
|
import type { JournalPost } from '../../utils/types.ts'
|
|
|
|
defineProps<{ posts: JournalPost[] }>()
|
|
</script>
|
|
|
|
<template>
|
|
<section v-if="posts.length" class="journal-related">
|
|
<h2 class="journal-related__title">{{ $t('journal.post.related') }}</h2>
|
|
<JournalPostList :posts="posts" :heading-level="3" />
|
|
</section>
|
|
</template>
|