-
Notifications
You must be signed in to change notification settings - Fork 0
/
product.html
154 lines (126 loc) · 5.3 KB
/
product.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Tech Mahindra - Assignment</title>
<link rel="icon" type="image/x-icon" href="./images/favicon.svg">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
rel="stylesheet">
<link
href="https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400..800;1,400..800&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
rel="stylesheet">
<link href="./css/global.css" rel="stylesheet" />
<link href="./css/loader.css" rel="stylesheet" />
<link href="./css/product-detail.css" rel="stylesheet" />
</head>
<body>
<div class="root-container">
<!-- HEADER : BEGINS -->
<div id="header"></div>
<script>
function loadHeader(url) {
const xhttp = new XMLHttpRequest();
xhttp.onload = function () {
document.getElementById("header").innerHTML = this.responseText;
}
xhttp.open("GET", url);
xhttp.send();
}
loadHeader("header.html");
</script>
<!-- HEADER : ENDS -->
<!-- LOADER : BEGINS -->
<div class="loader-container" id="loader-container" style="display: block;">
<div class="loader"></div>
</div>
<!-- LOADER : ENDS -->
<div id="error">
ERROR
</div>
<!-- PRODUCTS : BEGINS -->
<div class="container">
<div id="product-detail" style="display: none;">
<div id="product-detail-content">
<div id="gallery">
<div id="thumb-list"></div>
<div id="active-image"></div>
<div id="dots"></div>
</div>
<div id="product-content">
<div class="text-cat">Clothing / Women's / <span>Outwear</span></div>
<h2 id="title"></h2>
<h3 id="price"> </h3>
<div id="descShort"></div>
<div id="quantity-wrapper">
<h3>Quantity</h3>
<div class="quantity-increment">
<span>
<img src="./images/minus-icon.jpg" alt="icon decrement" title="icon decrement" />
</span>
<input type="number" value="1" />
<span>
<img src="./images/plus-icon.jpg" alt="icon increment" title="icon increment" />
</span>
</div>
<div>
<button class="btn-add-cart">Add to Cart</button>
</div>
</div>
<div class="icons">
<div>
<img src="./images/heart-icon.png" alt="iocn heart" title="iocn heart" />
<span>
Save
</span>
</div>
<div>
<img src="./images/share-icon.png" alt="icon share" title="icon share" />
<span>
Share
</span>
</div>
</div>
</div>
</div>
<div id="product-description">
<h2 id="title2"></h2>
<h3>Description</h3>
<div id="description"></div>
</div>
</div>
</div>
<script>
// function loadProducts(url) {
// const xhttp = new XMLHttpRequest();
// xhttp.open("GET", url, false);
// xhttp.send(null);
// document.getElementById("products").innerHTML = xhttp.responseText;
// }
// loadProducts("productsList.html");
</script>
<!-- PRODUCTS : ENDS -->
<!-- FOOTER : BEGINS -->
<div id="footer"></div>
<script>
function loadFooter(url) {
const xhttp = new XMLHttpRequest();
xhttp.onload = function () {
document.getElementById("footer").innerHTML = this.responseText;
}
xhttp.open("GET", url);
xhttp.send();
}
loadFooter("footer.html");
</script>
<!-- FOOTER : ENDS -->
</div>
<script src="./product.js"></script>
</body>
</html>