Skip to content

Commit 3719f83

Browse files
authored
docs: fix homepage ButtonGroup mobile rounded border (#71)
1 parent 1b79ab6 commit 3719f83

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

docs/pages/index.vue

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<script setup lang="ts">
22
import { useScriptsRegistry } from '~/composables/useScriptsRegistry'
3+
import { breakpointsTailwind, useBreakpoints } from '@vueuse/core'
34
45
const registry = useScriptsRegistry()
6+
const breakpoints = useBreakpoints(breakpointsTailwind)
57
68
useSeoMeta({
79
title: 'Third-Party Scripts Meets Nuxt DX.',
@@ -91,6 +93,8 @@ const features = [
9193
},
9294
]
9395
96+
const btnGroupOrientation = computed(() => breakpoints.smaller('sm').value ? 'vertical' : 'horizontal')
97+
9498
const benchmarks = {
9599
googleMaps: {
96100
logo: registry.find(s => s.import.name === 'useScriptGoogleMaps').logo,
@@ -211,7 +215,7 @@ function timesFaster(nuxt: number, iframe: number) {
211215
</ul>
212216
</ULandingSection>
213217

214-
<div class="py-6 sm:py-20 gap-20 mb-12 flex flex-col xl:flex-row items-center max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
218+
<UContainer class="py-6 sm:py-20 gap-20 mb-12 flex flex-col xl:flex-row items-center">
215219
<div class="max-w-lg">
216220
<h2 class="text-xl xl:text-4xl font-bold flex items-center gap-4 mb-4">
217221
<UIcon name="i-ph-speedometer-duotone" class="h-12 w-12 shrink-0 text-primary" />
@@ -226,7 +230,7 @@ function timesFaster(nuxt: number, iframe: number) {
226230
<p class="text-gray-500 dark:text-gray-400">
227231
<span class="opacity-50 text-sm">*Benchmarks are from pagespeed.web.dev Mobile report running with variability, they are not accurate.</span>
228232
</p>
229-
<UButtonGroup class="mt-10 flex flex-col sm:flex-row">
233+
<UButtonGroup class="mt-10 flex" :orientation="btnGroupOrientation">
230234
<UButton :variant="webVital === 'fcp' ? 'solid' : 'soft'" :active="webVital === 'fcp'" @click="webVital = 'fcp'">
231235
First Contentful Paint
232236
</UButton>
@@ -272,7 +276,7 @@ function timesFaster(nuxt: number, iframe: number) {
272276
</div>
273277
</div>
274278
</div>
275-
</div>
279+
</UContainer>
276280
</div>
277281
</template>
278282

0 commit comments

Comments
 (0)