This repository has been archived by the owner on Dec 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
default.vue
179 lines (177 loc) · 6.48 KB
/
default.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<template>
<div>
<Header/>
<div class="drawer drawer-mobile">
<input id="main-menu" type="checkbox" class="drawer-toggle" v-model="showMainMenu" >
<main class="flex-grow block w-full pt-16 overflow-x-hidden bg-base-100 text-base-content drawer-content">
<div class="p-4 lg:p-10">
<Nuxt />
</div>
</main>
<div class="drawer-side">
<label for="main-menu" class="drawer-overlay"></label>
<aside class="flex flex-col justify-between pt-16 border-r border-base-200 bg-base-100 text-base-content w-80">
<div>
<Menu class="flex flex-col p-4 pb-10 compact">
<MenuItem class="mt-4 menu-title">
<span>
Docs
</span>
</MenuItem>
<MenuItem>
<NuxtLink v-on:click.native="showMainMenu = false" class="capitalize" to="/docs/install">
<Icon glyph="inbox-in" class="inline-block w-6 h-6 mr-2 stroke-current" />
install
</NuxtLink>
</MenuItem>
<MenuItem>
<NuxtLink v-on:click.native="showMainMenu = false" class="capitalize" to="/docs/use">
<Icon glyph="lightning-bolt" class="inline-block w-6 h-6 mr-2 stroke-current" />
use
</NuxtLink>
</MenuItem>
<MenuItem>
<NuxtLink v-on:click.native="showMainMenu = false" class="capitalize" to="/docs/config">
<Icon glyph="adjustments" class="inline-block w-6 h-6 mr-2 stroke-current" />
config
</NuxtLink>
</MenuItem>
<MenuItem>
<NuxtLink v-on:click.native="showMainMenu = false" class="capitalize" to="/docs/customize">
<Icon glyph="code" class="inline-block w-6 h-6 mr-2 stroke-current" />
customize components
</NuxtLink>
</MenuItem>
<MenuItem>
<NuxtLink v-on:click.native="showMainMenu = false" class="capitalize" to="/docs/default-themes">
<Icon glyph="color-swatch" class="inline-block w-6 h-6 mr-2 stroke-current" />
Default Themes
</NuxtLink>
</MenuItem>
<MenuItem>
<NuxtLink v-on:click.native="showMainMenu = false" class="capitalize" to="/docs/add-themes">
<Icon glyph="document-add" class="inline-block w-6 h-6 mr-2 stroke-current" />
Add Themes
</NuxtLink>
</MenuItem>
<MenuItem>
<NuxtLink v-on:click.native="showMainMenu = false" class="capitalize" to="/docs/features">
<Icon glyph="check" class="inline-block w-6 h-6 mr-2 stroke-current" />
Features
</NuxtLink>
</MenuItem>
<MenuItem>
<NuxtLink v-on:click.native="showMainMenu = false" class="capitalize" to="/docs/whats-included">
<Icon glyph="info" class="inline-block w-6 h-6 mr-2 stroke-current" />
What's included?
</NuxtLink>
</MenuItem>
<MenuItem class="mt-4 menu-title">
<span>
Core
</span>
</MenuItem>
<MenuItem>
<NuxtLink v-on:click.native="showMainMenu = false" class="capitalize" to="/core/colors">
<Icon glyph="color-swatch" class="inline-block w-6 h-6 mr-2 stroke-current" />
Colors
</NuxtLink>
</MenuItem>
<MenuItem>
<NuxtLink v-on:click.native="showMainMenu = false" class="capitalize" to="/core/layout">
<Icon glyph="template" class="inline-block w-6 h-6 mr-2 stroke-current" />
Layout
</NuxtLink>
</MenuItem>
<MenuItem>
<NuxtLink v-on:click.native="showMainMenu = false" class="capitalize" to="/core/typography">
<Icon glyph="text" class="inline-block w-6 h-6 mr-2 fill-current" />
Typography
</NuxtLink>
</MenuItem>
<MenuItem class="mt-4 menu-title">
<span>
Components
</span>
</MenuItem>
<MenuItem v-for="(item, itemindex) in componentPages" v-bind:key="item.itemindex" v-bind:class="{ 'disabled' : !item.path }">
<NuxtLink v-on:click.native="showMainMenu = false" class="capitalize" v-if="item.path" :to="item.path">
{{ item.name }}
</NuxtLink>
</MenuItem>
<MenuItem class="mt-4 menu-title">
<span>
Demos
</span>
</MenuItem>
<MenuItem v-for="(item, itemindex) in demoPages" v-bind:key="item.itemindex" v-bind:class="{ 'disabled' : !item.path }">
<NuxtLink v-on:click.native="showMainMenu = false" class="capitalize" v-if="item.path" :to="item.path">
{{ item.name }}
</NuxtLink>
</MenuItem>
</Menu>
</div>
</aside>
</div>
</div>
</div>
</template>
<script>
import {themeChange} from "theme-change"
export default {
props: {
classes: String
},
data() {
return {
docPages: [],
corePages: [],
componentPages: [],
demoPages: [],
showMainMenu: false,
}
},
created () {
this.$router.options.routes.forEach((routeOption) => {
if (routeOption.path.startsWith('/docs')) {
this.docPages.push({
name: routeOption.name.replace("docs-", ""),
path: routeOption.path,
})
}
})
this.$router.options.routes.forEach((routeOption) => {
if (routeOption.path.startsWith('/core')) {
this.corePages.push({
name: routeOption.name.replace("core-", ""),
path: routeOption.path,
})
}
})
this.$router.options.routes.forEach((routeOption) => {
if (routeOption.path.startsWith('/components')) {
this.componentPages.push({
name: routeOption.name.replace("components-", ""),
path: routeOption.path,
})
}
})
this.$router.options.routes.forEach((routeOption) => {
if (routeOption.path.startsWith('/demos')) {
this.demoPages.push({
name: routeOption.name.replace("demos-", ""),
path: routeOption.path,
})
}
})
},
computed: {
svgLogo() {
return require(`~/static/logo.svg?raw`)
}
},
mounted(){
themeChange(false)
},
}
</script>