Skip to content

Commit

Permalink
changement de layout
Browse files Browse the repository at this point in the history
  • Loading branch information
arkhaiel committed Sep 27, 2024
1 parent b34de97 commit 9814e5d
Show file tree
Hide file tree
Showing 6 changed files with 588 additions and 529 deletions.
10 changes: 10 additions & 0 deletions app/app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export default defineAppConfig({
ui: {
variables: {
header: {
height: '0'
}
}
}
})

69 changes: 21 additions & 48 deletions app/layouts/default.vue
Original file line number Diff line number Diff line change
@@ -1,56 +1,29 @@
<template>
<UDashboardLayout>
<UDashboardPanel
id="layout"
:width="250"
:resizable="{ min: 200, max: 300 }"
collapsible
>
<UDashboardNavbar>
<template #left>
<UDropdown :items="matieres" :popper="{ placement: 'bottom-start' }">
<UButton
label="Navigation"
trailing-icon="heroicons:chevron-down-20-solid"
variant="solid"
color="gray"
/>
</UDropdown>
</template>
<template #right>
<UColorModeButton />
</template>
</UDashboardNavbar>
<UDashboardSidebar>
<template #header>
<div class="px-8">
<UPage>
<template #left>
<UAside>
<div class="mb-2">
<UDropdown :items="matieres" :popper="{ placement: 'bottom-start' }">
<UButton
label="Navigation"
trailing-icon="heroicons:chevron-down-20-solid"
variant="solid"
color="gray"
/>
</UDropdown>
</div>
<UContentSearchButton label="Recherche..." />
</template>
<UNavigationTree :links="mapContentNavigation(path == '/' ? navigation ?? [] : localNav)" :multiple="path == '/' ? false : true" :default-open="false" />
<template #footer>
<UserDropdown />
</template>
</UDashboardSidebar>
</UDashboardPanel>
<UDashboardPanel grow>
<UDashboardNavbar>
<template #left>
<UBreadcrumb v-if="false" :links="breadcrumb">
<template #divider>
<span class="mx-2">/</span>
</template>
</UBreadcrumb>
</template>
</UDashboardNavbar>
<UDashboardPanelContent
class="px-4 prose prose-primary dark:prose-invert max-w-none first:prose-h2:mt-0"
>
<slot />
</UDashboardPanelContent>
</UDashboardPanel>
<UDivider class="py-4" />
<UNavigationTree :links="mapContentNavigation(path == '/' ? navigation ?? [] : localNav)" :multiple="path == '/' ? false : true" :default-open="false" />
</UAside>
</template>
<slot />
</UPage>
<ClientOnly>
<LazyUContentSearch :files="files" :navigation="navigation" />
</ClientOnly>
</UDashboardLayout>
</div>
</template>

<script lang="ts" setup>
Expand Down
31 changes: 18 additions & 13 deletions app/pages/[...slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@
</script>

<template>
<div>
<ContentDoc :head="false">
<template #not-found>
Oops... La page que vous cherchez n'existe pas.
</template>
<template #default="{ doc }">
<article class="xl:w-2/3 mx-auto mb-8">
<h1>{{ doc.title }}</h1>
<ContentRenderer :value="doc" />
</article>
</template>
</ContentDoc>
</div>
<ContentDoc :head="false">
<template #not-found>
Oops... La page que vous cherchez n'existe pas.
</template>
<template #default="{ doc }">
<UPage>
<UPageBody prose>
<article class="xl:w-2/3 mx-auto mb-8">
<h1>{{ doc.title }}</h1>
<ContentRenderer :value="doc" />
</article>
</UPageBody>
<template #right>
<UContentToc :links="doc.body.toc.links" />
</template>
</UPage>
</template>
</ContentDoc>
</template>
4 changes: 2 additions & 2 deletions app/pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div>
<UPageBody prose>
<ContentDoc />

<div class="flex flex-row flex-wrap w-2/3 mx-auto mt-16 gap-2">
Expand All @@ -10,7 +10,7 @@
:class="[periodesAccumulated.findIndex(el => el >= i) % 2 == 0 ? 'bg-blue-400' : 'bg-slate-700', i === semaine ? 'ring-2 ring-offset-2' : '']"
/>
</div>
</div>
</UPageBody>
</template>

<script lang="ts" setup>
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,30 @@
"@nuxt/content": "^2.13.2",
"@nuxt/eslint": "^0.5.7",
"@nuxt/image": "^1.8.0",
"@nuxt/scripts": "^0.9.2",
"@nuxt/ui-pro": "^1.4.2",
"@nuxthub/core": "^0.7.18",
"@nuxt/scripts": "^0.9.4",
"@nuxt/ui-pro": "^1.4.3",
"@nuxthub/core": "^0.7.20",
"@paralleldrive/cuid2": "^2.2.2",
"@pinia/nuxt": "^0.5.4",
"drizzle-orm": "^0.33.0",
"fast-xml-parser": "^4.5.0",
"marked": "^14.1.2",
"marked-katex-extension": "^5.1.2",
"nuxt": "^3.13.2",
"nuxt-auth-utils": "^0.3.8",
"nuxt-auth-utils": "^0.3.9",
"pinia": "^2.2.2",
"rehype-katex": "^7.0.1",
"remark-math": "^6.0.0",
"shiki": "^1.17.7",
"vue": "^3.5.6",
"shiki": "^1.20.0",
"vue": "^3.5.9",
"vue-router": "^4.4.5"
},
"devDependencies": {
"@nuxt/eslint-config": "^0.5.7",
"drizzle-kit": "^0.24.2",
"eslint": "^9.10.0",
"eslint": "^9.11.1",
"vue-tsc": "^2.1.6",
"wrangler": "^3.78.2"
"wrangler": "^3.78.10"
},
"packageManager": "[email protected]"
}
Loading

0 comments on commit 9814e5d

Please sign in to comment.