-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
52 lines (46 loc) · 1.94 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<style media="screen">
.outline-none{
outline:none !important
}
</style>
<title>VueLessons</title>
</head>
<body>
<div id="app">
<div class="d-md-flex flex-md-equal w-100 my-md-3 pl-md-3">
<div class="overflow-hidden ">
<img :src="image" width="300em" alt="">
</div>
<div class=" ml-4 overflow-hidden p-3">
<h1>{{product}}</h1>
<p v-if='inStock'>Em stock</p>
<p v-else="inStock">Fora de stock</p>
<ul>
<li v-for="detail in details">{{detail}}</li>
</ul>
<h4>Cores</h4>
<span class="btn btn-lg p-4 mr-2 mb-3" v-for="variant in variants" :key="variant.variantId" @mouseover="updateProduct(variant.variantImage)" :style=" {backgroundColor: variant.variantColor}"></span>
<div>
<button class="btn btn-lg btn-primary" v-on:click="addToCart" :disabled="!inStock"> Add to cart ({{cart}})</button>
<button class="btn btn-danger btn-lg outline-none" v-on:click="removeFromCart" :disabled="cart==0">-</button>
</div>
<div class="alert mt-2 alert-warning alert-dismissible fade show" v-if="showAlert" role="alert">
{{alert}}
<button type="button" class="close outline-none" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true" v-on:click="showAlert=false">×</span>
</button>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="js/app.js" charset="utf-8"></script>
</body>
</html>