Skip to content

Commit 39d8181

Browse files
committed
add setup2 back in
1 parent 16233d6 commit 39d8181

File tree

20 files changed

+8300
-0
lines changed

20 files changed

+8300
-0
lines changed

setup2/.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

setup2/.gitignore

Lines changed: 90 additions & 0 deletions
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

setup2/README.md

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

setup2/assets/README.md

Lines changed: 7 additions & 0 deletions
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).

setup2/components/AppChild.vue

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<template>
2+
<div>
3+
<div class="item">
4+
<h2>{{ item }}</h2>
5+
<img :src="url" width="235" height="300" />
6+
<div class="quantity">
7+
<button class="inc" @click="counter > 0 ? counter -= 1 : 0">-</button>
8+
<span class="quant-text">Quantity: {{ counter }}</span>
9+
<button class="inc" @click="counter += 1">+</button>
10+
</div>
11+
<button class="submit">Submit</button>
12+
</div>
13+
</div>
14+
</template>
15+
16+
17+
<script>
18+
export default {
19+
data() {
20+
return {
21+
counter: 0,
22+
};
23+
},
24+
props: ["item", "url"],
25+
};
26+
</script>
27+
28+
<style scoped>
29+
</style>

setup2/components/AppMenu.vue

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<template>
2+
<div>
3+
<header>
4+
<nuxt-link exact to="/" class="logo">
5+
<svg class="menusvg stamp" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
6+
<path
7+
fill="white"
8+
d="M99.2 86.9l-6.7-58.3c-.1-.6-.6-1.1-1.2-1.1h-6.2V12.9c0-.7-.6-1.2-1.2-1.2H64.2V5.5c0-.7-.6-1.2-1.2-1.2H37c-.7 0-1.2.6-1.2 1.2v6.2H16.2c-.7 0-1.2.6-1.2 1.2v14.6H8.7c-.6 0-1.2.5-1.2 1.1L.8 86.9c0 .4.1.7.3 1s.6.4.9.4h17.4l-.7 6c0 .4.1.7.3 1s.6.4.9.4h60c.4 0 .7-.2.9-.4s.3-.6.3-1l-.7-6H98c.4 0 .7-.2.9-.4s.4-.6.3-1zm-35-72.7h18.3v13.3h-9l-.4-3.1c-.1-.6-.6-1.1-1.2-1.1h-7.8l.1-9.1zm-26-7.4h23.5v16.5h-2.5V10.5c0-.7-.6-1.2-1.2-1.2H42c-.7 0-1.2.6-1.2 1.2v12.8h-2.5l-.1-16.5zm18.6 5v11.5H43.2V11.8h13.6zm-39.4 2.4h18.3v9.1H28c-.6 0-1.2.5-1.2 1.1l-.4 3.1h-9V14.2zm2.3 71.6H3.4L9.8 30h16.3l-6.4 55.8zm1.7 7.4l7.7-67.5h41.8l7.7 67.5H21.4zm58.9-7.4L73.9 30h16.3l6.4 55.8H80.3z"
9+
/>
10+
</svg>
11+
</nuxt-link>
12+
<ul>
13+
<li v-for="item in menuitems" :key="item.item">
14+
<a href="#">{{ item }}</a>
15+
</li>
16+
</ul>
17+
<nuxt-link to="/cart">
18+
<svg class="menusvg cart" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
19+
<path
20+
fill="white"
21+
d="M29.5 61h47.27c2.8 0 5.23-2.62 5.23-5.6V36.03l-55-7.46v-7.16l-9-3.75c-.77-.32-1.65.04-1.97.8-.32.78.04 1.65.8 1.97L24 23.42v44.4c0 2.8 2.52 5.18 5.5 5.18h3.27c-.66 1-1.05 2.2-1.05 3.5 0 3.55 2.9 6.43 6.44 6.43 3.55 0 6.43-2.88 6.43-6.43 0-1.3-.4-2.5-1.05-3.5H70.1c-.67 1-1.05 2.2-1.05 3.5 0 3.55 2.88 6.43 6.43 6.43s6.44-2.88 6.44-6.43c0-3.38-2.6-6.15-5.92-6.4V70H29.5c-1.34 0-2.5-1-2.5-2.17v-7.5c.76.42 1.6.67 2.5.67zm8.66 18.93c-1.9 0-3.44-1.54-3.44-3.43 0-1.9 1.54-3.44 3.44-3.44s3.43 1.54 3.43 3.44-1.55 3.43-3.44 3.43zm40.76-3.43c0 1.9-1.54 3.43-3.44 3.43s-3.43-1.54-3.43-3.43c0-1.9 1.54-3.44 3.43-3.44 1.9 0 3.44 1.54 3.44 3.44zM27 31.6l52 7.06V55.4c0 1.3-1.1 2.6-2.23 2.6H29.5c-1.22 0-2.5-1.34-2.5-2.6V31.6z"
22+
/>
23+
</svg>
24+
</nuxt-link>
25+
</header>
26+
</div>
27+
</template>
28+
29+
30+
<script>
31+
export default {
32+
data() {
33+
return {
34+
menuitems: ["shirts", "shorts", "accesories", "outerwear"],
35+
};
36+
},
37+
};
38+
</script>
39+
40+
<style scoped>
41+
header {
42+
background: #222;
43+
padding: 5px 10px 10px;
44+
width: 100vw;
45+
color: white;
46+
position: fixed;
47+
display: -webkit-box;
48+
display: -ms-flexbox;
49+
display: flex;
50+
-ms-flex-line-pack: center;
51+
align-content: center;
52+
-webkit-box-pack: center;
53+
-ms-flex-pack: center;
54+
justify-content: center;
55+
}
56+
header ul {
57+
padding-left: 0;
58+
}
59+
header a {
60+
color: white;
61+
text-decoration: none;
62+
padding: 0 10px;
63+
-webkit-transition: all 0.2s ease;
64+
transition: all 0.2s ease;
65+
}
66+
header a:hover {
67+
color: #e6534b;
68+
}
69+
.stamp {
70+
width: 30px;
71+
height: 30px;
72+
margin: 10px;
73+
float: left;
74+
}
75+
.cart {
76+
width: 40px;
77+
height: 40px;
78+
margin: 5px;
79+
}
80+
</style>

