Skip to content

Commit 0567d79

Browse files
LazyGeniusManatinuxSébastien Chopin
authored
fix: featured article image (#98)
* fix: featured article image * fix: add `alt` to article image Co-authored-by: Sébastien Chopin <seb@nuxtlabs.com> --------- Co-authored-by: Sébastien Chopin <seb@nuxtlabs.com> Co-authored-by: Sébastien Chopin <seb@nuxtjs.com>
1 parent cb37cdb commit 0567d79

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

components/content/ArticlesListItem.vue

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ defineProps({
2424

2525
<template>
2626
<article v-if="article._path && article.title" :class="{ 'featured': featured }">
27-
<NuxtLink :to="article._path">
28-
<img v-if="article.cover" :src="article.cover">
29-
</NuxtLink>
27+
<div class="image">
28+
<NuxtLink :to="article._path">
29+
<img v-if="article.cover" :src="article.cover" :alt="article.title">
30+
</NuxtLink>
31+
</div>
3032

3133
<div class="content">
3234
<NuxtLink :to="article._path" class="headline">
@@ -62,9 +64,13 @@ css({
6264
objectFit: 'cover',
6365
borderRadius: '{radii.md}',
6466
},
67+
'.image': {
68+
flex: 1,
69+
},
6570
'.content': {
6671
display: 'flex',
6772
flexDirection: 'column',
73+
flex: 1,
6874
'.headline': {
6975
text: '2xl',
7076
marginBottom: '{space.2}',

0 commit comments

Comments
 (0)