Update Nav
This commit is contained in:
parent
5ee3d9fa4b
commit
3d26633fd2
1
.github/FUNDING.yml
vendored
1
.github/FUNDING.yml
vendored
@ -1 +0,0 @@
|
|||||||
github: antfu
|
|
2
src/components.d.ts
vendored
2
src/components.d.ts
vendored
@ -9,6 +9,8 @@ declare module '@vue/runtime-core' {
|
|||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
ElMenu: typeof import('element-plus/es')['ElMenu']
|
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||||
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
||||||
|
Footer: typeof import('./components/Footer.vue')['default']
|
||||||
|
Nav: typeof import('./components/Nav.vue')['default']
|
||||||
README: typeof import('./components/README.md')['default']
|
README: typeof import('./components/README.md')['default']
|
||||||
RouterLink: typeof import('vue-router')['RouterLink']
|
RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
RouterView: typeof import('vue-router')['RouterView']
|
RouterView: typeof import('vue-router')['RouterView']
|
||||||
|
@ -9,7 +9,7 @@ const toggleLocales = () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<nav text-xl mt-6>
|
<nav class="text-xl m-6 flex justify-center">
|
||||||
<RouterLink class="icon-btn mx-2" to="/" :title="t('button.home')">
|
<RouterLink class="icon-btn mx-2" to="/" :title="t('button.home')">
|
||||||
<div i-carbon-campsite />
|
<div i-carbon-campsite />
|
||||||
</RouterLink>
|
</RouterLink>
|
23
src/components/Nav.vue
Normal file
23
src/components/Nav.vue
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<template>
|
||||||
|
<nav>
|
||||||
|
<el-menu mode="horizontal" :ellipsis="false" :default-active="$route.path" class="p-l p-r" router>
|
||||||
|
<!-- <nuxt-link to="/"> -->
|
||||||
|
<el-menu-item>
|
||||||
|
合肥市南园学校19预科2班
|
||||||
|
</el-menu-item>
|
||||||
|
<div class="grow" />
|
||||||
|
<el-menu-item index="/">
|
||||||
|
主页
|
||||||
|
</el-menu-item>
|
||||||
|
<!-- </nuxt-link> -->
|
||||||
|
|
||||||
|
<!-- <div class="flex-grow" /> -->
|
||||||
|
|
||||||
|
<!-- <nuxt-link v-for="page in pages" :to="page.path">
|
||||||
|
<el-menu-item :index="page.path">
|
||||||
|
{{ page.name }}
|
||||||
|
</el-menu-item>
|
||||||
|
</nuxt-link> -->
|
||||||
|
</el-menu>
|
||||||
|
</nav>
|
||||||
|
</template>
|
@ -1,10 +0,0 @@
|
|||||||
## 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/).
|
|
||||||
|
|
||||||
It will only bundle the icons you use. Check out [`unplugin-icons`](https://github.com/antfu/unplugin-icons) for more details.
|
|
@ -22,31 +22,9 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<nav>
|
<main class="text-gray-700 dark:text-gray-200 min-h-screen flex flex-col">
|
||||||
<el-menu
|
<Nav />
|
||||||
mode="horizontal"
|
|
||||||
:ellipsis="false"
|
|
||||||
:default-active="$route.path"
|
|
||||||
router
|
|
||||||
>
|
|
||||||
<!-- <nuxt-link to="/"> -->
|
|
||||||
<el-menu-item index="/">
|
|
||||||
主页
|
|
||||||
</el-menu-item>
|
|
||||||
<!-- </nuxt-link> -->
|
|
||||||
|
|
||||||
<!-- <div class="flex-grow" /> -->
|
|
||||||
|
|
||||||
<!-- <nuxt-link v-for="page in pages" :to="page.path">
|
|
||||||
<el-menu-item :index="page.path">
|
|
||||||
{{ page.name }}
|
|
||||||
</el-menu-item>
|
|
||||||
</nuxt-link> -->
|
|
||||||
</el-menu>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<main class="px-4 py-10 text-center text-gray-700 dark:text-gray-200 min-h-screen flex flex-col items-center ">
|
|
||||||
<RouterView />
|
<RouterView />
|
||||||
<TheFooter />
|
<Footer />
|
||||||
</main>
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
@ -8,6 +8,7 @@ import generatedRoutes from '~pages'
|
|||||||
import '@unocss/reset/tailwind.css'
|
import '@unocss/reset/tailwind.css'
|
||||||
import './styles/main.css'
|
import './styles/main.css'
|
||||||
import 'uno.css'
|
import 'uno.css'
|
||||||
|
import 'element-plus/theme-chalk/dark/css-vars.css'
|
||||||
|
|
||||||
const routes = setupLayouts(generatedRoutes)
|
const routes = setupLayouts(generatedRoutes)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user