This repository was archived by the owner on Aug 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathindex.html
253 lines (235 loc) · 12.3 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
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
<!--
Copyright 2017 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!doctype html>
<html ⚡>
<head>
<meta charset="utf-8">
<title>AMPPAREL</title>
<link rel="canonical" href="amps.html">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
<script async src="https://cdn.ampproject.org/v0.js"></script>
<!-- TODO: "Install the <amp-bind> extension" -->
<script async custom-element="amp-carousel" src="https://cdn.ampproject.org/v0/amp-carousel-0.1.js"></script>
<script async custom-element="amp-form" src="https://cdn.ampproject.org/v0/amp-form-0.1.js"></script>
<script async custom-element="amp-selector" src="https://cdn.ampproject.org/v0/amp-selector-0.1.js"></script>
<script async custom-template="amp-mustache" src="https://cdn.ampproject.org/v0/amp-mustache-0.1.js"></script>
<style amp-custom>
/*** uncss> filename: https://code.getmdl.io/1.3.0/material.indigo-pink.min.css ***/
/**
* material-design-lite - Material Design Components in CSS, JS and HTML
* @version v1.3.0
* @license Apache-2.0
* @copyright 2015 Google, Inc.
* @link https://github.com/google/material-design-lite
*/
html{color:rgba(0,0,0,.87)}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}.hidden{display:none}@media print{*,*:before,*:after{background:transparent;color:#000;box-shadow:none}tr{page-break-inside:avoid}p{orphans:3;widows:3}}.mdl-button{-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:rgba(255,255,255,0)}html{width:100%;height:100%;-ms-touch-action:manipulation;touch-action:manipulation}body{width:100%;min-height:100%}html,body{font-family:"Helvetica","Arial",sans-serif;font-size:14px;font-weight:400;line-height:20px}h5,h6,p{padding:0}h5{font-size:20px;font-weight:500;line-height:1;letter-spacing:.02em}h5,h6{font-family:"Roboto","Helvetica","Arial",sans-serif;margin:24px 0 16px}h6{font-size:16px;letter-spacing:.04em}h6,p{font-weight:400;line-height:24px}p{font-size:14px;letter-spacing:0;margin:0 0 16px}.mdl-color-text--red{color:#f44336 }.mdl-color-text--blue{color:#2196f3 }.mdl-color-text--grey{color:#9e9e9e }.mdl-color--black{background-color:#000 }.mdl-color-text--white{color:#fff }.mdl-button{background:0 0;border:none;border-radius:2px;color:#000;position:relative;height:36px;margin:0;min-width:64px;padding:0 16px;display:inline-block;font-family:"Roboto","Helvetica","Arial",sans-serif;font-size:14px;font-weight:500;text-transform:uppercase;letter-spacing:0;overflow:hidden;will-change:box-shadow;transition:box-shadow .2s cubic-bezier(.4,0,1,1),background-color .2s cubic-bezier(.4,0,.2,1),color .2s cubic-bezier(.4,0,.2,1);outline:none;cursor:pointer;text-decoration:none;text-align:center;line-height:36px;vertical-align:middle}.mdl-button::-moz-focus-inner{border:0}.mdl-button:hover{background-color:rgba(158,158,158,.2)}.mdl-button:focus:not(:active){background-color:rgba(0,0,0,.12)}.mdl-button:active{background-color:rgba(158,158,158,.4)}.mdl-button.mdl-button--colored:focus:not(:active){background-color:rgba(0,0,0,.12)}.mdl-button--raised{background:rgba(158,158,158,.2);box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)}.mdl-button--raised:active{box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.2);background-color:rgba(158,158,158,.4)}.mdl-button--raised:focus:not(:active){box-shadow:0 0 8px rgba(0,0,0,.18),0 8px 16px rgba(0,0,0,.36);background-color:rgba(158,158,158,.4)}.mdl-button--raised.mdl-button--colored:focus:not(:active){background-color:rgb(63,81,181)}.mdl-button--fab:focus:not(:active){box-shadow:0 0 8px rgba(0,0,0,.18),0 8px 16px rgba(0,0,0,.36);background-color:rgba(158,158,158,.4)}.mdl-button--fab.mdl-button--colored:focus:not(:active){background-color:rgb(255,64,129)}.mdl-button--accent.mdl-button--accent{color:rgb(255,64,129)}.mdl-button--accent.mdl-button--accent.mdl-button--raised{color:rgb(255,255,255);background-color:rgb(255,64,129)}.mdl-button[disabled][disabled]{color:rgba(0,0,0,.26);cursor:default;background-color:transparent}.mdl-button--raised[disabled][disabled]{background-color:rgba(0,0,0,.12);color:rgba(0,0,0,.26);box-shadow:none}@supports (-webkit-appearance:none){}@supports (pointer-events:auto){}.mdl-slider.is-upgraded:focus:not(:active)::-webkit-slider-thumb{box-shadow:0 0 0 10px rgba(63,81,181,.26)}.mdl-slider.is-upgraded:focus:not(:active)::-moz-range-thumb{box-shadow:0 0 0 10px rgba(63,81,181,.26)}.mdl-slider.is-upgraded:focus:not(:active)::-ms-thumb{background:radial-gradient(circle closest-side,rgb(63,81,181)0%,rgb(63,81,181)37.5%,rgba(63,81,181,.26)37.5%,rgba(63,81,181,.26)100%);transform:scale(1)}.mdl-slider.is-upgraded.is-lowest-value:focus:not(:active)::-webkit-slider-thumb{box-shadow:0 0 0 10px rgba(0,0,0,.12);background:rgba(0,0,0,.12)}.mdl-slider.is-upgraded.is-lowest-value:focus:not(:active)::-moz-range-thumb{box-shadow:0 0 0 10px rgba(0,0,0,.12);background:rgba(0,0,0,.12)}.mdl-slider.is-upgraded.is-lowest-value:focus:not(:active)::-ms-thumb{background:radial-gradient(circle closest-side,rgba(0,0,0,.12)0%,rgba(0,0,0,.12)25%,rgba(0,0,0,.26)25%,rgba(0,0,0,.26)37.5%,rgba(0,0,0,.12)37.5%,rgba(0,0,0,.12)100%);transform:scale(1)}body{margin:0}
/* custom css */
#header {
height: 24px;
padding: 16px;
margin: 0;
text-align: center;
text-transform: uppercase;
letter-spacing: 2px;
line-height: 24px;
}
.menu {
float: left;
}
.search {
float: right;
}
#container {
max-width: 500px;
padding: 32px 16px 64px 16px;
margin: auto;
}
.title {
text-align: center;
}
.rating {
margin-bottom: 0;
text-align: center;
}
#carousel {
margin: 16px;
}
.dots {
text-align: center;
}
.dots span {
display: inline-block;
background: #ccc;
border-radius: 6px;
width: 12px;
height: 12px;
margin: 4px;
}
.dots span.current {
background: #555;
}
.options {
margin: 16px 0;
}
.options h6 {
text-transform: uppercase;
margin: 0 0 4px 0;
}
.colors table {
margin: 0 -8px;
}
.colors amp-img {
border: solid 2px white;
display: block;
margin: auto;
}
.colors amp-img[selected] {
outline: solid 2px red;
}
.sizes div {
border: solid 1px black;
width: 40px;
height: 40px;
line-height: 40px;
font-weight: 800;
text-align: center;
}
.sizes div[selected] {
background-color: gray;
color: white;
outline: none;
}
.unavailable::before {
content: '';
position: absolute;
border-top: 1px solid black;
margin-left: 1px;
width: 57px;
transform: rotate(45deg);
transform-origin: 0% 0%;
}
.quantity select {
font-size: 16px;
border: solid 1px gray;
padding: 8px;
}
table {
width: 100%;
}
.hidden {
display: none;
}
</style>
</head>
<body>
<header id="header" class="mdl-color--black mdl-color-text--white">
<amp-img class="menu" src="./img/ic_menu_white_24dp_1x.png" width=24 height=24></amp-img>
<span class="mdl-color-text--blue">AMP</span>PAREL
<amp-img class="search" src="./img/ic_search_white_24dp_1x.png" width=24 height=24></amp-img>
</header>
<div id="container">
<h5 class="title">MEN'S COTTON CREW NECK<br>LONG SLEEVE T-SHIRT</h5>
<h6 class="rating"><span class="mdl-color-text--red">★★★★☆</span> <span class="mdl-color-text--grey">(14)</span></h6>
<amp-carousel type="slides" layout="fixed-height" height=250 id="carousel">
<!-- TODO: "Changing images in amp-carousel" -->
<amp-img width=200 height=250 src="./shirts/black.jpg"></amp-img>
<amp-img width=300 height=375 src="./shirts/black.jpg"></amp-img>
<amp-img width=400 height=500 src="./shirts/black.jpg"></amp-img>
</amp-carousel>
<!-- TODO: "Add a slide indicator" -->
<p class="dots">
<span class="current"></span>
<span></span>
<span></span>
</p>
<form method="post" action-xhr="/shirts/addToCart" target="_top">
<div class="options colors">
<h6>COLORS</h6>
<!--
Tip: <amp-selector> functions like an <input> element when nested in a <form>.
@see https://www.ampproject.org/docs/reference/components/amp-form#inputs-and-fields
-->
<amp-selector name="color">
<table>
<tr>
<td><amp-img width=40 height=40 option="1001" src="./shirts/swatch/black.jpg" selected></amp-img></td>
<td><amp-img width=40 height=40 option="1002" src="./shirts/swatch/blue.jpg"></amp-img></td>
<td><amp-img width=40 height=40 option="1010" src="./shirts/swatch/brown.jpg"></amp-img></td>
<td><amp-img width=40 height=40 option="1014" src="./shirts/swatch/dark-green.jpg"></amp-img></td>
</tr>
<tr>
<td><amp-img width=40 height=40 option="1015" src="./shirts/swatch/gray.jpg"></amp-img></td>
<td><amp-img width=40 height=40 option="1016" src="./shirts/swatch/light-gray.jpg"></amp-img></td>
<td><amp-img width=40 height=40 option="1021" src="./shirts/swatch/navy.jpg"></amp-img></td>
<td><amp-img width=40 height=40 option="1030" src="./shirts/swatch/wine.jpg"></amp-img></td>
</tr>
</table>
</amp-selector>
</div>
<div class="options price">
<h6>PRICE :
<!-- TODO: "Variable shirt prices" -->
$9.99
</h6>
</div>
<div class="options sizes">
<h6>SIZE :</h6>
<!-- TODO: "Variable shirt prices" -->
<amp-selector name="size">
<table>
<tr>
<!-- TODO: "Fetching available sizes for a shirt" -->
<td>
<div option="XS">XS</div>
</td>
<td>
<div option="S">S</div>
</td>
<!-- TODO: "Fetching available sizes for a shirt" -->
<td>
<div option="M">M</div>
</td>
<td>
<div option="L">L</div>
</td>
<td>
<div option="XL">XL</div>
</td>
</tr>
</table>
</amp-selector>
</div>
<div class="options quantity">
<h6>QUANTITY :</h6>
<select name="quantity">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</div>
<div class="options purchase">
<!-- TODO: "Conditionally enabled button" -->
<input type="submit" value="ADD TO CART"
class="mdl-button mdl-button--raised mdl-button--accent">
</div>
<div submit-success>
<template type="amp-mustache">Added {{quantity}} shirt(s) to cart!</template>
</div>
<div submit-error>
<template type="amp-mustache">Error adding to cart: {{error}}</template>
</div>
</form>
</div>
</body>
</html>