Skip to content

Commit 197f544

Browse files
eunjae-leeatinux
andauthored
fix: remove whole cover-related div if cover is missing (#175)
* fix: remove whole cover-related div if cover is missing ## Summary Hi! I'm trying to use this theme, and all my blog posts don't have cover image. In such case, the top of all the ArticlesListItem doesn't match. So I suggest this change to remove the whole cover-related div if `article.cover` is not present. Let me know what you think :) * Update pnpm-lock.yaml --------- Co-authored-by: Sébastien Chopin <seb@nuxt.com>
1 parent f59e470 commit 197f544

File tree

2 files changed

+223
-10
lines changed

2 files changed

+223
-10
lines changed

components/content/ArticlesListItem.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const id = computed(() => {
3636
:class="{ 'featured': featured }"
3737
:data-content-id="id"
3838
>
39-
<div class="image">
39+
<div v-if="article.cover" class="image">
4040
<div v-if="article?.badges">
4141
<span
4242
v-for="(badge, index) in article.badges"
@@ -51,7 +51,6 @@ const id = computed(() => {
5151
</div>
5252
<NuxtLink :to="article._path">
5353
<NuxtImg
54-
v-if="article.cover"
5554
:src="article.cover"
5655
:alt="article.title"
5756
width="16"

0 commit comments

Comments
 (0)