diff --git a/.dev b/.dev index 8a7febe..a27048d 100755 --- a/.dev +++ b/.dev @@ -1 +1 @@ -cd www && python3 -m http.server 8000 +go run . && cd www && python3 -m http.server 8000 diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..081fe7f --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module piekarnikgosi + +go 1.26.2 diff --git a/main.go b/main.go new file mode 100644 index 0000000..20c4b46 --- /dev/null +++ b/main.go @@ -0,0 +1,47 @@ +package main + +import ( + "html/template" + "os" +) + +func saveFile(t *template.Template, name string) { + file, err := os.Create("www/" + name + ".html") + if err != nil { + panic(err) + } + defer file.Close() + err = t.ExecuteTemplate(file, name+".gohtml", nil) + if err != nil { + panic(err) + } +} + +func generateHTML() { + t, err := template.ParseGlob(`templates/*.gohtml`) + if err != nil { + panic(err) + } + saveFile(t, `index`) + saveFile(t, `kawiarnia`) + saveFile(t, `portfolio`) + saveFile(t, `wyroby`) + saveFile(t, `wyroby_torty`) +} + +func main() { + generateHTML() + t, err := template.ParseGlob(`templates/styles/*.css`) + if err != nil { + panic(err) + } + file, err := os.Create("www/styles/style.css") + if err != nil { + panic(err) + } + defer file.Close() + err = t.ExecuteTemplate(file, "style.css", nil) + if err != nil { + panic(err) + } +} diff --git a/templates/footer.gohtml b/templates/footer.gohtml new file mode 100644 index 0000000..993a213 --- /dev/null +++ b/templates/footer.gohtml @@ -0,0 +1,92 @@ +{{define "footer"}} + + +{{end}} \ No newline at end of file diff --git a/templates/header.gohtml b/templates/header.gohtml new file mode 100644 index 0000000..b1c6573 --- /dev/null +++ b/templates/header.gohtml @@ -0,0 +1,25 @@ +{{define "header"}} + + + + + Piekarnik Gosi + + + + + + + +{{end}} \ No newline at end of file diff --git a/templates/portfolio.gohtml b/templates/portfolio.gohtml new file mode 100644 index 0000000..1d74e3a --- /dev/null +++ b/templates/portfolio.gohtml @@ -0,0 +1,16 @@ +{{template "header" "portfolio"}} +
+
+
+

Nasze Słodkie Realizacje

+

Galeria pasji uwieczniona w kremie i dekoracjach. Zobacz wybrane projekty, które uświetniły wyjątkowe chwile naszych klientów – od bajkowych tortów dla dzieci po eleganckie torty weselne.

+
+
+ Ciasta + Torty + Slodkie stoły + Lody +
+
+
+{{template "footer"}} \ No newline at end of file diff --git a/www/styles/base.css b/templates/styles/base.css similarity index 100% rename from www/styles/base.css rename to templates/styles/base.css diff --git a/www/styles/components.css b/templates/styles/components.css similarity index 100% rename from www/styles/components.css rename to templates/styles/components.css diff --git a/www/styles/home.css b/templates/styles/home.css similarity index 100% rename from www/styles/home.css rename to templates/styles/home.css diff --git a/www/styles/kawiarnia.css b/templates/styles/kawiarnia.css similarity index 100% rename from www/styles/kawiarnia.css rename to templates/styles/kawiarnia.css diff --git a/www/styles/layout.css b/templates/styles/layout.css similarity index 100% rename from www/styles/layout.css rename to templates/styles/layout.css diff --git a/www/styles/normalize.css b/templates/styles/normalize.css similarity index 100% rename from www/styles/normalize.css rename to templates/styles/normalize.css diff --git a/www/styles/portfolio.css b/templates/styles/portfolio.css similarity index 100% rename from www/styles/portfolio.css rename to templates/styles/portfolio.css diff --git a/templates/styles/style.css b/templates/styles/style.css new file mode 100644 index 0000000..79f56dc --- /dev/null +++ b/templates/styles/style.css @@ -0,0 +1,9 @@ +{{template "normalize.css"}} +{{template "base.css"}} +{{template "components.css"}} +{{template "home.css"}} +{{template "layout.css"}} +{{template "wyroby.css"}} +{{template "wyroby_torty.css"}} +{{template "portfolio.css"}} +{{template "kawiarnia.css"}} \ No newline at end of file diff --git a/www/styles/wyroby.css b/templates/styles/wyroby.css similarity index 100% rename from www/styles/wyroby.css rename to templates/styles/wyroby.css diff --git a/www/styles/wyroby_torty.css b/templates/styles/wyroby_torty.css similarity index 100% rename from www/styles/wyroby_torty.css rename to templates/styles/wyroby_torty.css diff --git a/templates/wyroby.gohtml b/templates/wyroby.gohtml new file mode 100644 index 0000000..371953c --- /dev/null +++ b/templates/wyroby.gohtml @@ -0,0 +1,164 @@ +{{template "header" "wyroby"}} +
+ +
+
+ +
+
+ Malinowa chmurka +
+
+

