54 lines
1.7 KiB
Vue
54 lines
1.7 KiB
Vue
<script setup lang="ts">
|
||
import { closeButtonVariants } from "@heroui-vue/styles";
|
||
import { IconX } from "@tabler/icons-vue";
|
||
import {
|
||
Card,
|
||
CardHeader,
|
||
CardTitle,
|
||
CardDescription,
|
||
CardFooter,
|
||
Button,
|
||
} from "@heroui-vue/components";
|
||
</script>
|
||
<template>
|
||
<Card class="w-full items-stretch md:flex-row">
|
||
<div
|
||
class="relative h-[140px] w-full shrink-0 overflow-hidden rounded-2xl sm:h-[120px] sm:w-[120px]"
|
||
>
|
||
<img
|
||
alt="樱桃"
|
||
class="pointer-events-none absolute inset-0 h-full w-full scale-125 object-cover select-none"
|
||
loading="lazy"
|
||
src="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/docs/cherries.jpeg"
|
||
/>
|
||
</div>
|
||
<div class="flex flex-1 flex-col gap-3">
|
||
<CardHeader class="gap-1">
|
||
<CardTitle class="pe-8">成为 ACME 创作者!</CardTitle>
|
||
<CardDescription>
|
||
这是一段占位说明文字,用于展示横向卡片布局、配图与右上角关闭按钮的排版效果。
|
||
</CardDescription>
|
||
<button
|
||
type="button"
|
||
:class="closeButtonVariants()"
|
||
aria-label="关闭横幅"
|
||
class="absolute end-3 top-3"
|
||
>
|
||
<IconX aria-hidden="true" />
|
||
</button>
|
||
</CardHeader>
|
||
<CardFooter
|
||
class="mt-auto flex w-full flex-col items-start gap-3 sm:flex-row sm:items-center sm:justify-between"
|
||
>
|
||
<div class="flex flex-col">
|
||
<span class="text-sm font-medium text-foreground">
|
||
仅剩 10 个名额
|
||
</span>
|
||
<span class="text-xs text-muted">报名截止:10 月 10 日</span>
|
||
</div>
|
||
<Button class="w-full sm:w-auto">立即申请</Button>
|
||
</CardFooter>
|
||
</div>
|
||
</Card>
|
||
</template>
|