Skip to content

Commit d41147a

Browse files
committed
docs - hero alt component
1 parent 68c39ff commit d41147a

File tree

3 files changed

+38
-19
lines changed

3 files changed

+38
-19
lines changed

components/content/HeroAlt.vue

Lines changed: 34 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
<template>
22
<div
3-
class="gap-8 px-4 py-8 md:py-12 md:pb-8 lg:py-12 lg:pb-10"
4-
:class="{ 'grid md:grid-cols-3': $slots.right }"
3+
class="gap-8 px-4 py-8 md:py-12 md:pb-8 lg:py-12 lg:pb-10"
4+
:class="{ 'grid md:grid-cols-2': true }"
55
>
6-
<section
7-
class="flex flex-col items-start gap-2"
8-
:class="{ 'md:col-span-2': $slots.right }"
9-
>
6+
<!-- Left Column - Content -->
7+
<section class="flex flex-col items-start gap-2">
108
<NuxtLinkLocale
11-
v-if="announcement"
12-
:to="announcement.to"
13-
:target="announcement.target"
14-
class="inline-flex items-center px-0.5 text-sm font-medium"
9+
v-if="announcement"
10+
:to="announcement.to"
11+
:target="announcement.target"
12+
class="inline-flex items-center px-0.5 text-sm font-medium"
1513
>
1614
<template v-if="announcement.icon">
1715
<SmartIcon :name="announcement.icon" :size="16" />
@@ -24,19 +22,16 @@
2422
<h1 class="text-3xl font-bold leading-tight tracking-tighter md:text-4xl lg:leading-[1.1]">
2523
<ContentSlot :use="$slots.title" unwrap="p" />
2624
</h1>
27-
<h1 class="text-3xl font-bold leading-tight tracking-tighter md:text-4xl lg:leading-[1.1]">
28-
<ContentSlot :use="$slots.description" unwrap="p" />
29-
</h1>
3025
<p class="text-foreground max-w-2xl text-lg font-light">
3126
<ContentSlot :use="$slots.subtitle" unwrap="p" />
3227
</p>
3328

3429
<div class="flex w-full items-center justify-start gap-2 py-2">
3530
<NuxtLinkLocale
36-
v-for="(action, i) in actions"
37-
:key="i"
38-
:to="action.to"
39-
:target="action.target"
31+
v-for="(action, i) in actions"
32+
:key="i"
33+
:to="action.to"
34+
:target="action.target"
4035
>
4136
<UiButton :variant="action.variant" size="sm">
4237
<SmartIcon v-if="action.leftIcon" :name="action.leftIcon" class="mr-1" />
@@ -46,8 +41,23 @@
4641
</NuxtLinkLocale>
4742
</div>
4843
</section>
49-
<div class="mx-auto" :class="{ 'order-first md:order-last': mobileRight === 'top' }">
50-
<ContentSlot :use="$slots.right" unwrap="p" />
44+
45+
<!-- Right Column - Logo -->
46+
<div class="flex items-center justify-center order-first md:order-last">
47+
<div class="flex flex-col items-center gap-4">
48+
<div class="flex items-center justify-center rounded-2xl bg-muted/20">
49+
<img
50+
:src="logo?.light"
51+
:alt="logo?.alt"
52+
class="h-32 w-32 object-contain dark:hidden"
53+
/>
54+
<img
55+
:src="logo?.dark || logo?.light"
56+
:alt="logo?.alt"
57+
class="hidden h-32 w-32 object-contain dark:block"
58+
/>
59+
</div>
60+
</div>
5161
</div>
5262
</div>
5363
</template>
@@ -68,6 +78,11 @@ defineProps<{
6878
to: string;
6979
target?: Target;
7080
}];
81+
logo?: {
82+
light?: string;
83+
dark?: string;
84+
alt?: string;
85+
};
7186
mobileRight?: 'top' | 'bottom';
7287
}>();
7388
defineSlots();

www/content/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ actions:
2929
variant: outline
3030
to: https://comforterp.com/
3131
target: _blank
32+
logo:
33+
light: /comforterp_logo_brand_vertical.png
34+
dark: /comforterp_logo_brand_vertical.png
35+
alt: Comfort ERP Logo
3236
---
3337

3438
#title
7.15 KB
Loading

0 commit comments

Comments
 (0)