-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
222 lines (196 loc) · 6.38 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
<!DOCTYPE html>
<html class="no-js" lang="sv">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Gottfrids Munkar Onlinebuktik</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&icon_names=shopping_cart"
/>
<meta name="Gottfrids Munkar Onlinebutik" content="" />
<meta property="og:title" content="Gottfrids Munkar" />
<meta property="og:type" content="Onlineshop" />
<meta
property="og:url"
content="https://medieinstitutet.github.io/fed24d-js-intro-inl-1-webshop-SarahSu92"
/>
<meta property="og:image" content="images/apple.png" />
<meta property="og:image:alt" content="Äppelmunk" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" href="/icon.svg" type="image/svg+xml" />
<link rel="apple-touch-icon" href="icon.png" />
</head>
<body>
<header>
<h1>Gottfrids Munkar Onlinebutik</h1>
<nav>
<ul class="nav">
<li><a class="links" href="#products">Produkter</a></li>
<li><a class="links" href="#order">Beställning</a></li>
</ul>
</nav>
<div>
<a
class="shoppingcart"
href="#cart"
id="updateCart">
<span class="material-symbols-outlined">shopping_cart</span>
<span class="cart-count" id="cart-count">0</span>
</a>
</div>
</header>
<main>
<section class="renderOptions">Sortera på:
<select class="sort" id="sort-options">
<option value="name">Namn</option>
<option value="price">Pris</option>
<option value="rating">Raiting</option>
<option value="category">Kategori</option>
</select>
</section>
<section>
<h2 id="products">Produkter</h2>
<div id="product-list"></div>
</section>
</main>
<div class="cart" id="cart">
<span class="basket">Varukorg</span>
<span class="support">Kundsupport 08-634 30 30</span>
<div id="cart-summary">
<p class="cartempty">Din Varukorg är tom!</p>
</div>
</div>
<form action="submit-order" id="order-form" method="post">
<h3 id="order">Beställningsformulär</h3>
<label for="fname">Förnamn</label>
<input type="text" id="fname" name="fname" required />
<span
class="error"
id="fnameError"
role="alert"
aria-live="assertive"
></span>
<label for="lname">Efternamn</label>
<input type="text" id="lname" name="lname" required />
<span
class="error"
id="lnameError"
role="alert"
aria-live="assertive"
></span>
<label for="address">Gatuadress:</label>
<input type="text" id="address" name="address" required />
<span
class="error"
id="addressError"
role="alert"
aria-live="assertive"
></span>
<label for="postal">Postnummer:</label>
<input type="text" id="postal" name="postal" required />
<span
class="error"
id="postalError"
role="alert"
aria-live="assertive"
></span>
<label for="gatecode">Ev. portkod</label>
<input type="text" id="gatecode" name="postal" required />
<span
class="error"
id="gatecodeError"
role="alert"
aria-live="assertive"
></span>
<label for="phone">Telefonnummer (mobil):</label>
<input type="tel" id="phone" name="phone" required />
<span
class="error"
id="phoneError"
role="alert"
aria-live="assertive"
></span>
<label for="email">E-postadress:</label>
<input type="email" id="email" name="gatecode" required />
<span
class="error"
id="emailError"
role="alert"
aria-live="assertive"
></span>
<label for="city">Stad:</label>
<input type="text" id="city" name="city" required />
<span
class="error"
id="cityError"
role="alert"
aria-live="assertive"
></span>
<div>
<label for="payment-method" class="payment">Val av betalsätt:</label>
</div>
<label for="card" class="card">Kort</label>
<input
type="radio"
id="card"
name="payment-method"
value="card"
required
/>
<label for="invoice" class="invoice">Faktura</label>
<input
type="radio"
id="invoice"
name="payment-method"
value="invoice"
required
/>
<div class="card-fields" id="card-fields" style="display: none">
<label for="card-number">Kortnummer:</label>
<input type="text" id="card-number" name="card-number" />
<label for="expiry-date">Utgångsdatum (MM/ÅÅ):</label>
<input type="text" id="expiry-date" name="expiry-date" />
<label for="cvc">CVC:</label>
<input type="text" id="cvc" name="cvc" />
</div>
<div class="invoice-fields" name="payment-method" id="invoice-fields">
<label for="personal-number">Personnummer:</label>
<input
type="text"
id="personal-number"
name="personal-number"
pattern="\d{6}-\d{4}"
placeholder="ÅÅMMDD-XXXX"
/>
</div>
<div>
<label for="discount_code" class="discount_code">Ange Rabattkod:</label>
<input
type="text"
id="discount_code"
name="discount_code"
placeholder="Skriv rabattkod här"
/>
<span class="error" id="discountCodeError"></span>
</div>
<label>
<input type="checkbox" name="terms" id="privacy-policy" required />
Jag godkänner villkoren och behandling av personuppgifter.
</label>
<label>
<input type="checkbox" name="terms" checked />
Håll dig uppdaterad med vårt Nyhetsbrev!
</label>
<button class="submit" type="submit" id="submit-btn" disabled>Beställ</button>
<button class="reset" type="reset" id="reset-btn">
Rensa beställning
</button>
<div id="orderconfirmation"></div>
</form>
<div class="msg" id="confirmation-message">
</div>
<script type="module" src="main.mjs"></script>
</body>
</html>