<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cheeseburger Atlas</title>
<style>
/* Modern and elegant CSS */
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #f4f4f9;
color: #333;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
align-items: center;
}
header {
background-color: #ff6347; /* Tomato color for a fun, burger vibe */
width: 100%;
padding: 20px;
text-align: center;
color: white;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
h1 {
margin: 0;
font-size: 2.5em;
}
.burger-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
gap: 20px;
padding: 20px;
max-width: 1200px;
width: 100%;
}
.burger-card {
background-color: white;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
padding: 15px;
text-align: center;
cursor: pointer;
transition: transform 0.2s, box-shadow 0.2s;
}
.burger-card:hover {
transform: translateY(-5px);
box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}
.burger-card h2 {
font-size: 1.5em;
margin: 10px 0;
color: #ff6347;
}
.burger-card p {
font-size: 1em;
color: #666;
}
/* Modal styles */
.modal {
display: none;
position: fixed;
z-index: 1;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgba(0,0,0,0.4);
padding-top: 60px;
}
.modal-content {
background-color: #fefefe;
margin: 5% auto;
padding: 20px;
border: 1px solid #888;
width: 80%;
max-width: 600px;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.close {
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: black;
text-decoration: none;
cursor: pointer;
}
.modal h2 {
color: #ff6347;
}
.modal section {
margin-bottom: 20px;
}
.modal h3 {
border-bottom: 1px solid #ddd;
padding-bottom: 5px;
color: #333;
}
</style>
</head>
<body>
<header>
<h1>Cheeseburger Atlas</h1>
<p>Explore the world of cheeseburgers: origins, history, and recipes</p>
</header>
<div class="burger-grid" id="burger-grid">
<!-- Burgers will be dynamically added here -->
</div>
<!-- The Modal -->
<div id="modal" class="modal">
<div class="modal-content">
<span class="close">×</span>
<h2 id="modal-title"></h2>
<section>
<h3>Origin</h3>
<p id="modal-origin"></p>
</section>
<section>
<h3>History</h3>
<p id="modal-history"></p>
</section>
<section>
<h3>How to Make It</h3>
<p id="modal-recipe"></p>
</section>
</div>
</div>
<script>
// Data for cheeseburgers
const burgers = [
{
name: "Classic American Cheeseburger",
origin: "United States",
history: "The cheeseburger is said to have been invented in the 1920s in Pasadena, California, when a young chef named Lionel Sternberger accidentally burned a hamburger and covered it with cheese to hide the mistake.",
recipe: "Grill a beef patty, top with American cheese, add lettuce, tomato, onion, pickles, ketchup, and mustard on a sesame seed bun."
},
{
name: "Bacon Cheeseburger",
origin: "United States",
history: "Popularized in the 1960s by fast-food chains, adding crispy bacon to the classic cheeseburger for extra flavor and texture.",
recipe: "Cook bacon until crisp, grill beef patty with cheddar cheese, assemble with bacon, lettuce, tomato, and mayo on a bun."
},
{
name: "Blue Cheese Burger",
origin: "France (inspired), popularized in US",
history: "Blue cheese has French origins, but the burger variation gained popularity in American steakhouses in the mid-20th century for its bold, tangy flavor.",
recipe: "Grill beef patty, crumble blue cheese on top to melt, add caramelized onions and arugula on a brioche bun."
},
{
name: "Swiss Mushroom Burger",
origin: "Switzerland (cheese), US adaptation",
history: "Inspired by Swiss fondue traditions, this burger emerged in the US in the 1970s, combining earthy mushrooms with nutty Swiss cheese.",
recipe: "Sauté mushrooms, grill patty with Swiss cheese, top with mushrooms and garlic aioli on a whole wheat bun."
},
{
name: "Jalapeño Cheeseburger",
origin: "Mexico (peppers), Tex-Mex US",
history: "A spicy twist from the American Southwest in the 1980s, incorporating jalapeños for heat in Tex-Mex cuisine.",
recipe: "Grill patty with pepper jack cheese, add sliced jalapeños, guacamole, and salsa on a toasted bun."
},
{
name: "Hawaiian Cheeseburger",
origin: "Hawaii, United States",
history: "Influenced by Hawaiian cuisine in the 1990s, featuring pineapple for a sweet-savory contrast, often called a 'teriyaki burger' variant.",
recipe: "Grill patty with Monterey Jack cheese, add grilled pineapple, teriyaki sauce, and lettuce on a Hawaiian roll."
},
{
name: "Aussie Cheeseburger",
origin: "Australia",
history: "Australian burgers often include beetroot; the cheese version became popular in the 1950s with American influences post-WWII.",
recipe: "Grill patty with cheddar, add sliced beetroot, fried egg, pineapple, and BBQ sauce on a bun."
},
{
name: "Veggie Cheeseburger",
origin: "United States (vegetarian movement)",
history: "Emerged in the 1970s with the rise of vegetarianism; plant-based patties topped with cheese for a meatless alternative.",
recipe: "Grill a veggie patty (bean or lentil-based), top with cheddar, add avocado, sprouts, and tahini sauce on a multigrain bun."
}
];
// Function to create burger cards
function createBurgerCards() {
const grid = document.getElementById('burger-grid');
burgers.forEach((burger, index) => {
const card = document.createElement('div');
card.classList.add('burger-card');
card.innerHTML = `
<h2>${burger.name}</h2>
<p>Click to learn more</p>
`;
card.addEventListener('click', () => showModal(index));
grid.appendChild(card);
});
}
// Modal functionality
const modal = document.getElementById('modal');
const closeBtn = document.querySelector('.close');
function showModal(index) {
const burger = burgers[index];
document.getElementById('modal-title').textContent = burger.name;
document.getElementById('modal-origin').textContent = burger.origin;
document.getElementById('modal-history').textContent = burger.history;
document.getElementById('modal-recipe').textContent = burger.recipe;
modal.style.display = 'block';
}
closeBtn.addEventListener('click', () => {
modal.style.display = 'none';
});
window.addEventListener('click', (event) => {
if (event.target === modal) {
modal.style.display = 'none';
}
});
// Initialize
createBurgerCards();
</script>
</body>
</html>