Malinowa chmurka

+ 150zł +

kruchy spód, warstwa malin w galaretce, krem śmietankowy, beza

+
+
+
+
+ Sernik ulubiony +
+
+

Sernik ulubiony

+ 150zł +

kruchy spód, aksamitna masa serowa, beza z kruszonką

+
+
+
+
+ Jabłecznik z kruszonką +
+
+

Jabłecznik z kruszonką

+ 130zł +

ciasto ucierane, jabłka, kruszonka

+
+
+
+
+ Sernik klasyczny +
+
+

Sernik klasyczny

+ 150zł +

wykończony czekoladowym ganache lub oprószony cukrem pudrem

+
+
+
+
+ Sernik królewski +
+
+

Sernik królewski

+ 150zł +

kakaowy spód i kruszonka, wilgotna masa serowa

+
+
+
+
+ Pleśniak +
+
+

Pleśniak

+ 120zł +

kruche ciasto waniliowe, powidła owocowe, kruche ciasto kakaowe, beza i kruszonka

+
+
+
+
+ Leśny mech z musem truskawkowym +
+
+

Leśny mech z musem truskawkowym

+ 110zł +

biszkoptowe ciasto z dodatkiem szpinaku, mus truskawkowy

+
+
+
+
+ Snickers +
+
+

Snickers

+ 150zł +

dwie warstwy kakaowego biszkoptu a pomiędzy bezowy blat orzechowy , krem budyniowy , toffi i + orzeszki ziemne

+
+
+
+
+ Mleczna kanapka +
+
+

Mleczna kanapka

+ 120zł +

dwa blaty czekoladowego ciasta, a pomiędzy krem waniliowy z dodatkiem cienkiej warstwy + czekoladowej

+
+
+
+
+ 3Bit +
+
+

3Bit

+ 120zł +

herbatniki, krem budyniowy, toffi i śmietana

+
+
+
+
+ Biszkoptowe z kremem i owocami w galaretce +
+
+

Biszkoptowe z kremem i owocami w galaretce

+ 120zł +

biszkopt, krem budyniowy, owoce

+
+
+
+
+ Kora orzechowa +
+
+

Kora orzechowa

+ 150zł +

dwa blaty bezy orzechowej a pomiędzy krem budyniowy na bazie soku z brzoskwiń, delicje + pomarańczowe, owoce brzoskwiń i galaretka

+
+
+
+
+ Nutelowiec z wiśniami +
+
+

Nutelowiec z wiśniami

+ 120zł +

nutelowy spód , krem śmietankowy z dodatkiem twarożku, wiśnie i galaretka

+
+
+
+
+ Karpatka +
+
+

Karpatka

+ 120zł +

+
+
+
+
+
+{{template "footer"}} \ No newline at end of file diff --git a/www/index.html b/www/index.html index 5009dae..4ccf70b 100644 --- a/www/index.html +++ b/www/index.html @@ -1,3 +1,4 @@ + @@ -14,20 +15,21 @@ logo
Strona Główna - Wyroby - Portfolio - Kawiarnia + Wyroby + Portfolio + Kawiarnia
Kontakt +

Słodkości tworzone z pasją

Naturalne składniki, domowe receptury i pasja. Tworzymy torty i wypieki na Twoje najważniejsze chwile - od codziennych radości po wielkie uroczystości

- Zobacz naszą ofertę + Zobacz naszą ofertę
tort @@ -160,6 +162,7 @@
+