Post.vue 669 B

123456789101112131415161718192021222324252627
  1. <template>
  2. <div class="flex flex-col gap-2 text-foreground bg-background-100 rounded-lg overflow-hidden show">
  3. <img
  4. :src="$props.image"
  5. :alt="$props.title"
  6. class="h-[170px] object-cover object-center"
  7. >
  8. <div class="px-2 leading-none text-xl font-semibold">
  9. {{ $props.title }}
  10. </div>
  11. <div class="px-2 font-medium">
  12. {{ $props.description }}
  13. </div>
  14. <div class="w-full text-right -mt-2 px-2 pb-2 text-sm font-medium opacity-50">
  15. {{ $props.date }}
  16. </div>
  17. </div>
  18. </template>
  19. <script setup lang="ts">
  20. defineProps<{
  21. image?: string
  22. title?: string
  23. description?: string
  24. date?: string
  25. }>()
  26. </script>