Skip to content

Commit

Permalink
feat(site): external blog image must cover (#592)
Browse files Browse the repository at this point in the history
  • Loading branch information
mageexcel authored Oct 18, 2023
1 parent 444c259 commit abff79e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions components/blogs/BlogCard.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="mb-5 mt-1" role="button">
<NuxtLink class="text-dark" :href="blog._path">
<NuxtImg loading="lazy" format="webp" quality="80" densities="x1 x2" :alt="blog.image" :src="blog.image" class="card-image w-100 rounded-3" />
<NuxtImg loading="lazy" format="webp" quality="80" densities="x1 x2" :alt="blog.image" :src="blog.image" class="card-image w-100 rounded-3" fit="cover"/>
<div class="mt-3">
<span class="small-text category">{{ blog.category }}</span>
<h6 class="mt-2">{{ blog.title }}</h6>
Expand Down Expand Up @@ -40,6 +40,7 @@
}
.card-image {
max-height: 220px;
object-fit: cover;
aspect-ratio: 16/9;
}
</style>
2 changes: 1 addition & 1 deletion components/blogs/BlogsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</div>
</template>

<script>
<script >
export default {
name: "BlogsList",
props: {
Expand Down

0 comments on commit abff79e

Please sign in to comment.