templ start

This commit is contained in:
bronkuu 2026-05-27 13:40:32 +02:00
parent c2caf1d284
commit 24722ee61c
7 changed files with 598 additions and 171 deletions

5
go.mod
View file

@ -2,7 +2,4 @@ module piekarnikgosi
go 1.26.2 go 1.26.2
require ( require github.com/a-h/templ v0.3.1020
github.com/adrium/goheif v0.0.0-20230113233934-ca402e77a786 // indirect
github.com/vegidio/avif-go v0.0.0-20260318201954-49ee16a82be7 // indirect
)

8
go.sum
View file

@ -1,4 +1,4 @@
github.com/adrium/goheif v0.0.0-20230113233934-ca402e77a786 h1:zvgtcRb2B5gynWjm+Fc9oJZPHXwmcgyH0xCcNm6Rmo4= github.com/a-h/templ v0.3.1020 h1:ypAT/L5ySWEnZ6Zft/5yfoWXYYkhFNvEFOeeqecg4tw=
github.com/adrium/goheif v0.0.0-20230113233934-ca402e77a786/go.mod h1:aKVJoQ0cc9K5Xb058XSnnAxXLliR97qbSqWBlm5ca1E= github.com/a-h/templ v0.3.1020/go.mod h1:A2DlK61v+K+NRoGnhmYbNYVmtYHcFO5/AisMvBdDxTM=
github.com/vegidio/avif-go v0.0.0-20260318201954-49ee16a82be7 h1:TAgtdm0s/kM05YdoV3/hqz6ApHHtozxdKl5hdJ6YxqQ= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/vegidio/avif-go v0.0.0-20260318201954-49ee16a82be7/go.mod h1:/ITCFP53XCH3zFZZLLtPm3jRqsv5CMgefZl4UCuP1rs= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=

46
main.go
View file

