forked from Antwnhss/ORDERFORM
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsavouries.html
More file actions
169 lines (125 loc) · 3.96 KB
/
Copy pathsavouries.html
File metadata and controls
169 lines (125 loc) · 3.96 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="css/bootstrap.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery-3.7.1.min.js"></script>
<title>Επιδόρπιο</title>
<style>
body{
background-image: url(images/backgroundimage_2.jpg);
}
.item1 {
grid-area: header;
}
.item2 {
grid-area: menu;
max-width: 780px;
}
.item3 {
grid-area: main;
}
.item4 {
grid-area: right;
min-height: 250px;
}
.item5 {
grid-area: footer;
}
.grid-container {
margin: 6% 12% 5% 12%;
display: grid;
grid-template-areas:
'header header header header header header'
'menu right right right right right'
'menu main main main main main'
'footer footer footer footer footer footer';
gap: 5px;
background-color: #6face1;
padding: 5px;
}
.grid-container > div {
background-color: rgba(255, 255, 255, 0.8);
text-align: center;
padding: 5px 0;
font-size: 20px;
}
th{
font-size: 15px;
}
td{
font-size: 12px;
}
td h5{
margin-left: 20px;
}
td button{
margin-left: 25px;
}
</style>
</head>
<body>
<div class="grid-container">
<div class="item1">
<div class="dropdown">
<a class="btn btn-secondary dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">Επιλογή</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="savouries.html">Επιδόρπιο</a></li>
<li><a class="dropdown-item" href="mainmenu.html">Κυρίως Πιάτο</a></li>
<li><a class="dropdown-item" href="beverages.html">Ποτά</a></li>
</ul>
</div>
</div>
<div class="item2">
<div >
<table class="mainmenu">
<tr id="tiropita" style="width: 100%;">
<td><img src="images/tiropita.jpg"/></td>
<th class="title">Τυρόπιτα στο Τηγάνι</th>
<td class="price"><h5>5.0€</h5></td>
<td><button onclick="addToCart(document.getElementById('tiropita'))">Προσθήκη</button></td>
</tr>
</div>
<div id="flogeres" style="width: 100%;">
<tr>
<td><img src="images/flogeres.jpg"/></td>
<th>Φλογέρες με κρέμα τυρί</th>
<td><h5>3.5€</h5></td>
<td><button onclick="addToCart(document.getElementById('flogeres'))">Προσθήκη</button></td>
</tr>
</div>
<div id="patates" style="width: 100%;">
<tr>
<td><img src="images/patatesgemistes.jpg"/></td>
<th>Πατάτες γεμιστές με ζαμπόν<br> και τυρί</th>
<td><h5>2.5€</h5></td>
<td><button onclick="addToCart(document.getElementById('patates'))">Προσθήκη</button></td>
</tr>
</table>
</div>
</div>
<div class="item3">
<p>Συνολικό Ποσό</p>
</div>
<div class="item4" id="shoppingCart">
<p>Παραγγελία</p>
</div>
<div class="item5">
<button>Αποστολή</button>
</div>
</div>
<script>
function addToCart(data){
var idProduct = data.id;
var img = document.getElementById(idProduct).children[0]
var title = document.getElementById(idProduct).children[1].children[0].innerHTML;
var price = document.getElementById(idProduct).children[2].children[0].innerHTML;
// document.getElementById("shoppingCart").innerHTML += <div class="item4"><img src="'+ img.src + '" style="width:50px; heihgt:50px;">' + title </div>;
}
</script>
</body>
</html>