Skip to content

Commit e32e614

Browse files
overflow-two (#51)
1 parent ce0c10e commit e32e614

3 files changed

Lines changed: 15 additions & 19 deletions

File tree

docs/app/assets/css/main.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
@import "tailwindcss";
22
@plugin "@tailwindcss/typography";
3+
34
@theme {
45
--font-display: "Satoshi", "sans-serif";
56
--font-heading: "Chillax", "sans-serif";
6-
77
--color-primary: var(--text-primary);
88
--color-secondary: var(--text-secondary);
99
--color-paragraph: var(--text-paragraph);
@@ -13,7 +13,7 @@
1313
width: 100vw;
1414
height: 100vh;
1515
overflow: hidden;
16-
16+
1717
--bg: #060606;
1818
--bg-gradient:radial-gradient(62.5% 62.87% at 40.23% 40.23%, rgba(219, 192, 245, 0.405) 0%, rgba(50, 114, 252, 0.07) 100%);
1919
--text-primary: #ffffff;
@@ -32,6 +32,10 @@ body {
3232
background: var(--bg);
3333
}
3434

35+
#__nuxt {
36+
height: 100%;
37+
}
38+
3539
h1,
3640
h2,
3741
h3,

docs/app/layouts/default.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const links = [
3636
</a>
3737
</div>
3838
<!-- Content -->
39-
<div class="w-full h-full overflow-y-auto px-6 py-3 md:px-16 md:py-6">
39+
<div class="w-full flex-1 min-h-0 px-6 py-3 md:px-16 md:py-6">
4040
<slot></slot>
4141
</div>
4242
</div>

docs/app/pages/docs/[...slug].vue

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
definePageMeta({ layout: "default" });
33
44
const route = useRoute();
5-
const router = useRouter();
65
76
const pageId = computed(() => `/docs/${route.path}`);
7+
88
const { data } = await useAsyncData(pageId, () =>
99
queryCollection("docs").path(route.path).first()
1010
);
11+
1112
const { data: docs } = await useAsyncData(() => queryCollection("docs").all());
1213
1314
const currentDoc = computed(() =>
@@ -16,11 +17,6 @@ const currentDoc = computed(() =>
1617
const mobileOpen = ref(false);
1718
const dropdownRef = ref<HTMLElement | null>(null);
1819
19-
function navigate(path: string) {
20-
router.push(path);
21-
mobileOpen.value = false;
22-
}
23-
2420
function onClickOutside(e: MouseEvent) {
2521
if (dropdownRef.value && !dropdownRef.value.contains(e.target as Node)) {
2622
mobileOpen.value = false;
@@ -119,16 +115,12 @@ onUnmounted(() => document.removeEventListener("mousedown", onClickOutside));
119115
</p>
120116
</div>
121117

122-
<div class="w-full h-full flex flex-col items-center overflow-y-auto">
123-
<div class="h-full w-full max-w-200">
124-
<div class="w-full">
125-
<div v-if="data">
126-
<article class="prose">
127-
<h1>{{ data.title }}</h1>
128-
<ContentRenderer :value="data" />
129-
</article>
130-
</div>
131-
</div>
118+
<div class="w-full min-h-0 flex flex-col items-center overflow-y-auto">
119+
<div class="w-full max-w-200">
120+
<article v-if="data" class="prose">
121+
<h1>{{ data.title }}</h1>
122+
<ContentRenderer :value="data" />
123+
</article>
132124
</div>
133125
</div>
134126
</div>

0 commit comments

Comments
 (0)