Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit b7d2db9

Browse files
atinuxclarkdo
andauthored
feat: update design (#792)
Co-authored-by: Xin Du (Clark) <clark.duxin@gmail.com>
1 parent 3cd1ff5 commit b7d2db9

File tree

25 files changed

+224
-786
lines changed

25 files changed

+224
-786
lines changed

packages/cna-template/template/README.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,53 @@ $ <%= pmRun %> start
1717
$ <%= pmRun %> generate
1818
```
1919

20-
For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org).
20+
For detailed explanation on how things work, check out the [documentation](https://nuxtjs.org).
21+
22+
## Special Directories
23+
24+
You can create the following extra directories, some of which have special behaviors. Only `pages` is required; you can delete them if you don't want to use their functionality.
25+
26+
### `assets`
27+
28+
The assets directory contains your uncompiled assets such as Stylus or Sass files, images, or fonts.
29+
30+
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/assets).
31+
32+
### `components`
33+
34+
The components directory contains your Vue.js components. Components make up the different parts of your page and can be reused and imported into your pages, layouts and even other components.
35+
36+
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/components).
37+
38+
### `layouts`
39+
40+
Layouts are a great help when you want to change the look and feel of your Nuxt app, whether you want to include a sidebar or have distinct layouts for mobile and desktop.
41+
42+
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/layouts).
43+
44+
45+
### `pages`
46+
47+
This directory contains your application views and routes. Nuxt will read all the `*.vue` files inside this directory and setup Vue Router automatically.
48+
49+
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/get-started/routing).
50+
51+
### `plugins`
52+
53+
The plugins directory contains JavaScript plugins that you want to run before instantiating the root Vue.js Application. This is the place to add Vue plugins and to inject functions or constants. Every time you need to use `Vue.use()`, you should create a file in `plugins/` and add its path to plugins in `nuxt.config.js`.
54+
55+
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/plugins).
56+
57+
### `static`
58+
59+
This directory contains your static files. Each file inside this directory is mapped to `/`.
60+
61+
Example: `/static/robots.txt` is mapped as `/robots.txt`.
62+
63+
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/static).
64+
65+
### `store`
66+
67+
This directory contains your Vuex store files. Creating a file in this directory automatically activates Vuex.
68+
69+
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/store).
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import test from 'ava'
22
import { mount } from '@vue/test-utils'
3-
import Logo from '@/components/Logo.vue'
3+
import NuxtLogo from '@/components/NuxtLogo.vue'
44

55
test('is a Vue instance', (t) => {
6-
const wrapper = mount(Logo)
6+
const wrapper = mount(NuxtLogo)
77
t.truthy(wrapper.vm)
88
})

packages/cna-template/template/frameworks/framevuerk/pages/index.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
<div class="fv-margin-bottom fv-hidden-xs fv-hidden-sm" />
7070
<div class="content__header fv-margin-bottom fv-padding">
7171
<div class="fv-padding fv-margin-bottom fv-text-center">
72-
<Logo />
72+
<NuxtLogo />
7373
</div>
7474
<p>
7575
<b>Framevuerk</b> is a Fast, Responsive, Without Dependencies, Both Direction Support and Configurable UI Framework based on <b>Vue.js</b>.
@@ -134,12 +134,10 @@
134134
</template>
135135

136136
<script>
137-
import Logo from '~/components/Logo.vue'
138137
import FramevuerkLogo from '~/components/FramevuerkLogo.vue'
139138
140139
export default {
141140
components: {
142-
Logo,
143141
FramevuerkLogo
144142
},
145143
data () {
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { mount } from '@vue/test-utils'
2-
import Logo from '@/components/Logo.vue'
2+
import NuxtLogo from '@/components/NuxtLogo.vue'
33

4-
describe('Logo', () => {
4+
describe('NuxtLogo', () => {
55
test('is a Vue instance', () => {
6-
const wrapper = mount(Logo)
6+
const wrapper = mount(NuxtLogo)
77
expect(wrapper.vm).toBeTruthy()
88
})
99
})

packages/cna-template/template/frameworks/vant/pages/index.vue

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div class="container">
33
<div>
4-
<logo />
4+
<NuxtLogo />
55
<h1 class="title">
66
Welcome to the Vant + Nuxt.js template
77
</h1>
@@ -20,15 +20,6 @@
2020
</div>
2121
</template>
2222

23-
<script>
24-
import Logo from '~/components/Logo.vue'
25-
export default {
26-
components: {
27-
Logo
28-
}
29-
}
30-
</script>
31-
3223
<style>
3324
.container {
3425
margin: 0 auto;

packages/cna-template/template/frameworks/view-ui/pages/index.vue

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div class="container">
33
<div>
4-
<logo />
4+
<NuxtLogo />
55
<h1 class="title">
66
<%= name %>
77
</h1>
@@ -23,15 +23,6 @@
2323
</div>
2424
</template>
2525

26-
<script>
27-
import Logo from '~/components/Logo.vue'
28-
export default {
29-
components: {
30-
Logo
31-
}
32-
}
33-
</script>
34-
3526
<style>
3627
.container {
3728
margin: 0 auto;

packages/cna-template/template/frameworks/vuetify/components/Logo.vue

Lines changed: 0 additions & 79 deletions
This file was deleted.

packages/cna-template/template/frameworks/vuetify/pages/index.vue

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<template>
22
<v-row justify="center" align="center">
33
<v-col cols="12" sm="8" md="6">
4-
<div class="text-center">
5-
<logo />
6-
<vuetify-logo />
7-
</div>
4+
<v-card class="logo py-4 d-flex justify-center">
5+
<NuxtLogo />
6+
<VuetifyLogo />
7+
</v-card>
88
<v-card>
99
<v-card-title class="headline">
1010
Welcome to the Vuetify + Nuxt.js template
@@ -75,15 +75,3 @@
7575
</v-col>
7676
</v-row>
7777
</template>
78-
79-
<script>
80-
import Logo from '~/components/Logo.vue'
81-
import VuetifyLogo from '~/components/VuetifyLogo.vue'
82-
83-
export default {
84-
components: {
85-
Logo,
86-
VuetifyLogo
87-
}
88-
}
89-
</script>

packages/cna-template/template/nuxt/assets/README.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/cna-template/template/nuxt/components/Logo.vue

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)