Skip to content

Commit 28e4d85

Browse files
authored
docs: fix hero image responsive (#540)
1 parent bd54215 commit 28e4d85

File tree

3 files changed

+228
-12
lines changed

3 files changed

+228
-12
lines changed

docs/app/pages/index.vue

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ onMounted(() => {
4848
</script>
4949

5050
<template>
51-
<UPage class="relative">
51+
<UPage class="relative overflow-hidden">
5252
<UPageHero
5353
:description="page?.hero.description"
5454
orientation="horizontal"
@@ -118,16 +118,24 @@ onMounted(() => {
118118
</div>
119119
</template>
120120

121-
<img
122-
src="/images/landing/hero-screenshot-dark.svg"
123-
class="hidden dark:lg:block absolute right-0 h-[300px] lg:h-[380px] xl:h-[440px] 2xl:h-[540px]"
124-
alt="NuxtHub Deploy page"
125-
>
126-
<img
127-
src="/images/landing/hero-screenshot-light.svg"
128-
class="hidden dark:hidden lg:block absolute right-0 h-[300px] lg:h-[380px] xl:h-[440px] 2xl:h-[540px]"
129-
alt="NuxtHub Deploy page"
121+
<UCard
122+
variant="soft"
123+
class="hidden lg:block max-2xl:absolute border border-(--ui-border-accented) bg-(--ui-bg-accented)/40 max-2xl:-right-30 [--padding-card:--spacing(3)] rounded-[calc(theme(borderRadius.lg)+var(--padding-card))] 2xl:scale-110 2xl:origin-right"
124+
:ui="{
125+
body: 'lg:pl-(--padding-card) lg:pt-(--padding-card) lg:pb-(--padding-card) lg:pr-0 2xl:pr-(--padding-card) rounded-(--padding-card)'
126+
}"
130127
>
128+
<img
129+
src="/images/landing/hero-screenshot-dark.svg"
130+
class="hidden dark:lg:block size-full object-cover object-left h-[300px] lg:h-[380px] xl:h-[440px] 2xl:h-full"
131+
alt="NuxtHub Deploy page"
132+
>
133+
<img
134+
src="/images/landing/hero-screenshot-light.svg"
135+
class="hidden dark:hidden lg:block size-full object-cover object-left h-[300px] lg:h-[380px] xl:h-[440px] 2xl:h-full"
136+
alt="NuxtHub Deploy page"
137+
>
138+
</UCard>
131139

132140
<UModal v-model:open="videoModalOpen" :ui="{ content: 'sm:max-w-4xl lg:max-w-5xl aspect-[16/9]' }">
133141
<template #content>

docs/public/images/landing/hero-screenshot-dark.svg

Lines changed: 105 additions & 1 deletion
Loading

docs/public/images/landing/hero-screenshot-light.svg

Lines changed: 105 additions & 1 deletion
Loading

0 commit comments

Comments
 (0)