Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
142217705b | ||
|
|
0bbf9499dc | ||
|
|
a6c9cac9e7 |
7 changed files with 79 additions and 2 deletions
|
|
@ -1,10 +1,10 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"label": "Run",
|
"label": "Run",
|
||||||
"command": "go generate && go run .",
|
"command": "go tool templ generate && go run .",
|
||||||
"use_new_terminal": false,
|
"use_new_terminal": false,
|
||||||
"allow_concurrent_runs": false,
|
"allow_concurrent_runs": false,
|
||||||
"reveal": "never",
|
"reveal": "always",
|
||||||
"shell": "system",
|
"shell": "system",
|
||||||
"save": "all",
|
"save": "all",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
34
css/swieta.css
Normal file
34
css/swieta.css
Normal file
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -35,6 +35,7 @@
|
||||||
grid-column: 1 / span 2;
|
grid-column: 1 / span 2;
|
||||||
color: var(--on-surface);
|
color: var(--on-surface);
|
||||||
font-size: 0.875em;
|
font-size: 0.875em;
|
||||||
|
white-space: pre-line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
16
data/swieta.go
Normal file
16
data/swieta.go
Normal file
|
|
@ -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"},
|
||||||
|
}
|
||||||
|
|
@ -29,6 +29,7 @@ templ layout(activePage string) {
|
||||||
@Link(activePage, "wyroby", "Wyroby")
|
@Link(activePage, "wyroby", "Wyroby")
|
||||||
@Link(activePage, "album", "Album")
|
@Link(activePage, "album", "Album")
|
||||||
@Link(activePage, "kawiarnia", "Kawiarnia")
|
@Link(activePage, "kawiarnia", "Kawiarnia")
|
||||||
|
@Link(activePage, "swieta", "Oferta świąteczna")
|
||||||
</div>
|
</div>
|
||||||
<a class="btn" href="#footer">Kontakt</a>
|
<a class="btn" href="#footer">Kontakt</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
23
html/swieta.templ
Normal file
23
html/swieta.templ
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
package html
|
||||||
|
|
||||||
|
import "piekarnikgosipl/types"
|
||||||
|
|
||||||
|
templ Swieta(products []types.Product) {
|
||||||
|
@layout("swieta") {
|
||||||
|
<main tabindex="-1" id="swieta">
|
||||||
|
<header>
|
||||||
|
<span>✦ BOŻE NARODZENIE 2026 ✦</span>
|
||||||
|
<h1>Święta smakują domowo</h1>
|
||||||
|
<p>
|
||||||
|
Tradycyjne świąteczne wypieki z naszej pracowni. Z naturalnych składników, według rodzinnych receptur.
|
||||||
|
</p>
|
||||||
|
</header>
|
||||||
|
<div id="wyroby" class="swieta">
|
||||||
|
<h2>Święteczne Słodkości</h2>
|
||||||
|
for _, product:= range products {
|
||||||
|
@card(product)
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
}
|
||||||
|
}
|
||||||
2
main.go
2
main.go
|
|
@ -127,6 +127,7 @@ func generateHTML() {
|
||||||
log.Println("generating html")
|
log.Println("generating html")
|
||||||
saveFile(`index`, html.Index())
|
saveFile(`index`, html.Index())
|
||||||
saveFile(`kawiarnia`, html.Kawiarnia())
|
saveFile(`kawiarnia`, html.Kawiarnia())
|
||||||
|
saveFile(`swieta`, html.Swieta(data.Swieta))
|
||||||
saveFile(`wyroby`, html.Wyroby(data.Cakes, "wyroby"))
|
saveFile(`wyroby`, html.Wyroby(data.Cakes, "wyroby"))
|
||||||
saveFile(`wyroby/deserki`, html.Wyroby(data.Desserts, "wyroby/deserki"))
|
saveFile(`wyroby/deserki`, html.Wyroby(data.Desserts, "wyroby/deserki"))
|
||||||
saveFile(`wyroby/torty`, html.WyrobyTorty())
|
saveFile(`wyroby/torty`, html.WyrobyTorty())
|
||||||
|
|
@ -149,6 +150,7 @@ func mergeStyles() {
|
||||||
"wyroby_lody.css",
|
"wyroby_lody.css",
|
||||||
"album.css",
|
"album.css",
|
||||||
"kawiarnia.css",
|
"kawiarnia.css",
|
||||||
|
"swieta.css",
|
||||||
}
|
}
|
||||||
var bundledCSS []byte
|
var bundledCSS []byte
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue