card
Card with image
Card with image
Загрузка превью…
src/card/c-card-7.vue
<!--
Расхождение с апстримом: `IconPlaceholder` заменена инлайновым `<svg>`
(lucide-react v0.545.0 "bell"/"sparkles"/"arrow-right") — см. docs/PORTING.md §5.
`https://picsum.photos/...?random=N` заменён локальным 1x1 data-URI
(`PIXEL`): проверено эмпирически (`curl -L` дважды на один и тот же URL) —
picsum отдаёт РАЗНОЕ случайное фото на каждый запрос независимо от значения
`random=N` (это просто cache-buster, не сид), то есть React- и Vue-снимок
в headless-стенде получают два разных фото и диф никогда не сойдётся.
Отличается от `unsplash.com/photo-<id>` (используется в других блоках,
например `checkbox-15`/`avatar`) — там URL детерминирован по ID фото.
-->
<script setup lang="ts">
import { Badge } from "@/components/reui/badge"
import { Button } from "@/components/ui/button"
import { Card, CardContent } from "@/components/ui/card"
const PIXEL =
"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAUwAOw=="
</script>
<template>
<Card class="w-full max-w-xs">
<CardContent class="flex flex-col gap-4">
<div class="relative h-48 w-full overflow-hidden rounded-lg">
<img
:src="PIXEL"
alt="16:9"
width="1000"
height="800"
class="h-full w-full object-cover"
/>
</div>
<div class="flex items-center justify-between gap-5">
<Badge variant="outline">
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
aria-hidden="true"
class="lucide lucide-bell"
><path d="M10.268 21a2 2 0 0 0 3.464 0" /><path d="M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" /></svg>
Trending
</Badge>
<div class="flex items-center gap-1">
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
aria-hidden="true"
class="lucide lucide-sparkles"
><path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z" /><path d="M20 2v4" /><path d="M22 4h-4" /><circle cx="4" cy="20" r="2" /></svg>
<span class="text-secondary-foreground text-xs font-medium">
Featured
</span>
</div>
</div>
<p class="text-foreground text-sm">
Simplifying your workflow from day one. Manage your tasks, projects,
and team in one place.
</p>
<Button>
Get Started
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
aria-hidden="true"
class="lucide lucide-arrow-right"
><path d="M5 12h14" /><path d="m12 5 7 7-7 7" /></svg>
</Button>
</CardContent>
</Card>
</template>