Skip to content

Commit 174caac

Browse files
committed
👕 ref: add custom container layout
1 parent f63fdf7 commit 174caac

File tree

3 files changed

+26
-17
lines changed

3 files changed

+26
-17
lines changed

layouts/container.vue

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<template>
2+
<div>
3+
<NavBar />
4+
5+
<div
6+
class="mx-auto mt-4 max-w-7xl space-y-4 px-4 xs:px-8 sm:px-8 lg:px-16 pb-16 w-2/3"
7+
>
8+
<slot />
9+
</div>
10+
</div>
11+
</template>

pages/car/[name]-[id].vue

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
const route = useRoute();
33
44
useHead({ title: toTitleCase(route.params.name) });
5+
6+
definePageMeta({
7+
layout: "container",
8+
});
59
</script>
610

711
<template>
812
<div>
9-
<div
10-
class="mx-auto mt-4 max-w-7xl space-y-4 px-4 xs:px-8 sm:px-8 lg:px-16 pb-16 w-2/3"
11-
>
12-
<CarDetailHero />
13-
<CarDetailAttributes />
14-
<CarDetailDescription />
15-
<CarDetailContact />
16-
</div>
13+
<CarDetailHero />
14+
<CarDetailAttributes />
15+
<CarDetailDescription />
16+
<CarDetailContact />
1717
</div>
1818
</template>

pages/city/[city]/car.vue

+7-9
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,15 @@ const cityTitle = toTitleCase(route.params.city);
55
useHead({
66
title: `${make ? toTitleCase(make) : "Cars"} in ${cityTitle}`,
77
});
8+
9+
definePageMeta({
10+
layout: "container",
11+
});
812
</script>
913

1014
<template>
11-
<div>
12-
<div
13-
class="mx-auto mt-4 max-w-7xl space-y-4 px-4 xs:px-8 sm:px-8 lg:px-16 pb-16 w-2/3"
14-
>
15-
<div class="mt-32 flex">
16-
<CarSideBar />
17-
<NuxtPage />
18-
</div>
19-
</div>
15+
<div class="mt-32 flex">
16+
<CarSideBar />
17+
<NuxtPage />
2018
</div>
2119
</template>

0 commit comments

Comments
 (0)