{{ .Title }}
+ +{{ .Summary }}
+From 4d3ca1c5545d46db59db4b05fbee4232b067ddc1 Mon Sep 17 00:00:00 2001 From: pika <67532734+pik4li@users.noreply.github.com> Date: Sat, 4 Jan 2025 02:40:01 +0100 Subject: [PATCH] . --- assets/css/main.css | 61 + assets/js/menu.js | 44 + assets/js/opening-status.js | 95 + layouts/404.html | 60 + layouts/_default/baseof.html | 26 + layouts/_default/check-open-status.json | 5 + layouts/_default/list.html | 12 + layouts/_default/single.html | 9 + layouts/_default/single.json | 5 + layouts/about/about.html | 105 + layouts/en/about/about.html | 105 + layouts/en/index.html | 25 + layouts/index.html | 26 + layouts/partials/check-open-status.html | 32 + .../components/language-switcher.html | 13 + .../partials/components/theme-switcher.html | 70 + layouts/partials/footer.html | 27 + layouts/partials/head.html | 1 + layouts/partials/header.html | 161 ++ layouts/partials/logo.html | 5 + layouts/partials/menu-card.html | 180 ++ layouts/partials/opening-hours.html | 83 + layouts/partials/price-table.html | 5 + static/css/style.css | 1760 +++++++++++++++++ static/icons/de.svg | 5 + static/icons/gb.svg | 11 + static/images/logo.webp | Bin 0 -> 85984 bytes static/images/pizza-aussen.webp | Bin 0 -> 302886 bytes static/images/pizza-innen.webp | Bin 0 -> 75042 bytes static/images/pizza.webp | Bin 0 -> 589476 bytes static/images/team/Daisy.webp | Bin 0 -> 12172 bytes static/images/team/Luigi.webp | Bin 0 -> 61682 bytes static/images/team/Wario.webp | Bin 0 -> 103790 bytes static/js/header.js | 38 + static/js/language.js | 23 + static/js/main.js | 274 +++ static/js/menu.js | 29 + static/js/opening-status.js | 49 + static/js/theme.js | 42 + 39 files changed, 3386 insertions(+) create mode 100644 assets/css/main.css create mode 100644 assets/js/menu.js create mode 100644 assets/js/opening-status.js create mode 100644 layouts/404.html create mode 100644 layouts/_default/baseof.html create mode 100644 layouts/_default/check-open-status.json create mode 100644 layouts/_default/list.html create mode 100644 layouts/_default/single.html create mode 100644 layouts/_default/single.json create mode 100644 layouts/about/about.html create mode 100644 layouts/en/about/about.html create mode 100644 layouts/en/index.html create mode 100644 layouts/index.html create mode 100644 layouts/partials/check-open-status.html create mode 100644 layouts/partials/components/language-switcher.html create mode 100644 layouts/partials/components/theme-switcher.html create mode 100644 layouts/partials/footer.html create mode 100644 layouts/partials/head.html create mode 100644 layouts/partials/header.html create mode 100644 layouts/partials/logo.html create mode 100644 layouts/partials/menu-card.html create mode 100644 layouts/partials/opening-hours.html create mode 100644 layouts/partials/price-table.html create mode 100644 static/css/style.css create mode 100644 static/icons/de.svg create mode 100644 static/icons/gb.svg create mode 100644 static/images/logo.webp create mode 100644 static/images/pizza-aussen.webp create mode 100644 static/images/pizza-innen.webp create mode 100644 static/images/pizza.webp create mode 100644 static/images/team/Daisy.webp create mode 100644 static/images/team/Luigi.webp create mode 100644 static/images/team/Wario.webp create mode 100644 static/js/header.js create mode 100644 static/js/language.js create mode 100644 static/js/main.js create mode 100644 static/js/menu.js create mode 100644 static/js/opening-status.js create mode 100644 static/js/theme.js diff --git a/assets/css/main.css b/assets/css/main.css new file mode 100644 index 0000000..6343b61 --- /dev/null +++ b/assets/css/main.css @@ -0,0 +1,61 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +@layer base { + :root { + --primary-color: theme('colors.primary.DEFAULT'); + --accent-color: theme('colors.accent.DEFAULT'); + --text-color: theme('colors.gray.800'); + --background-color: theme('colors.white'); + --card-background: theme('colors.white'); + --header-background: theme('colors.white'); + } + + .dark { + --primary-color: theme('colors.primary.400'); + --accent-color: theme('colors.accent.400'); + --text-color: theme('colors.gray.200'); + --background-color: theme('colors.gray.900'); + --card-background: theme('colors.gray.800'); + --header-background: theme('colors.gray.900'); + } +} + +@keyframes slideInLeft { + from { + transform: translateX(-100%); + opacity: 0; + } + to { + transform: translateX(0); + opacity: 1; + } +} + +@keyframes slideInRight { + from { + transform: translateX(100%); + opacity: 0; + } + to { + transform: translateX(0); + opacity: 1; + } +} + +.slide-in-left { + animation: slideInLeft 1s ease-out forwards; +} + +.slide-in-right { + animation: slideInRight 1s ease-out forwards; +} + +.scrollbar-hide::-webkit-scrollbar { + display: none; +} +.scrollbar-hide { + -ms-overflow-style: none; + scrollbar-width: none; +} \ No newline at end of file diff --git a/assets/js/menu.js b/assets/js/menu.js new file mode 100644 index 0000000..1d902a4 --- /dev/null +++ b/assets/js/menu.js @@ -0,0 +1,44 @@ +document.addEventListener('DOMContentLoaded', function() { + // Menu category switching + const tabButtons = document.querySelectorAll('[data-tab]'); + const menuContents = document.querySelectorAll('.menu-content'); + + tabButtons.forEach(button => { + button.addEventListener('click', () => { + const targetId = `${button.dataset.tab}-content`; + + // Update button styles + tabButtons.forEach(btn => { + const isActive = btn === button; + btn.classList.toggle('bg-pizza-red', isActive); + btn.classList.toggle('text-white', isActive); + btn.classList.toggle('bg-gray-200', !isActive); + btn.classList.toggle('dark:bg-pizza-darker', !isActive); + btn.classList.toggle('text-gray-700', !isActive); + btn.classList.toggle('dark:text-white', !isActive); + }); + + // Show/hide content + menuContents.forEach(content => { + content.classList.toggle('hidden', content.id !== targetId); + }); + }); + }); + + // Pizza price group toggles + const priceGroupHeaders = document.querySelectorAll('.price-group-header'); + priceGroupHeaders.forEach(header => { + header.addEventListener('click', () => { + const content = header.nextElementSibling; + const arrow = header.querySelector('svg'); + + // Toggle content visibility + content.classList.toggle('hidden'); + + // Rotate arrow + arrow.style.transform = content.classList.contains('hidden') + ? 'rotate(0deg)' + : 'rotate(180deg)'; + }); + }); +}); \ No newline at end of file diff --git a/assets/js/opening-status.js b/assets/js/opening-status.js new file mode 100644 index 0000000..6856188 --- /dev/null +++ b/assets/js/opening-status.js @@ -0,0 +1,95 @@ +function updateTimeAndStatus() { + const now = new Date(); + const timeString = now.toLocaleTimeString('de-DE', { + hour: '2-digit', + minute: '2-digit', + hour12: false + }); + + // Update time display + const timeDisplay = document.getElementById('current-time'); + if (timeDisplay) { + timeDisplay.textContent = timeString; + } + + fetch('/api/check-open-status') + .then(response => response.json()) + .then(status => { + const statusBar = document.getElementById('status-bar'); + const statusText = document.getElementById('status-text'); + const deliveryText = document.querySelector('.delivery-text'); + + if (statusBar && statusText) { + statusBar.className = status.isOpen + ? 'bg-status-green transition-colors duration-300' + : 'bg-status-red transition-colors duration-300'; + + const textOpen = statusText.dataset.textOpen; + const textClosed = statusText.dataset.textClosed; + statusText.textContent = status.isOpen ? textOpen : textClosed; + } + + // Debug information + const debugInfo = document.getElementById('debug-info'); + if (debugInfo && !status.isOpen) { + const nextOpen = document.getElementById('next-open'); + const currentDay = document.getElementById('current-day'); + + if (currentDay) { + currentDay.textContent = now.toLocaleDateString('de-DE', { weekday: 'long' }); + } + + if (nextOpen) { + const hoursRows = document.querySelectorAll('.hours-row'); + let nextOpenTime = null; + let foundToday = false; + + // First check today's remaining times + hoursRows.forEach(row => { + if (row.dataset.day === status.currentDay) { + const openTime = row.dataset.open; + if (openTime > timeString) { + nextOpenTime = `Today at ${openTime}`; + foundToday = true; + } + } + }); + + // If no times found today, find next day's opening + if (!foundToday) { + hoursRows.forEach(row => { + const dayIndex = parseInt(row.dataset.dayIndex || 0); + const currentDayIndex = now.getDay(); + + if (dayIndex > currentDayIndex || (dayIndex === 0 && currentDayIndex !== 0)) { + const openTime = row.dataset.open; + const dayName = row.dataset.dayName; + if (!nextOpenTime) { + nextOpenTime = `${dayName} at ${openTime}`; + } + } + }); + } + + nextOpen.textContent = nextOpenTime || 'Check opening hours'; + } + } + + // Update other elements + if (deliveryText) { + deliveryText.className = status.isOpen + ? 'delivery-text text-status-green' + : 'delivery-text text-status-red'; + } + + document.querySelectorAll('.hours-row').forEach(row => { + const isCurrentDay = row.dataset.day === status.currentDay; + row.classList.toggle('border-2', isCurrentDay && status.isOpen); + row.classList.toggle('border-status-green', isCurrentDay && status.isOpen); + }); + }); +} + +// Update immediately and then every minute +updateTimeAndStatus(); +setInterval(updateTimeAndStatus, 60000); \ No newline at end of file diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..29c103e --- /dev/null +++ b/layouts/404.html @@ -0,0 +1,60 @@ +{{ define "main" }} +
+ {{ i18n "404_oops" | default "Oops! Looks like this slice is missing!" }} +
+ ++ {{ i18n "404_text" | default "The page you're looking for has been eaten or never existed." }} +
+ + +{{ .Summary }}
+{{ .Site.Data.about.hero.description }}
++ {{ .Site.Data.about.story.content }} +
++ {{ .Site.Data.about.team.description }} +
+{{ .role }}
++ {{ .description }} +
++ + {{ .Site.Data.about.contact.address }} +
++ + {{ .Site.Params.contact.phone }} +
+{{ .Site.Data.en.about.hero.description }}
++ {{ .Site.Data.en.about.story.content }} +
++ {{ .Site.Data.en.about.team.description }} +
+{{ .role }}
++ {{ .description }} +
++ + {{ .Site.Data.en.about.contact.address }} +
++ + {{ .Site.Params.contact.phone }} +
+!WB&2HNzey4^ikPCHGjO&|THuz{;;1e_e3HH@H`x1N9y%mKA|HEq9UJDn1hvNNd
zkrTPmi7sD11J$_2ALh-@xF)H&l>Z5HWXPk{cIsA)AG*^bWq9Gh94?oakIA-xY8Cx@
z>!=Q<=p*OMXJ%h%&CSK3$<>vVL>FQzW~XNE>M&)E-5@@2a#G$kYE!d;kN3!oT%v8z
z*pmmJ3NKIXKs_9Si1Whe1b2F#MwJiyii+RpUWF~DgwM*P81%Zk@ip0^qr}6eKbcCE
zClll~C|+eNu;5z?fb-a4HGE>@cYSw}F{fnxH5&qRXW|kW8MTG-{UiH#GZvV23)j)C
znhH=%L*~m$6irNWwZ`FzJ-lm1SLp!&*s_dnb0j&r8II>M-cf380G>+xvG4H*cf3aUy
zj|IksBVD6l)YWVgXMT?JlZ62-_6-azhWQ{PD74lGQ}S)rxj^br-y6M)`Kr5`4Cg$*M3CRRzeUE(F@Z#