-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRestuarant4.html
More file actions
218 lines (184 loc) · 5.41 KB
/
Restuarant4.html
File metadata and controls
218 lines (184 loc) · 5.41 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Taco Time 🌮</title>
<link rel="stylesheet" href="Css/styles.css">
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap" rel="stylesheet">
<style>
body {
margin: 0;
font-family: 'Poppins', sans-serif;
background: linear-gradient(to right, #f7971e, #ffd200);
color: white;
padding: 0;
animation: fadeIn 1s ease-in;
}
header {
background-color: rgba(0, 0, 0, 0.3);
padding: 1.5rem;
text-align: center;
font-size: 2rem;
font-weight: bold;
}
header a {
list-style: none;
text-decoration: none;
color: #f7971e;
}
.content {
padding: 2rem;
animation: slideUp 1s ease-in;
}
h2 {
margin-top: 2rem;
border-bottom: 2px solid white;
padding-bottom: 0.5rem;
}
.menu {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 1rem;
margin-top: 1rem;
}
.menu-item {
background-color: rgba(255, 255, 255, 0.1);
padding: 1rem;
border-radius: 1rem;
backdrop-filter: blur(8px);
transition: transform 0.3s;
}
.menu-item:hover {
transform: scale(1.05);
background-color: rgba(255, 255, 255, 0.2);
}
.footer {
text-align: center;
margin-top: 3rem;
font-size: 0.9rem;
opacity: 0.8;
}
@keyframes fadeIn {
from { opacity: 0 }
to { opacity: 1 }
}
@keyframes slideUp {
from { transform: translateY(40px); opacity: 0 }
to { transform: translateY(0); opacity: 1 }
}
</style>
</head>
<body>
<header>
<div>
Taco Time 🌮
</div>
<div>
<a href="index.html">Home 🏠</a>
</div>
</header>
<div class="content">
<section>
<h2>About Us</h2>
<p>Welcome toTaco Time 🌮! We serve flame-grilled perfection in every bite. From juicy steaks to veggie delights, we’ve got something for everyone.</p>
</section>
<section>
<h2>Menu</h2>
<div class="menu">
<div class="menu-item">
<strong> </strong><br/>
</div>
<div class="menu-item">
<strong> Beef Tacos </strong><br/>
$9.99
</div>
<div class="menu-item">
<strong>Chicken Quesadilla</strong><br/>
$10.50
</div>
<div class="menu-item">
<strong>Loaded Nachos </strong><br/>
$8.00
</div>
</div>
</section>
<section>
<h2>Contact</h2>
<p>📞 (123) 456-7890<br/>
📍 123 Grill Street, BBQ City, FL</p>
</section>
<div class="calculator">
<label for="bill">Bill Amount ($)</label>
<input type="number" id="bill" placeholder="Enter bill amount" />
<label>Tip %</label>
<div class="tip-buttons">
<button onclick="setTip(10)">10%</button>
<button onclick="setTip(15)">15%</button>
<button onclick="setTip(20)">20%</button>
</div>
<label for="tip">Custom Tip (%)</label>
<input type="number" id="tip" placeholder="Enter tip %" />
<label for="people">Number of People</label>
<input type="number" id="people" placeholder="Enter number of people" />
<div class="result" id="result">
Tip: $0.00<br />
Total: $0.00<br />
Per Person: $0.00
</div>
<button class="reset-btn" onclick="resetCalculator()">Reset</button>
<div class="dark-mode-toggle" onclick="toggleDarkMode()">Toggle Dark Mode</div>
</div>
<div class="footer">© 2025 The Grill Spot</div>
</div>
<script>
const billInput = document.getElementById('bill');
const tipInput = document.getElementById('tip');
const peopleInput = document.getElementById('people');
const result = document.getElementById('result');
billInput.addEventListener('input', calculate);
tipInput.addEventListener('input', calculate);
peopleInput.addEventListener('input', calculate);
function setTip(percent) {
tipInput.value = percent;
calculate();
}
function calculate() {
const bill = parseFloat(billInput.value);
const tipPercent = parseFloat(tipInput.value);
const people = parseInt(peopleInput.value) || 1;
if (isNaN(bill) || isNaN(tipPercent)) {
result.innerHTML = '<span style="color: red;">Enter valid bill and tip values.</span>';
return;
}
const tipAmount = (bill * tipPercent) / 100;
const total = bill + tipAmount;
const perPerson = total / people;
animateResult(tipAmount, total, perPerson);
}
function animateResult(tip, total, perPerson) {
let current = 0;
const steps = 30;
const interval = setInterval(() => {
current++;
const t = current / steps;
result.innerHTML = `
Tip: $${(tip * t).toFixed(2)}<br />
Total: $${(total * t).toFixed(2)}<br />
Per Person: $${(perPerson * t).toFixed(2)}
`;
if (current >= steps) clearInterval(interval);
}, 20);
}
function resetCalculator() {
billInput.value = '';
tipInput.value = '';
peopleInput.value = '';
result.innerHTML = 'Tip: $0.00<br />Total: $0.00<br />Per Person: $0.00';
}
function toggleDarkMode() {
document.body.classList.toggle('dark');
}
</script>
</body>
</html>