-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
47 lines (43 loc) · 1.42 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Vue Mastery</title>
<!-- Import Styles -->
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./assets/styles.css" />
<!-- Import Vue.js -->
<script src="https://unpkg.com/[email protected]/dist/vue.global.js"></script>
</head>
<body>
<div id="app">
<div class="product-image">
<a :href="url">
<img v-bind:src="image" alt="">
</a>
</div>
<!-- Conditional methods -->
<!-- <p v-if="inStock">In Stock</p>
<p v-else>Out of Stock</p> -->
<!-- <p v-show="inStock">In Stock</p>
<p v-show="!inStock">Out of Stock</p> -->
<div class="product-info">
<h1>{{ product }}</h1>
<p>{{ description }}</p>
<p v-if="inventory > 10">In Stock</p>
<p v-else-if="inventory == 0">Out of Stock</p>
<p v-else>We only have {{ inventory }} left!</p>
<p v-show="onSale" class="red-color">On SALE!</p>
<h2>Description</h2>
<p>Specifications:</p>
<li v-for="detail in details">{{ detail }}</li>
</div>
</div>
<!-- Import Js -->
<script src="./main.js"></script>
<script>
const mountedApp = app.mount('#app')
</script>
</body>
</html>