From 5e7a3c9afbcfa7342fb4c27ce139a74648990990 Mon Sep 17 00:00:00 2001 From: pika <67532734+pik4li@users.noreply.github.com> Date: Sat, 4 Jan 2025 02:29:32 +0100 Subject: [PATCH] initial commit --- .gitignore | 2 + archetypes/default.md | 4 ++ content/about/_index.md | 5 +++ content/en/_index.md | 4 ++ content/en/about/_index.md | 6 +++ hugo.toml | 73 ++++++++++++++++++++++++++++++++++ i18n/de.yaml | 52 ++++++++++++++++++++++++ i18n/en.yaml | 48 ++++++++++++++++++++++ layouts/check-open-status.json | 5 +++ package.json | 21 ++++++++++ postcss.config.js | 6 +++ static/robots.txt | 2 + tailwind.config.js | 35 ++++++++++++++++ 13 files changed, 263 insertions(+) create mode 100644 .gitignore create mode 100644 archetypes/default.md create mode 100644 content/about/_index.md create mode 100644 content/en/_index.md create mode 100644 content/en/about/_index.md create mode 100644 hugo.toml create mode 100644 i18n/de.yaml create mode 100644 i18n/en.yaml create mode 100644 layouts/check-open-status.json create mode 100644 package.json create mode 100644 postcss.config.js create mode 100644 static/robots.txt create mode 100644 tailwind.config.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b6d846a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +public +node_modules diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..72d6c92 --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,4 @@ ++++ +date = '{{ .Date }}' +title = '{{ replace .File.ContentBaseName "-" " " | title }}' ++++ diff --git a/content/about/_index.md b/content/about/_index.md new file mode 100644 index 0000000..8edf968 --- /dev/null +++ b/content/about/_index.md @@ -0,0 +1,5 @@ +--- +title: "About us" +description: "Learn more about our pizza history" +layout: "about" +--- \ No newline at end of file diff --git a/content/en/_index.md b/content/en/_index.md new file mode 100644 index 0000000..13821a2 --- /dev/null +++ b/content/en/_index.md @@ -0,0 +1,4 @@ +--- +title: "Pizza Restaurant" +description: "Authentic Italian Pizza" +--- \ No newline at end of file diff --git a/content/en/about/_index.md b/content/en/about/_index.md new file mode 100644 index 0000000..1d5102e --- /dev/null +++ b/content/en/about/_index.md @@ -0,0 +1,6 @@ +--- +title: "About us" +description: "Learn more about our pizza history" +layout: "about" +--- + diff --git a/hugo.toml b/hugo.toml new file mode 100644 index 0000000..c3bc462 --- /dev/null +++ b/hugo.toml @@ -0,0 +1,73 @@ +baseURL = "https://pizza.k4li.me" +languageCode = "de-de" +title = "PizzaTheme" +theme = "mytheme" +defaultContentLanguageInSubdir = false +defaultContentLanguage = "de" + +[languages] + [languages.de] + languageCode = "de-DE" + languageName = "Deutsch" + weight = 1 + title = "Pizza Restaurant" + contentDir = "content" + [languages.de.menu] + [[languages.de.menu.main]] + name = "Zuhause" + url = "/" + weight = 1 + [[languages.de.menu.main]] + name = "Menü" + url = "/#menu-section" + weight = 2 + [[languages.de.menu.main]] + name = "Über uns" + url = "/about" + weight = 3 + + [languages.en] + languageCode = "en-US" + languageName = "English" + weight = 2 + title = "Pizza Restaurant" + contentDir = "content/en" + [languages.en.menu] + [[languages.en.menu.main]] + name = "Home" + url = "/en/" + weight = 1 + [[languages.en.menu.main]] + name = "Menu" + url = "#menu-section" + weight = 2 + [[languages.en.menu.main]] + name = "About" + url = "/en/about" + weight = 3 + +[markup] + [markup.goldmark] + [markup.goldmark.renderer] + unsafe = true + +[params] + debug = false # Set to false in production + [params.languageDetection] + enable = true + + [params.contact] + # phone = "073194059115" + phone = "+49 17632169460" + # email = "orders@mrbean.pizza" + +[outputs] + home = ["HTML", "RSS", "Sitemap", "JSON"] +# page = ["HTML", "JSON"] +# section = ["HTML", "JSON"] + +# [outputFormats] +# [outputFormats.JSON] +# mediaType = "application/json" +# baseName = "index" +# isPlainText = true diff --git a/i18n/de.yaml b/i18n/de.yaml new file mode 100644 index 0000000..151476e --- /dev/null +++ b/i18n/de.yaml @@ -0,0 +1,52 @@ +- id: "Monday" + translation: "Montag" +- id: "Tuesday" + translation: "Dienstag" +- id: "Wednesday" + translation: "Mittwoch" +- id: "Thursday" + translation: "Donnerstag" +- id: "Friday" + translation: "Freitag" +- id: "Saturday" + translation: "Samstag" +- id: "Sunday" + translation: "Sonntag" +- id: "menu" + translation: "Speisekarte" +- id: "about" + translation: "Über uns" +- id: "time_suffix" + translation: "" +- id: "delivery_until" + translation: "Lieferung bis" +- id: "currently_open" + translation: "Jetzt geöffnet" +- id: "currently_closed" + translation: "Geschlossen" +- id: "closed" + translation: "Geschlossen" +- id: "open" + translation: "Geöffnet" +- id: "open_text" + translation: "Geöffnet" +- id: "closed_text" + translation: "Geschlossen" +- id: "Hollidays" + translation: "Feiertage" +- id: opening_hours + translation: "Öffnungszeiten" +- id: 404_oops + translation: "Oops! Seite nicht gefunden" +- id: 404_text + translation: "Die gesuchte Seite existiert leider nicht. Sie wurde möglicherweise verschoben oder gelöscht." +- id: 404_back_home + translation: "Zurück zur Startseite" +- id: call_now + translation: "Jetzt anrufen" +- id: price_small_large + translation: "Klein/Groß" +- id: portion_small + translation: "Klein" +- id: portion_large + translation: "Groß" \ No newline at end of file diff --git a/i18n/en.yaml b/i18n/en.yaml new file mode 100644 index 0000000..7be902f --- /dev/null +++ b/i18n/en.yaml @@ -0,0 +1,48 @@ +- id: "Monday" + translation: "Monday" +- id: "Tuesday" + translation: "Tuesday" +- id: "Wednesday" + translation: "Wednesday" +- id: "Thursday" + translation: "Thursday" +- id: "Friday" + translation: "Friday" +- id: "Saturday" + translation: "Saturday" +- id: "Sunday" + translation: "Sunday" +- id: "menu" + translation: "Menu" +- id: "about" + translation: "About" +- id: "time_suffix" + translation: "" +- id: "delivery_until" + translation: "Delivery until" +- id: "currently_open" + translation: "Currently Open" +- id: "currently_closed" + translation: "Currently Closed" +- id: "closed" + translation: "Closed" +- id: "open" + translation: "Open" +- id: opening_hours + translation: "Opening Hours" +- id: Hollidays + translation: "Holidays" +- id: 404_oops + translation: "Oops! Page Not Found" +- id: 404_text + translation: "The page you are looking for doesn't exist. It may have been moved or deleted." +- id: 404_back_home + translation: "Back to Home" +- id: call_now + translation: "Call Now" +- id: price_small_large + translation: "Small/Large" +- id: portion_small + translation: "Small" +- id: portion_large + translation: "Large" \ No newline at end of file diff --git a/layouts/check-open-status.json b/layouts/check-open-status.json new file mode 100644 index 0000000..7f56fc6 --- /dev/null +++ b/layouts/check-open-status.json @@ -0,0 +1,5 @@ +{ + "isOpen": {{ $status := partial "check-open-status.html" . }}{{ $status.isOpen }}, + "currentDay": "{{ now.Format "Monday" }}", + "currentTime": "{{ now.Format "15:04" }}" +} \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..d10b5e8 --- /dev/null +++ b/package.json @@ -0,0 +1,21 @@ +{ + "name": "owncraft", + "version": "1.0.0", + "description": "OwnCraft Pizza Website", + "scripts": { + "install:all": "npm install && hugo", + "dev": "concurrently \"npm run hugo:dev\" \"npm run tailwind:dev\"", + "build": "npm run tailwind:build && hugo --minify", + "hugo:dev": "hugo server -D --disableFastRender", + "tailwind:dev": "tailwindcss -i ./themes/mytheme/assets/css/main.css -o ./themes/mytheme/static/css/style.css --watch", + "tailwind:build": "tailwindcss -i ./themes/mytheme/assets/css/main.css -o ./themes/mytheme/static/css/style.css --minify", + "clean": "rm -rf public resources", + "deploy": "npm run clean && npm run build" + }, + "dependencies": { + "autoprefixer": "^10.4.14", + "concurrently": "^8.0.1", + "postcss": "^8.4.23", + "tailwindcss": "^3.3.2" + } +} diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..0cc9a9d --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} \ No newline at end of file diff --git a/static/robots.txt b/static/robots.txt new file mode 100644 index 0000000..6c81084 --- /dev/null +++ b/static/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: /api/ \ No newline at end of file diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..feffc0d --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,35 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: ["./themes/mytheme/**/*.{html,js}"], + darkMode: 'class', + theme: { + extend: { + colors: { + pizza: { + red: '#ff3850', + dark: '#1a1d24', + darker: '#15171c', + gray: '#9ca3af', + light: '#f3f4f6', + }, + status: { + green: '#10b981', + red: '#ef4444', + } + }, + animation: { + 'spin-slow': 'spin 8s linear infinite', + 'bounce-subtle': 'bounce 2s infinite', + 'drive-by': 'driveBy 10s linear infinite', + }, + keyframes: { + driveBy: { + '0%': { transform: 'translateX(-200%)' }, + '100%': { transform: 'translateX(200%)' } + } + } + }, + }, + plugins: [], +} +