init: basic structure

This commit is contained in:
YunYouJun
2022-04-13 22:41:22 +08:00
parent f77549b1cd
commit c355d51874
50 changed files with 7682 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
<template>
<div m="t-4" p="2" class="flex justify-center items-center" opacity="70" text="sm">
©&nbsp;<a href="https://github.com/YunYouJun/cook" target="_blank">Cook</a>
<div text="xs" m="x-1" i-ri-cloud-line />
<a href="https://www.yunyoujun.cn" target="_blank">云游君</a>
</div>
</template>

View File

@@ -0,0 +1,19 @@
<script setup lang="ts">
const props = defineProps<{
initial: number
}>()
const { count, inc, dec } = useCounter(props.initial)
</script>
<template>
<div>
{{ count }}
<button class="inc" @click="inc()">
+
</button>
<button class="dec" @click="dec()">
-
</button>
</div>
</template>

23
src/components/Menu.vue Normal file
View File

@@ -0,0 +1,23 @@
<script setup lang="ts">
import { toggleDark } from '~/composables'
</script>
<template>
<nav text-xl mt-6>
<RouterLink class="icon-btn mx-2" to="/" title="首页">
<div i-ri-home-2-line />
</RouterLink>
<button class="icon-btn mx-2 !outline-none" title="切换" @click="toggleDark()">
<div i="ri-sun-line dark:ri-moon-line" />
</button>
<RouterLink class="icon-btn mx-2" to="/about" title="关于">
<div i-ri-information-line />
</RouterLink>
<a class="icon-btn mx-2" rel="noreferrer" href="https://github.com/YunYouJun/cook" target="_blank" title="GitHub">
<div i-ri-github-line />
</a>
</nav>
</template>

7
src/components/README.md Normal file
View File

@@ -0,0 +1,7 @@
## Components
Components in this dir will be auto-registered and on-demand, powered by [`unplugin-vue-components`](https://github.com/antfu/unplugin-vue-components).
### Icons
You can use icons from almost any icon sets by the power of [Iconify](https://iconify.design/).