@ -1,24 +1,15 @@
package main package main
import ( import (
"context"
"fmt" "fmt"
"html/template" "html/template"
"io"
"net/http" "net/http"
"os" "os"
"piekarnikgosi/templates"
) )
func saveFile(t *template.Template, name string, data any) {
file, err := os.Create("www/" + name + ".html")
if err != nil {
panic(err)
}
defer file.Close()
err = t.ExecuteTemplate(file, name+".gohtml", data)
if err != nil {
panic(err)
}
}
type Product struct { type Product struct {
Name string Name string
Image string Image string
@ -43,18 +34,31 @@ var Cakes = []Product{
{"Karpatka", "014", "120", ""}, {"Karpatka", "014", "120", ""},
} }
func generateHTML() { type ComponentRenderer interface {
t, err := template.ParseGlob(`templates/*.gohtml`) Render(ctx context.Context, w io.Writer) error
}
func saveFile(name string, comp ComponentRenderer) {
file, err := os.Create("www/" + name + ".html")
if err != nil { if err != nil {
panic(err) panic(err)
} }
saveFile(t, `index`, nil) defer file.Close()
saveFile(t, `kawiarnia`, nil)
saveFile(t, `portfolio`, nil) err = comp.Render(context.Background(), file)
saveFile(t, `wyroby`, Cakes) if err != nil {
saveFile(t, `wyroby_torty`, nil) panic(err)
saveFile(t, `wyroby_slodkie_stoly`, nil) }
saveFile(t, `wyroby_lody`, nil) }
func generateHTML() {
saveFile(`index`, templates.IndexPage())
// saveFile(t, `kawiarnia`, nil)
// saveFile(t, `portfolio`, nil)
// saveFile(t, `wyroby`, Cakes)
// saveFile(t, `wyroby_torty`, nil)
// saveFile(t, `wyroby_slodkie_stoly`, nil)
// saveFile(t, `wyroby_lody`, nil)
} }
func main() { func main() {

View file

@ -24,4 +24,4 @@
<a class="btn" href="#footer">Kontakt</a> <a class="btn" href="#footer">Kontakt</a>
</div> </div>
</nav> </nav>
{{end}} {{end}}

View file

@ -1,141 +0,0 @@
{{template "header" "index"}}
<main id="index">
<header>
<div>
<h1>Słodkości tworzone z <span>pasją</span></h1>
<p>Naturalne składniki, domowe receptury i pasja. Tworzymy torty i wypieki na Twoje najważniejsze chwile
- od codziennych radości po wielkie uroczystości</p>
<a href="wyroby.html" class="btn">Zobacz naszą ofertę</a>
</div>
<div>
<img alt="tort" src="images/001.avif"/>
</div>
</header>
<section id="about-us">
<div>
<div>
<div>
<img alt="kawiarnia" src="images/002.avif"/>
</div>
<div>
<img alt="kawiarnia" src="images/003.avif"/>
</div>
</div>
<div>
<span>Tradycja i serce</span>
<h2>O nas</h2>
<p>
„Piekarnik Gosi” to marzenie, które udało mi się zrealizować dzięki wsparciu i pomocy moich
najbliższych. To pracownia cukiernicza stworzona z zamiłowania do pieczenia. Tworzę z pasją, z
najwyższej jakości składników, słodkości, które uświetnią każdą uroczystość oraz spotkanie.
Wszystkie wypieki wykonuje od podstaw własnoręcznie : od biszkoptu , frużelin owocowych, chrupek ,
kremów aż po elementy dekoracyjne. W mojej ofercie znajdują się torty weselne, słodkie stoły, torty
okazjonalne, tarty i ciasta wykonywane na indywidualne zamówienia. Co wyróżnia moją pracownię?
Domowy i naturalny smak 🙂 Realizuje życzenia klientów ze starannością i pełnym zaangażowaniem.
</p>
</div>
</div>
</section>
<section id="featured-delights">
<h2>Nasze Wyroby</h2>
<div class="card">
<div>
<img alt="tort" src="images/004.avif"/>
</div>
<div>
<h3>Torty Okazjonalne</h3>
<p>Weselne, urodzinowe i te bez okazji od klasyki po nowoczesne musy.</p>
<a href="wyroby_torty.html">Przeglądaj Torty
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round" class="lucide lucide-arrow-right-icon lucide-arrow-right">
<path d="M5 12h14"/>
<path d="m12 5 7 7-7 7"/>
</svg>
</a>
</div>
</div>
<div class="card">
<div>
<img alt="ciasto" src="images/005.avif"/>
</div>
<div class="greener">
<h3>Domowe Ciasta</h3>
<p>Zapach tradycji: od serników po puszyste bezy</p>
<a href="wyroby.html">Wyberz ciasto
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round" class="lucide lucide-arrow-right-icon lucide-arrow-right">
<path d="M5 12h14"/>
<path d="m12 5 7 7-7 7"/>
</svg>
</a>
</div>
</div>
<div class="card">
<div>
<img alt="slodkosci" src="images/006.avif"/>
</div>
<div>
<h3>Słodkie Stoły</h3>
<p>Kompleksowa oprawa słodkości na większe przyjęcia.</p>
<a href="wyroby_slodkie_stoly.html">Sprawdź słodkie stoły
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round" class="lucide lucide-arrow-right-icon lucide-arrow-right">
<path d="M5 12h14"/>
<path d="m12 5 7 7-7 7"/>
</svg>
</a>
</div>
</div>
</section>
<section id="kawiarnia">
<div>
<div>
<h3>Twój drugi dom</h3>
<p>Poczuj się jak w domu. Codziennie czekają na Ciebie świeże wypieki prosto z naszej pracowni,
selekcja
najlepszych herbat i przepyszna kawa. To tutaj nasze ciasta smakują najlepiej podane z
uśmiechem, w
miejscu stworzonym z pasji do słodkości.</p>
<ul>
<li>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="lucide lucide-coffee-icon lucide-coffee">
<path d="M10 2v2"/>
<path d="M14 2v2"/>
<path d="M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1"/>
<path d="M6 2v2"/>
</svg>
<span>Miła atmosfera</span>
</li>
<li>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="lucide lucide-wifi-icon lucide-wifi">
<path d="M12 20h.01"/>
<path d="M2 8.82a15 15 0 0 1 20 0"/>
<path d="M5 12.859a10 10 0 0 1 14 0"/>
<path d="M8.5 16.429a5 5 0 0 1 7 0"/>
</svg>
<span>Darmowe wifi</span>
</li>
</ul>
</div>
<div>
<div>
<img alt="kawiarnia" src="images/007.avif"/>
</div>
<div>
<img alt="ciasto i kawa" src="images/008.avif"/>
</div>
</div>
</div>
</section>
</main>
{{template "footer"}}

375
templates/layout.templ Normal file
View file

@ -0,0 +1,375 @@
package templates
import "fmt"
templ Layout(activePage string) {
<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="UTF-8"/>
<title>Piekarnik Gosi</title>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<meta name="description" content=""/>
<link href="styles/style.css" rel="stylesheet"/>
<link rel="icon" href="images/favicon.png"/>
</head>
<body>
<nav>
<div>
<a href="index.html">
<img alt="logo" src="images/logo.png"/>
</a>
<div>
@Link(activePage, "index", "Strona Główna")
@Link(activePage, "wyroby", "Wyroby")
@Link(activePage, "portfolio", "Portfolio")
@Link(activePage, "kawiarnia", "Kawiarnia")
</div>
<a class="btn" href="#footer">Kontakt</a>
</div>
</nav>
{ children... }
<footer id="footer">
<div>
<div>
<img alt="logo" src="images/logo.png" style="width: 14rem"/>
<p>Pasja, natura i domowy smak w każdym kawałku ciasta.</p>
</div>
</div>
<div>
<h4>Lokalizacja</h4>
<ul>
<li>
<a href="https://maps.app.goo.gl/YD3DWUNKBoweKdpb7">
<div>
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="lucide lucide-map-pin-icon lucide-map-pin"
>
<path d="M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"></path>
<circle cx="12" cy="10" r="3"></circle>
</svg>
<span>Pracownia</span>
</div>
<p>
ul. Polna 7k
<br/>
83-314 Somonino
</p>
</a>
</li>
<li>
<a href="https://maps.app.goo.gl/568ax4QLJnXvqbhD9">
<div>
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="lucide lucide-map-pin-icon lucide-map-pin"
>
<path d="M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"></path>
<circle cx="12" cy="10" r="3"></circle>
</svg>
<span>Kawiarnia</span>
</div>
<p>
ul. Dworcowa 3a
<br/>
83-300 Kartuzy
</p>
</a>
</li>
</ul>
</div>
<div>
<h4>Kontakt</h4>
<ul>
<li>
<a href="https://facebook.com/piekarnikgosi">
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 48 48">
<mask id="ipSFacebook0">
<path
fill="#fff"
stroke="#fff"
stroke-linejoin="round"
stroke-width="3.8"
d="M36 12.6h-6.013c-1.086 0-1.967.88-1.967 1.967v6.9H36l-1.169 7.597h-6.81V43h-8.776V29.064H12v-7.597h7.151l.094-7.21l-.013-1.31A7.868 7.868 0 0 1 27.099 5H36v7.6Z"
></path>
</mask>
<path fill="currentColor" d="M0 0h48v48H0z" mask="url(#ipSFacebook0)"></path>
</svg>
<span>facebook.com/PiekarnikGosi</span>
</a>
</li>
<li>
<a href="https://instagram.com/piekarnikgosi">
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 24 24">
<path
fill="currentColor"
d="M17.34 5.46a1.2 1.2 0 1 0 1.2 1.2a1.2 1.2 0 0 0-1.2-1.2Zm4.6 2.42a7.59 7.59 0 0 0-.46-2.43a4.94 4.94 0 0 0-1.16-1.77a4.7 4.7 0 0 0-1.77-1.15a7.3 7.3 0 0 0-2.43-.47C15.06 2 14.72 2 12 2s-3.06 0-4.12.06a7.3 7.3 0 0 0-2.43.47a4.78 4.78 0 0 0-1.77 1.15a4.7 4.7 0 0 0-1.15 1.77a7.3 7.3 0 0 0-.47 2.43C2 8.94 2 9.28 2 12s0 3.06.06 4.12a7.3 7.3 0 0 0 .47 2.43a4.7 4.7 0 0 0 1.15 1.77a4.78 4.78 0 0 0 1.77 1.15a7.3 7.3 0 0 0 2.43.47C8.94 22 9.28 22 12 22s3.06 0 4.12-.06a7.3 7.3 0 0 0 2.43-.47a4.7 4.7 0 0 0 1.77-1.15a4.85 4.85 0 0 0 1.16-1.77a7.59 7.59 0 0 0 .46-2.43c0-1.06.06-1.4.06-4.12s0-3.06-.06-4.12ZM20.14 16a5.61 5.61 0 0 1-.34 1.86a3.06 3.06 0 0 1-.75 1.15a3.19 3.19 0 0 1-1.15.75a5.61 5.61 0 0 1-1.86.34c-1 .05-1.37.06-4 .06s-3 0-4-.06a5.73 5.73 0 0 1-1.94-.3a3.27 3.27 0 0 1-1.1-.75a3 3 0 0 1-.74-1.15a5.54 5.54 0 0 1-.4-1.9c0-1-.06-1.37-.06-4s0-3 .06-4a5.54 5.54 0 0 1 .35-1.9A3 3 0 0 1 5 5a3.14 3.14 0 0 1 1.1-.8A5.73 5.73 0 0 1 8 3.86c1 0 1.37-.06 4-.06s3 0 4 .06a5.61 5.61 0 0 1 1.86.34a3.06 3.06 0 0 1 1.19.8a3.06 3.06 0 0 1 .75 1.1a5.61 5.61 0 0 1 .34 1.9c.05 1 .06 1.37.06 4s-.01 3-.06 4ZM12 6.87A5.13 5.13 0 1 0 17.14 12A5.12 5.12 0 0 0 12 6.87Zm0 8.46A3.33 3.33 0 1 1 15.33 12A3.33 3.33 0 0 1 12 15.33Z"
></path>
</svg>
<span>instagram.com/PiekarnikGosi</span>
</a>
</li>
<li>
<a href="mailto:gosia@piekarnikgosi.pl">
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="lucide lucide-mail-icon lucide-mail"
>
<path d="m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7"></path>
<rect x="2" y="4" width="20" height="16" rx="2"></rect>
</svg>
<span>gosia@piekarnikgosi.pl</span>
</a>
</li>
<li>
<a href="tel:+48503186245">
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="lucide lucide-phone-icon lucide-phone"
>
<path d="M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384"></path>
</svg>
<span>+48 503 186 245</span>
</a>
</li>
</ul>
</div>
<p>&copy 2026 Piekarnik Gosi.</p>
</footer>
</body>
</html>
}
templ Link(activePage, targetPage, title string) {
if activePage == targetPage {
<a>{ title }</a>
} else {
<a href={ fmt.Sprint(targetPage, ".html") }>{ title }</a>
}
}
templ IndexPage() {
@Layout("index") {
<main id="index">
<header>
<div>
<h1>Słodkości tworzone z <span>pasją</span></h1>
<p>
Naturalne składniki, domowe receptury i pasja. Tworzymy torty i wypieki na Twoje najważniejsze chwile
- od codziennych radości po wielkie uroczystości
</p>
<a href="wyroby.html" class="btn">Zobacz naszą ofertę</a>
</div>
<div>
<img alt="tort" src="images/001.avif"/>
</div>
</header>
<section id="about-us">
<div>
<div>
<div>
<img alt="kawiarnia" src="images/002.avif"/>
</div>
<div>
<img alt="kawiarnia" src="images/003.avif"/>
</div>
</div>
<div>
<span>Tradycja i serce</span>
<h2>O nas</h2>
<p>
„Piekarnik Gosi” to marzenie, które udało mi się zrealizować dzięki wsparciu i pomocy moich
najbliższych. To pracownia cukiernicza stworzona z zamiłowania do pieczenia. Tworzę z pasją, z
najwyższej jakości składników, słodkości, które uświetnią każdą uroczystość oraz spotkanie.
Wszystkie wypieki wykonuje od podstaw własnoręcznie : od biszkoptu , frużelin owocowych, chrupek ,
kremów aż po elementy dekoracyjne. W mojej ofercie znajdują się torty weselne, słodkie stoły, torty
okazjonalne, tarty i ciasta wykonywane na indywidualne zamówienia. Co wyróżnia moją pracownię?
Domowy i naturalny smak 🙂 Realizuje życzenia klientów ze starannością i pełnym zaangażowaniem.
</p>
</div>
</div>
</section>
<section id="featured-delights">
<h2>Nasze Wyroby</h2>
<div class="card">
<div>
<img alt="tort" src="images/004.avif"/>
</div>
<div>
<h3>Torty Okazjonalne</h3>
<p>Weselne, urodzinowe i te bez okazji od klasyki po nowoczesne musy.</p>
<a href="wyroby_torty.html">
Przeglądaj Torty
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="lucide lucide-arrow-right-icon lucide-arrow-right"
>
<path d="M5 12h14"></path>
<path d="m12 5 7 7-7 7"></path>
</svg>
</a>
</div>
</div>
<div class="card">
<div>
<img alt="ciasto" src="images/005.avif"/>
</div>
<div class="greener">
<h3>Domowe Ciasta</h3>
<p>Zapach tradycji: od serników po puszyste bezy</p>
<a href="wyroby.html">
Wyberz ciasto
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="lucide lucide-arrow-right-icon lucide-arrow-right"
>
<path d="M5 12h14"></path>
<path d="m12 5 7 7-7 7"></path>
</svg>
</a>
</div>
</div>
<div class="card">
<div>
<img alt="slodkosci" src="images/006.avif"/>
</div>
<div>
<h3>Słodkie Stoły</h3>
<p>Kompleksowa oprawa słodkości na większe przyjęcia.</p>
<a href="wyroby_slodkie_stoly.html">
Sprawdź słodkie stoły
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="lucide lucide-arrow-right-icon lucide-arrow-right"
>
<path d="M5 12h14"></path>
<path d="m12 5 7 7-7 7"></path>
</svg>
</a>
</div>
</div>
</section>
<section id="kawiarnia">
<div>
<div>
<h3>Twój drugi dom</h3>
<p>
Poczuj się jak w domu. Codziennie czekają na Ciebie świeże wypieki prosto z naszej pracowni,
selekcja
najlepszych herbat i przepyszna kawa. To tutaj nasze ciasta smakują najlepiej podane z
uśmiechem, w
miejscu stworzonym z pasji do słodkości.
</p>
<ul>
<li>
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="lucide lucide-coffee-icon lucide-coffee"
>
<path d="M10 2v2"></path>
<path d="M14 2v2"></path>
<path d="M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1"></path>
<path d="M6 2v2"></path>
</svg>
<span>Miła atmosfera</span>
</li>
<li>
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="lucide lucide-wifi-icon lucide-wifi"
>
<path d="M12 20h.01"></path>
<path d="M2 8.82a15 15 0 0 1 20 0"></path>
<path d="M5 12.859a10 10 0 0 1 14 0"></path>
<path d="M8.5 16.429a5 5 0 0 1 7 0"></path>
</svg>
<span>Darmowe wifi</span>
</li>
</ul>
</div>
<div>
<div>
<img alt="kawiarnia" src="images/007.avif"/>
</div>
<div>
<img alt="ciasto i kawa" src="images/008.avif"/>
</div>
</div>
</div>
</section>
</main>
}
}

192
templates/layout_templ.go Normal file
View file

@ -0,0 +1,192 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.3.1020
package templates
//lint:file-ignore SA4006 This context is only used if a nested component is present.
import "github.com/a-h/templ"
import templruntime "github.com/a-h/templ/runtime"
import "fmt"
func Layout(activePage string) templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
return templ_7745c5c3_CtxErr
}
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
if templ_7745c5c3_Var1 == nil {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<!doctype html><html lang=\"pl\"><head><meta charset=\"UTF-8\"><title>Piekarnik Gosi</title><meta name=\"viewport\" content=\"width=device-width,initial-scale=1\"><meta name=\"description\" content=\"\"><link href=\"styles/style.css\" rel=\"stylesheet\"><link rel=\"icon\" href=\"images/favicon.png\"></head><body><nav><div><a href=\"index.html\"><img alt=\"logo\" src=\"images/logo.png\"></a><div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = Link(activePage, "index", "Strona Główna").Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = Link(activePage, "wyroby", "Wyroby").Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = Link(activePage, "portfolio", "Portfolio").Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = Link(activePage, "kawiarnia", "Kawiarnia").Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "</div><a class=\"btn\" href=\"#footer\">Kontakt</a></div></nav>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templ_7745c5c3_Var1.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "<footer id=\"footer\"><div><div><img alt=\"logo\" src=\"images/logo.png\" style=\"width: 14rem\"><p>Pasja, natura i domowy smak w każdym kawałku ciasta.</p></div></div><div><h4>Lokalizacja</h4><ul><li><a href=\"https://maps.app.goo.gl/YD3DWUNKBoweKdpb7\"><div><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-map-pin-icon lucide-map-pin\"><path d=\"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0\"></path> <circle cx=\"12\" cy=\"10\" r=\"3\"></circle></svg> <span>Pracownia</span></div><p>ul. Polna 7k<br>83-314 Somonino</p></a></li><li><a href=\"https://maps.app.goo.gl/568ax4QLJnXvqbhD9\"><div><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-map-pin-icon lucide-map-pin\"><path d=\"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0\"></path> <circle cx=\"12\" cy=\"10\" r=\"3\"></circle></svg> <span>Kawiarnia</span></div><p>ul. Dworcowa 3a<br>83-300 Kartuzy</p></a></li></ul></div><div><h4>Kontakt</h4><ul><li><a href=\"https://facebook.com/piekarnikgosi\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"200\" height=\"200\" viewBox=\"0 0 48 48\"><mask id=\"ipSFacebook0\"><path fill=\"#fff\" stroke=\"#fff\" stroke-linejoin=\"round\" stroke-width=\"3.8\" d=\"M36 12.6h-6.013c-1.086 0-1.967.88-1.967 1.967v6.9H36l-1.169 7.597h-6.81V43h-8.776V29.064H12v-7.597h7.151l.094-7.21l-.013-1.31A7.868 7.868 0 0 1 27.099 5H36v7.6Z\"></path></mask> <path fill=\"currentColor\" d=\"M0 0h48v48H0z\" mask=\"url(#ipSFacebook0)\"></path></svg> <span>facebook.com/PiekarnikGosi</span></a></li><li><a href=\"https://instagram.com/piekarnikgosi\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"200\" height=\"200\" viewBox=\"0 0 24 24\"><path fill=\"currentColor\" d=\"M17.34 5.46a1.2 1.2 0 1 0 1.2 1.2a1.2 1.2 0 0 0-1.2-1.2Zm4.6 2.42a7.59 7.59 0 0 0-.46-2.43a4.94 4.94 0 0 0-1.16-1.77a4.7 4.7 0 0 0-1.77-1.15a7.3 7.3 0 0 0-2.43-.47C15.06 2 14.72 2 12 2s-3.06 0-4.12.06a7.3 7.3 0 0 0-2.43.47a4.78 4.78 0 0 0-1.77 1.15a4.7 4.7 0 0 0-1.15 1.77a7.3 7.3 0 0 0-.47 2.43C2 8.94 2 9.28 2 12s0 3.06.06 4.12a7.3 7.3 0 0 0 .47 2.43a4.7 4.7 0 0 0 1.15 1.77a4.78 4.78 0 0 0 1.77 1.15a7.3 7.3 0 0 0 2.43.47C8.94 22 9.28 22 12 22s3.06 0 4.12-.06a7.3 7.3 0 0 0 2.43-.47a4.7 4.7 0 0 0 1.77-1.15a4.85 4.85 0 0 0 1.16-1.77a7.59 7.59 0 0 0 .46-2.43c0-1.06.06-1.4.06-4.12s0-3.06-.06-4.12ZM20.14 16a5.61 5.61 0 0 1-.34 1.86a3.06 3.06 0 0 1-.75 1.15a3.19 3.19 0 0 1-1.15.75a5.61 5.61 0 0 1-1.86.34c-1 .05-1.37.06-4 .06s-3 0-4-.06a5.73 5.73 0 0 1-1.94-.3a3.27 3.27 0 0 1-1.1-.75a3 3 0 0 1-.74-1.15a5.54 5.54 0 0 1-.4-1.9c0-1-.06-1.37-.06-4s0-3 .06-4a5.54 5.54 0 0 1 .35-1.9A3 3 0 0 1 5 5a3.14 3.14 0 0 1 1.1-.8A5.73 5.73 0 0 1 8 3.86c1 0 1.37-.06 4-.06s3 0 4 .06a5.61 5.61 0 0 1 1.86.34a3.06 3.06 0 0 1 1.19.8a3.06 3.06 0 0 1 .75 1.1a5.61 5.61 0 0 1 .34 1.9c.05 1 .06 1.37.06 4s-.01 3-.06 4ZM12 6.87A5.13 5.13 0 1 0 17.14 12A5.12 5.12 0 0 0 12 6.87Zm0 8.46A3.33 3.33 0 1 1 15.33 12A3.33 3.33 0 0 1 12 15.33Z\"></path></svg> <span>instagram.com/PiekarnikGosi</span></a></li><li><a href=\"mailto:gosia@piekarnikgosi.pl\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-mail-icon lucide-mail\"><path d=\"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7\"></path> <rect x=\"2\" y=\"4\" width=\"20\" height=\"16\" rx=\"2\"></rect></svg> <span>gosia@piekarnikgosi.pl</span></a></li><li><a href=\"tel:+48503186245\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-phone-icon lucide-phone\"><path d=\"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384\"></path></svg> <span>+48 503 186 245</span></a></li></ul></div><p>&copy 2026 Piekarnik Gosi.</p></footer></body></html>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return nil
})
}
func Link(activePage, targetPage, title string) templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
return templ_7745c5c3_CtxErr
}
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var2 := templ.GetChildren(ctx)
if templ_7745c5c3_Var2 == nil {
templ_7745c5c3_Var2 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
if activePage == targetPage {
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "<a>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(title)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/layout.templ`, Line: 178, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "</a>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else {
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "<a href=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var4 templ.SafeURL
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinURLErrs(fmt.Sprint(targetPage, ".html"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/layout.templ`, Line: 180, Col: 43}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(title)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/layout.templ`, Line: 180, Col: 53}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "</a>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
return nil
})
}
func IndexPage() templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
return templ_7745c5c3_CtxErr
}
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var6 := templ.GetChildren(ctx)
if templ_7745c5c3_Var6 == nil {
templ_7745c5c3_Var6 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
templ_7745c5c3_Var7 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "<main id=\"index\"><header><div><h1>Słodkości tworzone z <span>pasją</span></h1><p>Naturalne składniki, domowe receptury i pasja. Tworzymy torty i wypieki na Twoje najważniejsze chwile - od codziennych radości po wielkie uroczystości</p><a href=\"wyroby.html\" class=\"btn\">Zobacz naszą ofertę</a></div><div><img alt=\"tort\" src=\"images/001.avif\"></div></header><section id=\"about-us\"><div><div><div><img alt=\"kawiarnia\" src=\"images/002.avif\"></div><div><img alt=\"kawiarnia\" src=\"images/003.avif\"></div></div><div><span>Tradycja i serce</span><h2>O nas</h2><p>„Piekarnik Gosi” to marzenie, które udało mi się zrealizować dzięki wsparciu i pomocy moich najbliższych. To pracownia cukiernicza stworzona z zamiłowania do pieczenia. Tworzę z pasją, z najwyższej jakości składników, słodkości, które uświetnią każdą uroczystość oraz spotkanie. Wszystkie wypieki wykonuje od podstaw własnoręcznie : od biszkoptu , frużelin owocowych, chrupek , kremów aż po elementy dekoracyjne. W mojej ofercie znajdują się torty weselne, słodkie stoły, torty okazjonalne, tarty i ciasta wykonywane na indywidualne zamówienia. Co wyróżnia moją pracownię? Domowy i naturalny smak 🙂 Realizuje życzenia klientów ze starannością i pełnym zaangażowaniem.</p></div></div></section><section id=\"featured-delights\"><h2>Nasze Wyroby</h2><div class=\"card\"><div><img alt=\"tort\" src=\"images/004.avif\"></div><div><h3>Torty Okazjonalne</h3><p>Weselne, urodzinowe i te bez okazji od klasyki po nowoczesne musy.</p><a href=\"wyroby_torty.html\">Przeglądaj Torty <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-arrow-right-icon lucide-arrow-right\"><path d=\"M5 12h14\"></path> <path d=\"m12 5 7 7-7 7\"></path></svg></a></div></div><div class=\"card\"><div><img alt=\"ciasto\" src=\"images/005.avif\"></div><div class=\"greener\"><h3>Domowe Ciasta</h3><p>Zapach tradycji: od serników po puszyste bezy</p><a href=\"wyroby.html\">Wyberz ciasto <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-arrow-right-icon lucide-arrow-right\"><path d=\"M5 12h14\"></path> <path d=\"m12 5 7 7-7 7\"></path></svg></a></div></div><div class=\"card\"><div><img alt=\"slodkosci\" src=\"images/006.avif\"></div><div><h3>Słodkie Stoły</h3><p>Kompleksowa oprawa słodkości na większe przyjęcia.</p><a href=\"wyroby_slodkie_stoly.html\">Sprawdź słodkie stoły <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-arrow-right-icon lucide-arrow-right\"><path d=\"M5 12h14\"></path> <path d=\"m12 5 7 7-7 7\"></path></svg></a></div></div></section><section id=\"kawiarnia\"><div><div><h3>Twój drugi dom</h3><p>Poczuj się jak w domu. Codziennie czekają na Ciebie świeże wypieki prosto z naszej pracowni, selekcja najlepszych herbat i przepyszna kawa. To tutaj nasze ciasta smakują najlepiej podane z uśmiechem, w miejscu stworzonym z pasji do słodkości.</p><ul><li><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-coffee-icon lucide-coffee\"><path d=\"M10 2v2\"></path> <path d=\"M14 2v2\"></path> <path d=\"M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1\"></path> <path d=\"M6 2v2\"></path></svg> <span>Miła atmosfera</span></li><li><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-wifi-icon lucide-wifi\"><path d=\"M12 20h.01\"></path> <path d=\"M2 8.82a15 15 0 0 1 20 0\"></path> <path d=\"M5 12.859a10 10 0 0 1 14 0\"></path> <path d=\"M8.5 16.429a5 5 0 0 1 7 0\"></path></svg> <span>Darmowe wifi</span></li></ul></div><div><div><img alt=\"kawiarnia\" src=\"images/007.avif\"></div><div><img alt=\"ciasto i kawa\" src=\"images/008.avif\"></div></div></div></section></main>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return nil
})
templ_7745c5c3_Err = Layout("index").Render(templ.WithChildren(ctx, templ_7745c5c3_Var7), templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return nil
})
}
var _ = templruntime.GeneratedTemplate