提交 e6c56712 编写于 作者: View Design's avatar View Design

add layout

上级 537870fb
<template> <template>
<div class="flex h-screen"> <div class="flex h-screen">
<div class="bg-gray-100 text-white w-64 flex flex-col"> <div class="bg-gray-100 dark:bg-gray-800 w-64 flex flex-col">
<div class="flex-grow">
<h1>GitBot</h1>
</div>
<div class="h-16 flex items-center justify-center">
<UButton
:icon="isDark ? 'i-heroicons-moon-20-solid' : 'i-heroicons-sun-20-solid'"
color="gray"
variant="ghost"
aria-label="Theme"
@click="isDark = !isDark"
/>
</div>
</div> </div>
<div class="flex-grow bg-white p-6"> <div class="bg-white dark:bg-gray-900 flex-grow p-6">
<slot /> <slot />
</div> </div>
</div> </div>
</template> </template>
<script setup lang="ts">
const colorMode = useColorMode()
const isDark = computed({
get () {
return colorMode.value === 'dark'
},
set () {
colorMode.preference = colorMode.value === 'dark' ? 'light' : 'dark'
}
})
</script>
\ No newline at end of file
<template> <template>
Home <div class="flex items-center justify-center h-full max-w-full">
<div class="max-w-screen-sm w-full">
<UTextarea
autoresize
placeholder="输入搜索内容..."
/>
</div>
</div>
</template> </template>
<script setup> <script setup>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册