|
| 1 | +<script setup lang="ts"> |
| 2 | +const isMobileMenuOpen = ref(false); |
| 3 | +const { page } = useContent(); |
| 4 | +
|
| 5 | +const { storefrontUi } = useRuntimeConfig().public; |
| 6 | +</script> |
| 7 | +<template> |
| 8 | + <div> |
| 9 | + <div |
| 10 | + v-if="storefrontUi" |
| 11 | + class="w-full bg-secondary-500 px-6 py-2 flex justify-between items-center" |
| 12 | + > |
| 13 | + <Icon |
| 14 | + name="IconVsfFull" |
| 15 | + width="10rem" |
| 16 | + height="2.5rem" |
| 17 | + class="[&>*]:!fill-white" |
| 18 | + /> |
| 19 | + <NuxtLink |
| 20 | + to="https://qwik.builder.io/" |
| 21 | + class="font-xl flex items-center text-sm group text-white" |
| 22 | + > |
| 23 | + <svg |
| 24 | + viewBox="0 0 500 506" |
| 25 | + fill="none" |
| 26 | + xmlns="http://www.w3.org/2000/svg" |
| 27 | + class="w-8 h-8 my-2 mr-2" |
| 28 | + > |
| 29 | + <path |
| 30 | + fill-rule="evenodd" |
| 31 | + clip-rule="evenodd" |
| 32 | + d="M250 449.707L431.102 505.511L343.037 423.652L129.174 224.859L179.178 174.86L156.157 16.117L8.34822 193.702C-2.78296 212.982 -2.78273 236.736 8.34883 256.016L102.191 418.551C113.323 437.831 133.894 449.707 156.156 449.707L250 449.707Z" |
| 33 | + fill="#18B6F6" |
| 34 | + /> |
| 35 | + <path |
| 36 | + d="M343.843 0L156.157 1.74069e-05C133.894 1.94717e-05 113.323 11.8771 102.192 31.1573L8.34822 193.702L156.157 16.117L370.826 224.859L330.828 264.86L343.037 423.652L431.102 505.511C436.18 507.075 440.635 501.755 438.204 497.031L397.809 418.551L491.651 256.016C502.783 236.736 502.783 212.982 491.652 193.702L397.808 31.1572C386.677 11.8771 366.106 -2.06475e-06 343.843 0Z" |
| 37 | + fill="#AC7EF4" |
| 38 | + /> |
| 39 | + <path |
| 40 | + d="M370.826 224.859L156.157 16.117L179.178 174.86L129.174 224.859L343.037 423.652L330.828 264.86L370.826 224.859Z" |
| 41 | + fill="white" |
| 42 | + /> |
| 43 | + </svg> |
| 44 | + <span class="text-xl font-bold">Qwik</span> |
| 45 | + </NuxtLink> |
| 46 | + </div> |
| 47 | + |
| 48 | + <div |
| 49 | + class="mx-auto min-h-screen text-neutral-900 dark:text-[var(--tw-prose-body)] antialiased relative flex mr-0" |
| 50 | + > |
| 51 | + <AppSidebar |
| 52 | + class="max-lg:fixed lg:relative grow-0 max-lg:top-0 max-lg:left-0 max-lg:z-[100] max-lg:h-full bg-white dark:bg-neutral-950 min-h-screen" |
| 53 | + :class="{ |
| 54 | + 'max-lg:hidden': !isMobileMenuOpen, |
| 55 | + }" |
| 56 | + :mobile-menu-open="isMobileMenuOpen" |
| 57 | + @close="isMobileMenuOpen = false" |
| 58 | + /> |
| 59 | + |
| 60 | + <div |
| 61 | + class="flex flex-col items-center flex-1 border-b-2 min-w-0 max-w-full" |
| 62 | + > |
| 63 | + <AppHeader class="sticky top-0 bg-white dark:bg-neutral-950 z-50" /> |
| 64 | + |
| 65 | + <div |
| 66 | + class="flex items-center lg:hidden text-left border-b w-full px-6 py-2 text-sm gap-x-2 sticky top-[57px] bg-white dark:bg-neutral-950 z-40" |
| 67 | + > |
| 68 | + <button @click="isMobileMenuOpen = true"> |
| 69 | + <Icon name="ri:menu-2-fill" class="text-lg" /> |
| 70 | + </button> |
| 71 | + <span> |
| 72 | + {{ page?.title }} |
| 73 | + </span> |
| 74 | + </div> |
| 75 | + <div |
| 76 | + class="flex justify-center px-6 lg:px-12 py-4 2xl:max-w-7xl w-full mx-auto shrink-0 min-h-screen min-w-0" |
| 77 | + > |
| 78 | + <slot /> |
| 79 | + </div> |
| 80 | + <ClientOnly> |
| 81 | + <AppEdit /> |
| 82 | + </ClientOnly> |
| 83 | + <AppFooter /> |
| 84 | + </div> |
| 85 | + </div> |
| 86 | + </div> |
| 87 | +</template> |
| 88 | + |
| 89 | +<style> |
| 90 | +.dark { |
| 91 | + @apply bg-neutral-950; |
| 92 | +} |
| 93 | +
|
| 94 | +.document-driven-page { |
| 95 | + @apply w-full; |
| 96 | +} |
| 97 | +</style> |
0 commit comments