Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>DriveBox</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>

<!-- Logo / Title -->
<h1 class="logo">🚗 Click Bates Drive-Thru</h1>
<h2 id="menu-title">Pull Up & Order</h2>

<!-- Buttons wrapped for styling -->
<div class="buttons">
<button id="breakfast-btn">Breakfast</button>
<button id="lunch-btn">Lunch</button>
<button id="dinner-btn">Dinner</button>
<button id="drinks-btn">Drinks</button>
</div>

<!-- Menu Display -->
<div id="menu-display" class="menu-box">
<p>Welcome to the drive-thru 🍔</p>
</div>

<!-- Floating Food (fixed placement) -->
<div class="floating-food">
<img src="burger.png" class="float burger" alt="burger">
<img src="fries.png" class="float fries" alt="fries">
<img src="drink.png" class="float drink" alt="drink">
</div>

<script src="script.js"></script>
</body>
</html>
58 changes: 58 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
function updateMenu(title, items) {
menuTitle.textContent = title;
menuDisplay.innerHTML = items;
}
console.log("JavaScript is connected!");
//Button//
const breakfastButton = document.querySelector("#breakfast-btn");
const lunchButton = document.querySelector("#lunch-btn");
const dinnerButton = document.querySelector("#dinner-btn");
//Menu//
const breakfastMenu = document.querySelector("#breakfast-menu");
const lunchMenu = document.querySelector("#lunch-menu");
const dinnerMenu = document.querySelector("#dinner-menu");
//Event Listeners//
breakfastButton.addEventListener("click", () => {
breakfastMenu.style.display = "block";
lunchMenu.style.display = "none";
dinnerMenu.style.display = "none";
});
lunchButton.addEventListener("click", () => {
breakfastMenu.style.display = "none";
lunchMenu.style.display = "block";
dinnerMenu.style.display = "none";
});lunchButton.addEventListener("click", function () {
menuTitle.textContent = "Lunch Menu";
menuDisplay.textContent = "Burger, Fries, Salad";
});
const menuTitle = document.querySelector("#menu-title");
const menuDisplay = document.querySelector("#menu-display");
dinnerButton.addEventListener("click", () => {
breakfastMenu.style.display = "none";
lunchMenu.style.display = "none";
dinnerMenu.style.display = "block";
});dinnerButton.addEventListener("click", function () {
menuTitle.textContent = "Dinner Menu";
menuDisplay.textContent = "Steak, Rice, Vegetables";
});
breakfastButton.addEventListener("click", function () {
updateMenu(
"Breakfast Menu",
`
<h3>Pancakes</h3>
<p>Fluffy and delicious</p>

<h3>Eggs & Bacon</h3>
<p>Classic breakfast combo</p>
`
);
});updateMenu("Breakfast Menu", breakfastItems);

lunchButton.addEventListener("click", function () {
menuTitle.textContent = "Lunch Menu";
menuDisplay.textContent = "Burger, Fries, Salad";
});
dinnerButton.addEventListener("click", function () {
menuTitle.textContent = "Dinner Menu";
menuDisplay.textContent = "Steak, Rice, Vegetables";
});const drinksButton = document.querySelector("#drinks-btn");
72 changes: 72 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
body {
font-family: Arial, sans-serif;
text-align: center;
background: #0F172A;
color: #F8FAFC;
overflow-x: hidden;
}

/* Logo / Title */
.logo {
font-size: 2.5rem;
margin-top: 20px;
}

/* Buttons container */
.buttons {
margin: 20px;
}

/* Buttons */
button {
margin: 10px;
padding: 12px 20px;
border: none;
border-radius: 999px;
background: #22C55E;
color: black;
font-weight: bold;
cursor: pointer;
box-shadow: 0 0 15px #22C55E;
transition: 0.3s;
}

button:hover {
transform: scale(1.1);
}

/* Menu Display Box */
.menu-box {
margin: 30px auto;
padding: 20px;
width: 300px;
background: rgba(255,255,255,0.05);
border-radius: 20px;
backdrop-filter: blur(10px);
font-size: 18px;
animation: fadeIn 0.5s ease-in;
}

/* Floating Food */
.floating-food img {
position: absolute;
width: 100px;
animation: float 4s ease-in-out infinite;
}

.burger { top: 20%; left: 10%; }
.fries { top: 50%; right: 10%; }
.drink { bottom: 10%; left: 40%; }

/* Floating animation */
@keyframes float {
0% { transform: translateY(0px); }
50% { transform: translateY(-20px); }
100% { transform: translateY(0px); }
}

/* Fade in effect */
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}