Skip to content

Commit

Permalink
fix: remove whole cover-related div if cover is missing (#175)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
eunjae-lee and Atinux committed Dec 6, 2023
1 parent f59e470 commit 197f544
Show file tree
Hide file tree
Showing 2 changed files with 223 additions and 10 deletions.
3 changes: 1 addition & 2 deletions components/content/ArticlesListItem.vue
Expand Up @@ -36,7 +36,7 @@ const id = computed(() => {
:class="{ 'featured': featured }"
:data-content-id="id"
>
<div class="image">
<div v-if="article.cover" class="image">
<div v-if="article?.badges">
<span
v-for="(badge, index) in article.badges"
Expand All @@ -51,7 +51,6 @@ const id = computed(() => {
</div>
<NuxtLink :to="article._path">
<NuxtImg
v-if="article.cover"
:src="article.cover"
:alt="article.title"
width="16"
Expand Down

0 comments on commit 197f544

Please sign in to comment.