Skip to content

Commit b21f930

Browse files
committed
Add nuxt-demo
1 parent c6f03a7 commit b21f930

23 files changed

+34095
-0
lines changed

demo-nuxt/.gitignore

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### Node template
3+
# Logs
4+
/logs
5+
*.log
6+
npm-debug.log*
7+
yarn-debug.log*
8+
yarn-error.log*
9+
10+
# Runtime data
11+
pids
12+
*.pid
13+
*.seed
14+
*.pid.lock
15+
16+
# Directory for instrumented libs generated by jscoverage/JSCover
17+
lib-cov
18+
19+
# Coverage directory used by tools like istanbul
20+
coverage
21+
22+
# nyc test coverage
23+
.nyc_output
24+
25+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
26+
.grunt
27+
28+
# Bower dependency directory (https://bower.io/)
29+
bower_components
30+
31+
# node-waf configuration
32+
.lock-wscript
33+
34+
# Compiled binary addons (https://nodejs.org/api/addons.html)
35+
build/Release
36+
37+
# Dependency directories
38+
node_modules/
39+
jspm_packages/
40+
41+
# TypeScript v1 declaration files
42+
typings/
43+
44+
# Optional npm cache directory
45+
.npm
46+
47+
# Optional eslint cache
48+
.eslintcache
49+
50+
# Optional REPL history
51+
.node_repl_history
52+
53+
# Output of 'npm pack'
54+
*.tgz
55+
56+
# Yarn Integrity file
57+
.yarn-integrity
58+
59+
# dotenv environment variables file
60+
.env
61+
62+
# parcel-bundler cache (https://parceljs.org/)
63+
.cache
64+
65+
# next.js build output
66+
.next
67+
68+
# nuxt.js build output
69+
.nuxt
70+
71+
# Nuxt generate
72+
dist
73+
74+
# vuepress build output
75+
.vuepress/dist
76+
77+
# Serverless directories
78+
.serverless
79+
80+
# IDE / Editor
81+
.idea
82+
83+
# Service worker
84+
sw.*
85+
86+
# macOS
87+
.DS_Store
88+
89+
# Vim swap files
90+
*.swp

demo-nuxt/README.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# demo-nuxt
2+
3+
## Build Setup
4+
5+
```bash
6+
# install dependencies
7+
$ npm install
8+
9+
# serve with hot reload at localhost:3000
10+
$ npm run dev
11+
12+
# build for production and launch server
13+
$ npm run build
14+
$ npm run start
15+
16+
# generate static project
17+
$ npm run generate
18+
```
19+
20+
For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org).

demo-nuxt/assets/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# ASSETS
2+
3+
**This directory is not required, you can delete it if you don't want to use it.**
4+
5+
This directory contains your un-compiled assets such as LESS, SASS, or JavaScript.
6+
7+
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#webpacked).

demo-nuxt/assets/logo.png

6.69 KB
Loading

demo-nuxt/components/Logo.vue

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<template>
2+
<div>
3+
<img
4+
v-if="showAlt"
5+
:src="src"
6+
role="oisduhuo"
7+
alt="VueJS Logo"
8+
>
9+
<img
10+
v-else
11+
:src="src"
12+
role="oisduhuo"
13+
>
14+
</div>
15+
</template>
16+
17+
<script>
18+
export default {
19+
name: 'Logo',
20+
props: ['src', 'showAlt']
21+
}
22+
</script>

demo-nuxt/components/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# COMPONENTS
2+
3+
**This directory is not required, you can delete it if you don't want to use it.**
4+
5+
The components directory contains your Vue.js Components.
6+
7+
_Nuxt.js doesn't supercharge these components._

demo-nuxt/layouts/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# LAYOUTS
2+
3+
**This directory is not required, you can delete it if you don't want to use it.**
4+
5+
This directory contains your Application Layouts.
6+
7+
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/views#layouts).

demo-nuxt/layouts/default.vue

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<template>
2+
<div>
3+
<Nuxt />
4+
</div>
5+
</template>
6+
7+
<style>
8+
html {
9+
font-family:
10+
'Source Sans Pro',
11+
-apple-system,
12+
BlinkMacSystemFont,
13+
'Segoe UI',
14+
Roboto,
15+
'Helvetica Neue',
16+
Arial,
17+
sans-serif;
18+
font-size: 16px;
19+
word-spacing: 1px;
20+
-ms-text-size-adjust: 100%;
21+
-webkit-text-size-adjust: 100%;
22+
-moz-osx-font-smoothing: grayscale;
23+
-webkit-font-smoothing: antialiased;
24+
box-sizing: border-box;
25+
}
26+
27+
*,
28+
*::before,
29+
*::after {
30+
box-sizing: border-box;
31+
margin: 0;
32+
}
33+
34+
#__nuxt {
35+
font-family: 'Avenir', Helvetica, Arial, sans-serif;
36+
-webkit-font-smoothing: antialiased;
37+
-moz-osx-font-smoothing: grayscale;
38+
text-align: center;
39+
color: #2c3e50;
40+
max-width: 600px;
41+
margin: 0 auto;
42+
margin-top: 60px;
43+
}
44+
45+
h1, h2 {
46+
font-weight: normal;
47+
}
48+
49+
ul {
50+
list-style-type: none;
51+
padding: 0;
52+
}
53+
54+
li {
55+
display: inline-block;
56+
margin: 0 10px;
57+
}
58+
</style>

demo-nuxt/middleware/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# MIDDLEWARE
2+
3+
**This directory is not required, you can delete it if you don't want to use it.**
4+
5+
This directory contains your application middleware.
6+
Middleware let you define custom functions that can be run before rendering either a page or a group of pages.
7+
8+
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing#middleware).

demo-nuxt/nuxt.config.js

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
export default {
2+
// Global page headers (https://go.nuxtjs.dev/config-head)
3+
head: {
4+
title: 'demo-nuxt',
5+
meta: [
6+
{ charset: 'utf-8' },
7+
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
8+
{ hid: 'description', name: 'description', content: '' }
9+
],
10+
link: [
11+
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
12+
]
13+
},
14+
15+
// Global CSS (https://go.nuxtjs.dev/config-css)
16+
css: [
17+
],
18+
19+
// Plugins to run before rendering page (https://go.nuxtjs.dev/config-plugins)
20+
plugins: [
21+
'./plugins/vue-axe'
22+
],
23+
24+
// Auto import components (https://go.nuxtjs.dev/config-components)
25+
components: true,
26+
27+
// Modules for dev and build (recommended) (https://go.nuxtjs.dev/config-modules)
28+
buildModules: [
29+
],
30+
31+
// Modules (https://go.nuxtjs.dev/config-modules)
32+
modules: [
33+
],
34+
35+
// Build Configuration (https://go.nuxtjs.dev/config-build)
36+
build: {
37+
}
38+
}

0 commit comments

Comments
 (0)