-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcart.html
More file actions
183 lines (171 loc) · 6.4 KB
/
cart.html
File metadata and controls
183 lines (171 loc) · 6.4 KB
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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Checkout Form</title>
<link
href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap"
rel="stylesheet"
/>
<style>
* {
font-family: 'Montserrat', sans-serif;
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background-color: whitesmoke;
padding: 15px;
border-radius: 25px;
}
h2 {
text-align: center;
margin-bottom: 20px;
}
table {
width: 100%;
border-collapse: collapse;
}
td {
padding: 10px;
}
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Buy Page</title>
<link
href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap"
rel="stylesheet"
/>
<link rel="icon" type="image/png" href="favicons/favicon-32x32.png" />
<style>
* {
font-family: 'Montserrat', sans-serif;
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
min-height: 100vh;
padding: 20px;
margin: 0;
background-color: #e8ebe0;
}
.main-container {
display: flex;
justify-content: space-evenly;
background: transparent;
padding: 8px;
min-width: 35%;
border-radius: 25px;
transform: translateY(15px);
margin-bottom: 20px;
}
iframe {
margin: 10px;
width: 100%;
height: 720px; /* Increased height to fit the form content */
background-color: whitesmoke;
border: 8px solid blueviolet;
border-radius: 25px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.navbar-perm {
position: relative;
width: 70%;
height: 30px;
display: flex;
transform: translateY(-12px);
justify-content: space-between;
padding: 0 20px;
background-color: black;
color: whitesmoke;
border: 1px solid darkgray;
backdrop-filter: blur(8px);
border-radius: 20px;
margin: 0 auto 20px auto;
}
.navbar-links {
align-self: center;
}
.navbar-links ul {
padding: 0;
margin: 0;
}
.navbar-logo {
align-self: right;
}
.navbar-links img {
height: 20px;
width: 20px;
background-size: contain;
vertical-align: middle;
}
li {
display: inline-block;
}
a {
color: whitesmoke;
text-decoration: none;
}
</style>
</head>
<body>
<div class="navbar-perm">
<div class="navbar-links">
<nav>
<ul style="list-style: none">
<li style="display: inline-block; margin-right: 10px">
<a href="home.html" style="color: whitesmoke">Home</a>
</li>
<li style="display: inline-block; margin-right: 10px">
<a href="adopt.html" style="color: whitesmoke">Adopt</a>
</li>
<li style="display: inline-block; margin-right: 10px">
<a href="care_guide.html" style="color: whitesmoke">Care Guide</a>
</li>
<li style="display: inline-block; margin-right: 10px">
<a href="accessories.html" style="color: whitesmoke">Accessories</a>
</li>
<li style="display: inline-block; margin-right: 10px">
<a
href="cart.html"
style="color: whitesmoke; display: inline-flex; align-items: center"
>
(
<img src="images/shooping-cart-img.png" alt="shopping-cart" />
)
</a>
</li>
</ul>
</nav>
</div>
<div class="navbar-logo">
<h3 style="margin: 0; transform: translateY(2px)">DoggyFoster</h3>
</div>
</div>
<div class="main-container">
<iframe id="summary-frame" src="cart-summary.html" title="Checkout Summary"></iframe>
<iframe id="form-frame" src="cart-form.html" title="Checkout Form"></iframe>
</div>
<script>
// Function to communicate between frames
window.addEventListener('message', function (event) {
// Check for messages from iframes
if (event.data.type === 'formSubmitted') {
// When form is submitted, tell summary frame to empty cart
document.getElementById('summary-frame').contentWindow.postMessage(
{
type: 'emptyCart',
},
'*'
);
}
});
</script>
</body>
</html>