From a6c9cac9e79ff60934e919905198ea6822ecbe4a Mon Sep 17 00:00:00 2001 From: bronku Date: Sat, 7 Nov 2026 01:23:39 +0100 Subject: [PATCH 1/3] updated zed task --- .zed/tasks.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.zed/tasks.json b/.zed/tasks.json index f3a1d1e..e917514 100644 --- a/.zed/tasks.json +++ b/.zed/tasks.json @@ -1,10 +1,10 @@ [ { "label": "Run", - "command": "go generate && go run .", + "command": "go tool templ generate && go run .", "use_new_terminal": false, "allow_concurrent_runs": false, - "reveal": "never", + "reveal": "always", "shell": "system", "save": "all", }, From 0bbf9499dcec76a9fb01f83e75aeffdb6c0fd4c3 Mon Sep 17 00:00:00 2001 From: bronku Date: Sat, 7 Nov 2026 02:23:11 +0100 Subject: [PATCH 2/3] =?UTF-8?q?=C5=9Bwi=C4=99ta=20content?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/wyroby.css | 1 + css/świeta.css | 0 data/swieta.go | 16 ++++++++++++++++ html/layout.templ | 1 + html/swieta.templ | 22 ++++++++++++++++++++++ main.go | 2 ++ 6 files changed, 42 insertions(+) create mode 100644 css/świeta.css create mode 100644 data/swieta.go create mode 100644 html/swieta.templ diff --git a/css/wyroby.css b/css/wyroby.css index 6ad069e..880f014 100644 --- a/css/wyroby.css +++ b/css/wyroby.css @@ -35,6 +35,7 @@ grid-column: 1 / span 2; color: var(--on-surface); font-size: 0.875em; + white-space: pre-line; } } } diff --git a/css/świeta.css b/css/świeta.css new file mode 100644 index 0000000..e69de29 diff --git a/data/swieta.go b/data/swieta.go new file mode 100644 index 0000000..6aa79aa --- /dev/null +++ b/data/swieta.go @@ -0,0 +1,16 @@ +package data + +import "piekarnikgosipl/types" + +var Swieta = []types.Product{ + {Name: "Malinowa Chmurka", Image: "", Price: "150", Description: ""}, + {Name: "Makosernik", Image: "", Price: "150", Description: ""}, + {Name: "Rolada Makowa", Image: "", Price: "100", Description: ""}, + {Name: "Wieniec Bezowy", Image: "", Price: "150", Description: "⌀ 25cm"}, + {Name: "Torcik Piernikowy z kremem Cynamonowym", Image: "", Price: "120", Description: "⌀ 18cm"}, + {Name: "Sernik Ulubiony", Image: "", Price: "75", Description: "⌀ 21cm"}, + {Name: "Sernik Lotus", Image: "", Price: "100", Description: "⌀ 22cm"}, + {Name: "Sernik Mango-Jogurt", Image: "", Price: "120", Description: "⌀ 22cm"}, + {Name: "Mini Pavlova", Image: "", Price: "12", Description: ""}, + {Name: "Box Świąteczny", Image: "", Price: "150", Description: "¼ Sernik Cynamonowy\n¼ Sernik Nowojorski\n¼ Kostka Piernikowa z kremem Malaga i Powidłami\n¼ Kostka Świętego Mikołaja"}, +} diff --git a/html/layout.templ b/html/layout.templ index 749ba97..1197208 100644 --- a/html/layout.templ +++ b/html/layout.templ @@ -29,6 +29,7 @@ templ layout(activePage string) { @Link(activePage, "wyroby", "Wyroby") @Link(activePage, "album", "Album") @Link(activePage, "kawiarnia", "Kawiarnia") + @Link(activePage, "swieta", "Oferta świąteczna") Kontakt diff --git a/html/swieta.templ b/html/swieta.templ new file mode 100644 index 0000000..80b17c2 --- /dev/null +++ b/html/swieta.templ @@ -0,0 +1,22 @@ +package html + +import "piekarnikgosipl/types" + +templ Swieta(products []types.Product) { + @layout("swieta") { +
+
+ Boże narodzenie 2026 +

Święta smakują domowo

+

+ Tradycyjne świąteczne wypieki z naszej pracowni. Z naturalnych składników, według rodzinnych receptur. +

+
+
+ for _, product:= range products { + @card(product) + } +
+
+ } +} diff --git a/main.go b/main.go index 5365f5d..08db0fc 100644 --- a/main.go +++ b/main.go @@ -127,6 +127,7 @@ func generateHTML() { log.Println("generating html") saveFile(`index`, html.Index()) saveFile(`kawiarnia`, html.Kawiarnia()) + saveFile(`swieta`, html.Swieta(data.Swieta)) saveFile(`wyroby`, html.Wyroby(data.Cakes, "wyroby")) saveFile(`wyroby/deserki`, html.Wyroby(data.Desserts, "wyroby/deserki")) saveFile(`wyroby/torty`, html.WyrobyTorty()) @@ -149,6 +150,7 @@ func mergeStyles() { "wyroby_lody.css", "album.css", "kawiarnia.css", + "swieta.css", } var bundledCSS []byte From 142217705b270ae53ecadfbf1ff1e0a5af72005a Mon Sep 17 00:00:00 2001 From: bronku Date: Sat, 7 Nov 2026 02:42:17 +0100 Subject: [PATCH 3/3] =?UTF-8?q?=C5=9Awi=C4=99ta=20css?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/swieta.css | 34 ++++++++++++++++++++++++++++++++++ css/świeta.css | 0 html/swieta.templ | 5 +++-- 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 css/swieta.css delete mode 100644 css/świeta.css diff --git a/css/swieta.css b/css/swieta.css new file mode 100644 index 0000000..766d4ff --- /dev/null +++ b/css/swieta.css @@ -0,0 +1,34 @@ +:root { + --swieta-green: oklch(40% .08 155); + --swieta-gold: oklch(75% .12 80); +} + +#swieta { + & > header { + display: flex; + flex-direction: column; + align-items: center; + background-color: var(--swieta-green); + & p, & h1 { + color: white; + } + & span { + word-spacing: 0.5rem; + color: var(--swieta-gold); + } + border-radius: var(--border-radius); + } + + & #wyroby { + & > h2 { + grid-column: -1 / 1; + place-self: center; + } + + & .card { + & > :first-child { + display:none; + } + } + } +} diff --git a/css/świeta.css b/css/świeta.css deleted file mode 100644 index e69de29..0000000 diff --git a/html/swieta.templ b/html/swieta.templ index 80b17c2..1a42b1c 100644 --- a/html/swieta.templ +++ b/html/swieta.templ @@ -4,15 +4,16 @@ import "piekarnikgosipl/types" templ Swieta(products []types.Product) { @layout("swieta") { -
+
- Boże narodzenie 2026 + ✦ BOŻE NARODZENIE 2026 ✦

Święta smakują domowo

Tradycyjne świąteczne wypieki z naszej pracowni. Z naturalnych składników, według rodzinnych receptur.

+

Święteczne Słodkości

for _, product:= range products { @card(product) }