diff --git a/README.md b/README.md index dd6cc21..c120aa9 100644 --- a/README.md +++ b/README.md @@ -749,6 +749,23 @@ Answer these after completing the project: 5. What was the hardest part of the project? 6. What would you add next if this were a real restaurant website? +## Reflection Answers + +Use this section for your submission responses. + +1. How did JavaScript make your webpage interactive? + - +2. What did `querySelectorAll()` help you do? + - +3. What is the purpose of `addEventListener()`? + - +4. Why is storing menu data in objects and arrays useful? + - +5. What was the hardest part of the project? + - +6. What would you add next if this were a real restaurant website? + - + --- # Challenge for Later diff --git a/README2.md b/README2.md index 8a1577b..6359f19 100644 --- a/README2.md +++ b/README2.md @@ -414,6 +414,26 @@ Make them fully interactive using the same pattern. You are not memorizing code. You are learning how websites **respond to people**. + +--- + +# Reflection Answers (Safe Place) + +This section is for your lab reflection responses only. +It does not affect `index.html`, `style.css`, or `script.js`. + +1. How did JavaScript make your webpage interactive? + - JavaScript made my page interactive by listening for button clicks and then changing what shows on the screen. Instead of a fixed page, the menu updates when the user clicks a category. +2. What did `querySelectorAll()` help you do? + - `querySelectorAll()` helped me grab all the menu buttons at once. That made it easier to add click behavior to every button without writing separate code for each one. +3. What is the purpose of `addEventListener()`? + - `addEventListener()` tells JavaScript to wait for an action, like a click. When that action happens, it runs the function I wrote. +4. Why is storing menu data in objects and arrays useful? + - Storing menu data in objects and arrays keeps everything organized in one place. It also makes updates easier, because I can change data once instead of editing lots of HTML. +5. What was the hardest part of the project? + - The hardest part was understanding how the button `data-category` value connects to the correct section in `menuData`. Once I saw that match, the rest made more sense. +6. What would you add next if this were a real restaurant website? + - Next I would add real food photos, a contact/location section, and an online order button. I would also add a mobile-friendly reservation form. ```` --- diff --git "a/src/michaelmoss/images/Screenshot 2026-04-01 at 10.48.29\342\200\257PM.png" "b/src/michaelmoss/images/Screenshot 2026-04-01 at 10.48.29\342\200\257PM.png" new file mode 100644 index 0000000..9005ef6 Binary files /dev/null and "b/src/michaelmoss/images/Screenshot 2026-04-01 at 10.48.29\342\200\257PM.png" differ diff --git "a/src/michaelmoss/images/Screenshot 2026-04-01 at 11.00.46\342\200\257PM.png" "b/src/michaelmoss/images/Screenshot 2026-04-01 at 11.00.46\342\200\257PM.png" new file mode 100644 index 0000000..01b06ce Binary files /dev/null and "b/src/michaelmoss/images/Screenshot 2026-04-01 at 11.00.46\342\200\257PM.png" differ diff --git "a/src/michaelmoss/images/Screenshot 2026-04-01 at 11.38.16\342\200\257PM.png" "b/src/michaelmoss/images/Screenshot 2026-04-01 at 11.38.16\342\200\257PM.png" new file mode 100644 index 0000000..32e52af Binary files /dev/null and "b/src/michaelmoss/images/Screenshot 2026-04-01 at 11.38.16\342\200\257PM.png" differ diff --git "a/src/michaelmoss/images/Screenshot 2026-04-01 at 11.38.20\342\200\257PM.png" "b/src/michaelmoss/images/Screenshot 2026-04-01 at 11.38.20\342\200\257PM.png" new file mode 100644 index 0000000..8e261ee Binary files /dev/null and "b/src/michaelmoss/images/Screenshot 2026-04-01 at 11.38.20\342\200\257PM.png" differ diff --git "a/src/michaelmoss/images/Screenshot 2026-04-01 at 11.38.24\342\200\257PM.png" "b/src/michaelmoss/images/Screenshot 2026-04-01 at 11.38.24\342\200\257PM.png" new file mode 100644 index 0000000..a331eb1 Binary files /dev/null and "b/src/michaelmoss/images/Screenshot 2026-04-01 at 11.38.24\342\200\257PM.png" differ diff --git "a/src/michaelmoss/images/Screenshot 2026-04-01 at 11.38.27\342\200\257PM.png" "b/src/michaelmoss/images/Screenshot 2026-04-01 at 11.38.27\342\200\257PM.png" new file mode 100644 index 0000000..de238cb Binary files /dev/null and "b/src/michaelmoss/images/Screenshot 2026-04-01 at 11.38.27\342\200\257PM.png" differ diff --git "a/src/michaelmoss/images/Screenshot 2026-04-01 at 11.38.30\342\200\257PM.png" "b/src/michaelmoss/images/Screenshot 2026-04-01 at 11.38.30\342\200\257PM.png" new file mode 100644 index 0000000..98c186c Binary files /dev/null and "b/src/michaelmoss/images/Screenshot 2026-04-01 at 11.38.30\342\200\257PM.png" differ diff --git "a/src/michaelmoss/images/Screenshot 2026-04-01 at 11.38.32\342\200\257PM.png" "b/src/michaelmoss/images/Screenshot 2026-04-01 at 11.38.32\342\200\257PM.png" new file mode 100644 index 0000000..81f08b7 Binary files /dev/null and "b/src/michaelmoss/images/Screenshot 2026-04-01 at 11.38.32\342\200\257PM.png" differ diff --git a/src/michaelmoss/images/ember-tide-hero.svg b/src/michaelmoss/images/ember-tide-hero.svg new file mode 100644 index 0000000..04ce741 --- /dev/null +++ b/src/michaelmoss/images/ember-tide-hero.svg @@ -0,0 +1,116 @@ + \ No newline at end of file diff --git a/src/michaelmoss/index.html b/src/michaelmoss/index.html new file mode 100644 index 0000000..03ffdd9 --- /dev/null +++ b/src/michaelmoss/index.html @@ -0,0 +1,46 @@ + + +
+ + +Coastal Fire Kitchen
+Sun-drenched plates, open-air vibes, and coastal flavors that go all day.
+${item.description}
+${item.price}
+ `; + + menuDisplay.appendChild(menuItem); + }); +} + +displayMenu("breakfast"); +buttons[0].classList.add("active"); + +buttons.forEach(button => { + button.addEventListener("click", function () { + buttons.forEach(btn => btn.classList.remove("active")); + button.classList.add("active"); + + const selectedCategory = button.dataset.category; + displayMenu(selectedCategory); + }); +}); diff --git a/src/michaelmoss/style.css b/src/michaelmoss/style.css new file mode 100644 index 0000000..24a1dfa --- /dev/null +++ b/src/michaelmoss/style.css @@ -0,0 +1,318 @@ +:root { + --bg: #0f1a22; + --bg-soft: #162733; + --surface: rgba(247, 238, 224, 0.95); + --surface-strong: #fff8ed; + --text: #1c1b19; + --muted: #655d57; + --accent: #cb6b2f; + --accent-deep: #923f21; + --sea: #2d7c88; + --gold: #d9b15f; + --shadow: 0 20px 50px rgba(4, 13, 19, 0.24); + --radius-lg: 28px; + --radius-md: 18px; +} + +* { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +body { + font-family: "Manrope", sans-serif; + background: + radial-gradient(circle at top, rgba(217, 177, 95, 0.18), transparent 30%), + linear-gradient(180deg, #152531 0%, #0f1a22 45%, #1e2c36 100%); + color: #f8f2e9; + line-height: 1.6; + padding: 24px; + min-height: 100vh; +} + +body::before { + content: ""; + position: fixed; + inset: 0; + background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px); + background-size: 36px 36px; + opacity: 0.2; + pointer-events: none; + mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 85%); +} + +.hero, +.menu-section { + position: relative; + z-index: 1; + max-width: 1180px; + margin: 0 auto; +} + +.hero { + display: grid; + grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr); + gap: 28px; + align-items: center; + padding: 32px; + margin-bottom: 26px; + border: 1px solid rgba(255, 255, 255, 0.1); + border-radius: var(--radius-lg); + background: linear-gradient(135deg, rgba(255, 248, 237, 0.12), rgba(255, 248, 237, 0.04)); + box-shadow: var(--shadow); + backdrop-filter: blur(16px); + overflow: hidden; +} + +.hero::after { + content: ""; + position: absolute; + width: 220px; + height: 220px; + right: -60px; + top: -60px; + border-radius: 50%; + background: radial-gradient(circle, rgba(203, 107, 47, 0.45), transparent 70%); +} + +.eyebrow { + font-size: 0.78rem; + letter-spacing: 0.28em; + text-transform: uppercase; + color: #f1c783; + margin-bottom: 0.9rem; +} + +.hero h1, +#menu-title { + font-family: "Cormorant Garamond", serif; + letter-spacing: 0.02em; +} + +.hero h1 { + font-size: clamp(3rem, 6vw, 5.6rem); + line-height: 0.95; + margin-bottom: 1rem; + text-wrap: balance; +} + +.hero-tagline { + max-width: 34rem; + font-size: 1.06rem; + color: rgba(248, 242, 233, 0.82); +} + +.hero-visual img { + display: block; + width: 100%; + height: auto; + border-radius: 24px; + border: 1px solid rgba(255, 255, 255, 0.16); + box-shadow: 0 16px 38px rgba(0, 0, 0, 0.25); + background: rgba(255, 255, 255, 0.08); +} + +.menu-controls { + position: relative; + z-index: 1; + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 12px; + max-width: 1180px; + margin: 0 auto 26px; +} + +.menu-btn { + padding: 0.9rem 1.15rem; + border: 1px solid rgba(255, 255, 255, 0.12); + background: rgba(255, 248, 237, 0.08); + color: #fff5e6; + border-radius: 999px; + cursor: pointer; + font-size: 0.96rem; + font-weight: 700; + letter-spacing: 0.01em; + transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, color 180ms ease; + backdrop-filter: blur(10px); +} + +.menu-btn:hover, +.menu-btn:focus-visible { + transform: translateY(-2px); + background-color: rgba(255, 248, 237, 0.18); + border-color: rgba(241, 199, 131, 0.5); + outline: none; +} + +.menu-btn.active { + background: linear-gradient(135deg, var(--gold), #f3d79b); + border-color: transparent; + color: #372616; + box-shadow: 0 10px 24px rgba(217, 177, 95, 0.22); +} + +.menu-section { + padding: 30px; + border-radius: var(--radius-lg); + background: linear-gradient(180deg, var(--surface) 0%, var(--surface-strong) 100%); + color: var(--text); + box-shadow: var(--shadow); + border: 1px solid rgba(255, 255, 255, 0.35); +} + +#menu-title { + font-size: clamp(2.3rem, 4vw, 3.4rem); + text-align: center; + margin-bottom: 0.4rem; + color: #221814; +} + +.menu-message { + min-height: 1.5rem; + text-align: center; + margin: 0 auto 1.5rem; + max-width: 42rem; + color: var(--accent-deep); + font-weight: 700; + letter-spacing: 0.01em; +} + +.menu-message:empty { + display: none; +} + +#menu-display { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); + gap: 20px; +} + +.menu-item { + position: relative; + display: flex; + flex-direction: column; + gap: 0.75rem; + padding: 22px; + border-radius: var(--radius-md); + background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 239, 228, 0.96)); + border: 1px solid rgba(203, 107, 47, 0.14); + box-shadow: 0 14px 30px rgba(34, 24, 20, 0.08); + overflow: hidden; +} + +.menu-item::before { + content: ""; + position: absolute; + inset: auto -20% -55% auto; + width: 140px; + height: 140px; + border-radius: 50%; + background: radial-gradient(circle, rgba(45, 124, 136, 0.12), transparent 70%); + pointer-events: none; +} + +.menu-item h3 { + font-family: "Cormorant Garamond", serif; + font-size: 1.8rem; + line-height: 1; + color: #261912; + margin-right: 3rem; +} + +.menu-item p { + color: var(--muted); +} + +.menu-item-header { + display: flex; + justify-content: space-between; + gap: 0.75rem; + align-items: flex-start; +} + +.badge { + flex-shrink: 0; + display: inline-flex; + align-items: center; + justify-content: center; + padding: 0.3rem 0.65rem; + border-radius: 999px; + font-size: 0.72rem; + font-weight: 800; + letter-spacing: 0.08em; + text-transform: uppercase; + color: #fffaf2; + background: var(--accent); +} + +.badge-popular { + background: linear-gradient(135deg, #cb6b2f, #9f441f); +} + +.badge-spicy { + background: linear-gradient(135deg, #c53d20, #7f1710); +} + +.badge-vegetarian { + background: linear-gradient(135deg, #5f8d3e, #335b23); +} + +.badge-chefs-choice { + background: linear-gradient(135deg, #2d7c88, #1d5561); +} + +.price { + font-weight: 800; + color: var(--accent-deep); + font-size: 1.02rem; + margin-top: auto; +} + +@media (max-width: 860px) { + body { + padding: 16px; + } + + .hero { + grid-template-columns: 1fr; + padding: 24px; + } + + .hero h1 { + font-size: clamp(2.8rem, 15vw, 4.6rem); + } + + .menu-section { + padding: 22px; + } +} + +@media (prefers-reduced-motion: no-preference) { + .hero, + .menu-item, + .menu-btn { + animation: rise-in 500ms ease both; + } + + .menu-item:nth-child(2) { + animation-delay: 60ms; + } + + .menu-item:nth-child(3) { + animation-delay: 120ms; + } +} + +@keyframes rise-in { + from { + opacity: 0; + transform: translateY(12px); + } + + to { + opacity: 1; + transform: translateY(0); + } +}