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.
41 changes: 41 additions & 0 deletions JameskBarclayIII/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Sunny Bites Menu</title>
<link rel="stylesheet" href="style.css" />
</head>

<body>


<header class="hero">
<h1>☀️ Sunny Bites</h1>
<p>"Fresh food, happy mood"</p>
</header>
<section class="menu-controls">
<button class="menu-btn" data-category="breakfast">Breakfast</button>
<button class="menu-btn" data-category="brunch">Brunch</button>
<button class="menu-btn" data-category="lunch">Lunch</button>
<button class="menu-btn" data-category="dinner">Dinner</button>
<button class="menu-btn" data-category="desserts">Desserts</button>
<button class="menu-btn" data-category="drinks">Drinks</button>
</section>
<main class="menu-section">
<h2 id="menu-title">Menu</h2>
<p id="weekend-message" style="display: none;">
Available Saturdays and Sundays only!
</p>

<div id="menu-display">
<p>Select a category to view menu items.</p>
</div>
</main>
<footer>
<p>Made with love and good vibes</p>
</footer>

<script src="script.js"></script>
</body>
</html>
64 changes: 64 additions & 0 deletions JameskBarclayIII/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

const buttons = document.querySelectorAll(".menu-btn");
const menuDisplay = document.getElementById("menu-display");
const menuTitle = document.getElementById("menu-title");
const weekendMessage = document.getElementById("weekend-message");

const menu = {
breakfast: [
"Pancakes - $8",
"Eggs & Bacon - $10",
"French Toast - $9"
],
brunch: [
"Chicken & Waffles - $12",
"Avocado Toast - $10",
"Omelette - $11"
],
lunch: [
"Cheeseburger - $12",
"Grilled Chicken Sandwich - $11",
"Caesar Salad - $9"
],
dinner: [
"Steak - $20",
"Salmon - $18",
"Pasta - $15"
],
desserts: [
"Ice Cream - $5",
"Cheesecake - $6",
"Brownie - $4"
],
drinks: [
"Soda - $2",
"Juice - $3",
"Coffee - $3"
]
};


buttons.forEach(function(button) {
button.addEventListener("click", function() {
const category = button.getAttribute("data-category");


menuTitle.textContent = category.toUpperCase();

menuDisplay.innerHTML = "";

if (category === "brunch") {
weekendMessage.style.display = "block";
} else {
weekendMessage.style.display = "none";
}

const items = menu[category];

items.forEach(function(item) {
const p = document.createElement("p");
p.textContent = item;
menuDisplay.appendChild(p);
});
});
});
66 changes: 66 additions & 0 deletions JameskBarclayIII/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
color: #333;
}

.hero {
background-color: #ff914d;
color: white;
text-align: center;
padding: 30px;
}

.hero h1 {
margin-bottom: 10px;
}

.menu-controls {
text-align: center;
padding: 15px;
}

.menu-btn {
margin: 5px;
padding: 10px 15px;
border: none;
background-color: #ddd;
cursor: pointer;
}

.menu-btn:hover {
background-color: #ff914d;
color: white;
}

.menu-section {
max-width: 700px;
margin: 20px auto;
padding: 20px;
background-color: white;
border-radius: 8px;
}


#menu-title {
text-align: center;
margin-bottom: 15px;
}

#menu-display {
padding: 10px;
}

footer {
text-align: center;
margin-top: 20px;
padding: 10px;
background-color: #eee;
}