Skip to content

Commit 9beebd2

Browse files
committed
init and implement 09-nuxt-server-side-rendering
1 parent b169397 commit 9beebd2

File tree

22 files changed

+480
-1
lines changed

22 files changed

+480
-1
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ indent_size = 2
77
end_of_line = lf
88
insert_final_newline = true
99
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@ dist/
1010
*.njsproj
1111
*.sln
1212
*.lock
13+
.yarnclean
14+
15+
# Nuxt build
16+
.nuxt

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ before_script:
2525
script:
2626
- export ROOT=$PWD
2727
- >
28-
for path in 08-vuex-map-getters-and-map-actions \
28+
for path in 09-nuxt-server-side-rendering \
29+
08-vuex-map-getters-and-map-actions \
2930
07-vue-material \
3031
06-materialize-css \
3132
05-vuex-contact-list \
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module.exports = {
2+
root: true,
3+
parser: 'babel-eslint',
4+
env: {
5+
browser: true,
6+
node: true
7+
},
8+
extends: 'standard',
9+
// required to lint *.vue files
10+
plugins: [
11+
'html'
12+
],
13+
// add your custom rules here
14+
rules: {
15+
'semi': 0,
16+
'comma-dangle': 0,
17+
'space-before-function-paren': 0,
18+
'yoda': 0,
19+
},
20+
globals: {}
21+
};
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# 09-nuxt-server-side-rendering
2+
3+
## build run and deploy
4+
5+
``` bash
6+
yarn dev
7+
yarn lint
8+
yarn build
9+
yarn start
10+
yarn genetrate
11+
yarn predeploy
12+
yarn deploy
13+
```
14+
15+
**auto generated part**:
16+
17+
> Nuxt.js server-side rendenring with Vue.js
18+
19+
## Build Setup
20+
21+
``` bash
22+
# install dependencies
23+
$ npm install # Or yarn install
24+
25+
# serve with hot reload at localhost:3000
26+
$ npm run dev
27+
28+
# build for production and launch server
29+
$ npm run build
30+
$ npm start
31+
32+
# generate static project
33+
$ npm run generate
34+
```
35+
36+
For detailed explanation on how things work, checkout the [Nuxt.js docs](https://github.com/nuxt/nuxt.js).
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# ASSETS
2+
3+
This directory contains your un-compiled assets such as LESS, SASS, or JavaScript.
4+
5+
More information about the usage of this directory in the documentation:
6+
https://nuxtjs.org/guide/assets#webpacked
7+
8+
**This directory is not required, you can delete it if you don't want to use it.**
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<template>
2+
<div class="links">
3+
<nuxt-link to="/">
4+
<div class="button--grey">Home</div>
5+
</nuxt-link>
6+
<nuxt-link to="/services">
7+
<div class="button--grey">Services</div>
8+
</nuxt-link>
9+
<nuxt-link to="/about">
10+
<div class="button--grey">About</div>
11+
</nuxt-link>
12+
</div>
13+
</template>
14+
15+
<script>
16+
export default {
17+
name: 'links',
18+
};
19+
</script>
20+
21+
<style scoped="">
22+
ul {
23+
display: inline;
24+
list-style-type: none;
25+
margin: 0;
26+
padding: 0;
27+
min-width: 60%;
28+
}
29+
</style>
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
<template>
2+
<div class="VueToNuxtLogo">
3+
<div class="Triangle Triangle--two"></div>
4+
<div class="Triangle Triangle--one"></div>
5+
<div class="Triangle Triangle--three"></div>
6+
<div class="Triangle Triangle--four"></div>
7+
</div>
8+
</template>
9+
10+
<style>
11+
.VueToNuxtLogo {
12+
display: inline-block;
13+
animation: turn 2s linear forwards 1s;
14+
transform: rotateX(180deg);
15+
position: relative;
16+
overflow: hidden;
17+
height: 180px;
18+
width: 245px;
19+
}
20+
21+
.Triangle {
22+
position: absolute;
23+
top: 0;
24+
left: 0;
25+
width: 0;
26+
height: 0;
27+
}
28+
29+
.Triangle--one {
30+
border-left: 105px solid transparent;
31+
border-right: 105px solid transparent;
32+
border-bottom: 180px solid #41B883;
33+
}
34+
35+
.Triangle--two {
36+
top: 30px;
37+
left: 35px;
38+
animation: goright 0.5s linear forwards 3.5s;
39+
border-left: 87.5px solid transparent;
40+
border-right: 87.5px solid transparent;
41+
border-bottom: 150px solid #3B8070;
42+
}
43+
44+
.Triangle--three {
45+
top: 60px;
46+
left: 35px;
47+
animation: goright 0.5s linear forwards 3.5s;
48+
border-left: 70px solid transparent;
49+
border-right: 70px solid transparent;
50+
border-bottom: 120px solid #35495E;
51+
}
52+
53+
.Triangle--four {
54+
top: 120px;
55+
left: 70px;
56+
animation: godown 0.5s linear forwards 3s;
57+
border-left: 35px solid transparent;
58+
border-right: 35px solid transparent;
59+
border-bottom: 60px solid #fff;
60+
}
61+
62+
@keyframes turn {
63+
100% {
64+
transform: rotateX(0deg);
65+
}
66+
}
67+
68+
@keyframes godown {
69+
100% {
70+
top: 180px;
71+
}
72+
}
73+
74+
@keyframes goright {
75+
100% {
76+
left: 70px;
77+
}
78+
}
79+
</style>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# COMPONENTS
2+
3+
The components directory contains your Vue.js Components.
4+
Nuxt.js doesn't supercharge these components.
5+
6+
**This directory is not required, you can delete it if you don't want to use it.**
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# LAYOUTS
2+
3+
This directory contains your Application Layouts.
4+
5+
More information about the usage of this directory in the documentation:
6+
https://nuxtjs.org/guide/views#layouts
7+
8+
**This directory is not required, you can delete it if you don't want to use it.**

0 commit comments

Comments
 (0)