fix: tags spacing on course cards

This commit is contained in:
Jannat Patel
2025-04-21 16:16:54 +05:30
parent 726f733434
commit bfc1488860
2 changed files with 10 additions and 6 deletions

View File

@@ -9,16 +9,20 @@
:class="{ 'default-image': !course.image }"
:style="{ backgroundImage: 'url(\'' + encodeURI(course.image) + '\')' }"
>
<div
class="flex items-center flex-wrap space-x-1 relative top-4 px-2 w-fit"
>
<Badge v-if="course.featured" variant="subtle" theme="green" size="md">
<div class="flex items-center flex-wrap relative top-4 px-2 w-fit">
<Badge
v-if="course.featured"
variant="subtle"
theme="green"
size="md"
class="mb-1 mr-1"
>
{{ __('Featured') }}
</Badge>
<div
v-if="course.tags"
v-for="tag in course.tags?.split(', ')"
class="text-xs bg-white text-gray-800 px-2 py-0.5 rounded-md"
class="text-xs bg-white text-gray-800 px-2 py-0.5 rounded-md mb-1 mr-1"
>
{{ tag }}
</div>

View File

@@ -56,7 +56,7 @@
<CourseInstructors :instructors="course.data.instructors" />
</div>
</div>
<div v-if="course.data.tags" class="flex mt-4 w-fit">
<div v-if="course.data.tags" class="flex my-4 w-fit">
<Badge
theme="gray"
size="lg"