setup2/components/README.md

Lines changed: 7 additions & 0 deletions
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._

setup2/layouts/README.md

Lines changed: 7 additions & 0 deletions
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).

setup2/layouts/default.vue

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
<template>
2+
<div>
3+
<AppMenu />
4+
<Nuxt />
5+
</div>
6+
</template>
7+
8+
<script>
9+
import AppMenu from "~/components/AppMenu.vue";
10+
11+
export default {
12+
components: {
13+
AppMenu,
14+
},
15+
};
16+
</script>
17+
18+
<style>
19+
body,
20+
html {
21+
font-family: "PT Serif", serif;
22+
margin: 0;
23+
}
24+
a {
25+
transition: 0.2s all ease;
26+
text-decoration: none;
27+
color: #e6534b;
28+
}
29+
a:hover {
30+
color: #fc7c5f;
31+
}
32+
.flexrow {
33+
padding-top: 80px;
34+
display: -webkit-box;
35+
display: -ms-flexbox;
36+
display: flex;
37+
-webkit-box-pack: center;
38+
-ms-flex-pack: center;
39+
justify-content: center;
40+
}
41+
.special,
42+
h1,
43+
h2,
44+
h3,
45+
li,
46+
button.submit,
47+
.quant-text {
48+
font-family: "Montserrat", sans-serif;
49+
text-transform: uppercase;
50+
letter-spacing: 0.08em;
51+
font-size: 12px;
52+
}
53+
h2 {
54+
font-size: 20px;
55+
margin: 0 0 5px;
56+
text-align: center;
57+
}
58+
li {
59+
list-style: none;
60+
display: inline-block;
61+
}
62+
input {
63+
background: #eee;
64+
}
65+
button {
66+
border: none;
67+
border-radius: 1000px;
68+
padding: 8px 13px;
69+
outline: none;
70+
cursor: pointer;
71+
}
72+
button.inc {
73+
background: white;
74+
color: black;
75+
}
76+
button.submit {
77+
background: black;
78+
color: white;
79+
margin-left: 20px;
80+
padding: 12px 14px;
81+
width: 240px;
82+
-webkit-transition: 0.25s all ease-in;
83+
transition: 0.25s all ease-in;
84+
}
85+
button.submit:hover {
86+
opacity: 0.8;
87+
-webkit-transition: 0.25s all ease-out;
88+
transition: 0.25s all ease-out;
89+
}
90+
.quant-text {
91+
display: inline-block;
92+
text-align: center;
93+
width: 140px;
94+
padding: 8px;
95+
padding: 8px;
96+
}
97+
.quantity {
98+
border: 2px solid black;
99+
width: 235px;
100+
padding-left: 3px;
101+
border-radius: 1000px;
102+
background: #fff;
103+
margin-left: 20px;
104+
}
105+
.item {
106+
display: -webkit-box;
107+
display: -ms-flexbox;
108+
display: flex;
109+
-webkit-box-orient: vertical;
110+
-webkit-box-direction: normal;
111+
-ms-flex-direction: column;
112+
flex-direction: column;
113+
width: 280px;
114+
height: 440px;
115+
-ms-flex-pack: distribute;
116+
justify-content: space-around;
117+
background: #eee;
118+
padding: 20px 10px;
119+
margin: 30px;
120+
}
121+
.item img {
122+
-ms-flex-item-align: center;
123+
-ms-grid-row-align: center;
124+
align-self: center;
125+
}
126+
</style>

setup2/middleware/README.md

Lines changed: 8 additions & 0 deletions
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).

0 commit comments

Comments
 (0)