Skip to content

Commit eff0eea

Browse files
committed
initial commit
0 parents  commit eff0eea

File tree

8 files changed

+160
-0
lines changed

8 files changed

+160
-0
lines changed

.gitignore

Whitespace-only changes.

01-HelloWorld/HelloWorld.html

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<!-- https://www.vuemastery.com -->
2+
<html>
3+
<head>
4+
<script src="https://unpkg.com/vue"></script>
5+
<link href="./assets/style.css" rel="stylesheet" type="text/css">
6+
</head>
7+
<body>
8+
<div id="app">
9+
<div class="product">
10+
<div class="product-image">
11+
<img v-bind:src="image" :title="imageTitle">
12+
<!-- Attribute Shorthands -->
13+
<!-- :src, :alt, :title, :class, :style, :disabled -->
14+
</div>
15+
16+
<div class="product-info">
17+
<!-- Binding -->
18+
<h1>{{ product }}</h1>
19+
20+
21+
<!-- Conditionals -->
22+
<div>
23+
<!-- Falsey will not include in DOM -->
24+
<p v-if="inventory > 10">In Stock</p>
25+
<p v-else-if="inventory">Almost sold out</p>
26+
<p v-else>Out of Stock</p>
27+
28+
<!-- Render with display: none -->
29+
<p v-show="inventory < 0">Wuuk?</p>
30+
</div>
31+
32+
33+
<!-- Loops -->
34+
<div v-for="variant in variants" :key="variant.id">
35+
<!-- :key => React=key, Angular=trackBy -->
36+
<p>
37+
{{ variant.color }}
38+
</p>
39+
</div>
40+
</div>
41+
</div>
42+
</div>
43+
</body>
44+
</html>
45+
46+
47+
48+
<script type="text/javascript">
49+
const app = new Vue({
50+
el: '#app',
51+
data: {
52+
product: 'Socks',
53+
image: './assets/socks-green.jpg',
54+
imageTitle: 'Green Socks',
55+
inventory: 5,
56+
variants: [
57+
{id: 1, color: 'green'},
58+
{id: 2, color: 'blue'}
59+
]
60+
}
61+
});
62+
</script>
676 KB
Loading
762 KB
Loading

01-HelloWorld/assets/style.css

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
body {
2+
font-family: tahoma;
3+
color:#282828;
4+
margin: 0px;
5+
}
6+
7+
.nav-bar {
8+
background: linear-gradient(-90deg, #84CF6A, #16C0B0);
9+
height: 60px;
10+
margin-bottom: 15px;
11+
}
12+
13+
.product {
14+
display: flex;
15+
flex-flow: wrap;
16+
padding: 1rem;
17+
}
18+
19+
img {
20+
border: 1px solid #d8d8d8;
21+
width: 70%;
22+
margin: 40px;
23+
box-shadow: 0px .5px 1px #d8d8d8;
24+
}
25+
26+
.product-image {
27+
width: 80%;
28+
}
29+
30+
.product-image,
31+
.product-info {
32+
margin-top: 10px;
33+
width: 50%;
34+
}
35+
36+
.color-box {
37+
width: 40px;
38+
height: 40px;
39+
margin-top: 5px;
40+
}
41+
42+
.cart {
43+
margin-right: 25px;
44+
float: right;
45+
border: 1px solid #d8d8d8;
46+
padding: 5px 20px;
47+
}
48+
49+
button {
50+
margin-top: 30px;
51+
border: none;
52+
background-color: #1E95EA;
53+
color: white;
54+
height: 40px;
55+
width: 100px;
56+
font-size: 14px;
57+
}
58+
59+
.disabledButton {
60+
background-color: #d8d8d8;
61+
}
62+
63+
.review-form {
64+
width: 400px;
65+
padding: 20px;
66+
margin: 40px;
67+
border: 1px solid #d8d8d8;
68+
}
69+
70+
input {
71+
width: 100%;
72+
height: 25px;
73+
margin-bottom: 20px;
74+
}
75+
76+
textarea {
77+
width: 100%;
78+
height: 60px;
79+
}
80+
81+
.tab {
82+
margin-left: 20px;
83+
cursor: pointer;
84+
}
85+
86+
.activeTab {
87+
color: #16C0B0;
88+
text-decoration: underline;
89+
}

LICENSE

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
MIT License
2+
3+
Copyright (c) 2019 itenium
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Whitespace-only changes.
142 KB
Binary file not shown.

0 commit comments

Comments
 (0)