diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 55a4187..0000000 Binary files a/.DS_Store and /dev/null differ diff --git a/.gitignore b/.gitignore index 59d4c1c..e1bcb35 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ www docker-compose.yml +todo.txt +.DS_Store diff --git a/css/components.css b/css/components.css index 5173b2f..a2a6de5 100644 --- a/css/components.css +++ b/css/components.css @@ -71,11 +71,11 @@ } } - top: 0; - transition: top 0.2s; + transform: translateY(0); + transition: transform 0.2s; &:hover { - top: -10px; + transform: translateY(-10px); & img { scale: 1.1; diff --git a/html/doc.go b/html/doc.go new file mode 100644 index 0000000..53629a7 --- /dev/null +++ b/html/doc.go @@ -0,0 +1,3 @@ +//go:generate templ generate + +package html diff --git a/html/image.templ b/html/image.templ index f187ca1..1806d8e 100644 --- a/html/image.templ +++ b/html/image.templ @@ -7,7 +7,7 @@ import ( "piekarnikgosi/utils" ) -func processFilename(input string) (src, dst string) { +func imageSrcDst(input string) (src, dst string) { src = "img/" + input hash := sha256.Sum256([]byte(input)) dst = "www/images/" + hex.EncodeToString(hash[:])[:16] + ".avif" @@ -15,7 +15,7 @@ func processFilename(input string) (src, dst string) { } func ProcessImage(fileName string) string { - dst, err := utils.CopyFile(processFilename(fileName)) + dst, err := utils.CopyIfNotExists(imageSrcDst(fileName)) if err != nil { log.Fatal(err) diff --git a/html/image_templ.go b/html/image_templ.go index 9fb2ae8..871ef6e 100644 --- a/html/image_templ.go +++ b/html/image_templ.go @@ -15,7 +15,7 @@ import ( "piekarnikgosi/utils" ) -func processFilename(input string) (src, dst string) { +func imageSrcDst(input string) (src, dst string) { src = "img/" + input hash := sha256.Sum256([]byte(input)) dst = "www/images/" + hex.EncodeToString(hash[:])[:16] + ".avif" @@ -23,7 +23,7 @@ func processFilename(input string) (src, dst string) { } func ProcessImage(fileName string) string { - dst, err := utils.CopyFile(processFilename(fileName)) + dst, err := utils.CopyIfNotExists(imageSrcDst(fileName)) if err != nil { log.Fatal(err) diff --git a/html/kawiarnia.templ b/html/kawiarnia.templ index d8fde69..8984b30 100644 --- a/html/kawiarnia.templ +++ b/html/kawiarnia.templ @@ -156,7 +156,7 @@ templ Kawiarnia() {

Słodkości

@@ -185,7 +185,6 @@ templ Kawiarnia() {
  • Cytryna

    10 PLN
  • Imbir

    10 PLN
  • Owocowa

    10 PLN
  • -
  • Cappucino

    10 PLN
  • Ice Tea

    18 PLN
  • diff --git a/html/kawiarnia_templ.go b/html/kawiarnia_templ.go index de18a7b..50aec58 100644 --- a/html/kawiarnia_templ.go +++ b/html/kawiarnia_templ.go @@ -49,7 +49,7 @@ func Kawiarnia() templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "

    Odwiedź nas

    Czekamy na ciebie z świeżymi wypiekami i ciepłą kawą. Znajdź nas w samym centrum miasta.

    Adres

    ul. Dworcowa 3a
    83-300 Kartuzy

    Godziny Otwarcia

    • pn-pt9:00-19:00
    • sb-nd10:00-20:00

    Zadzwoń do nas

    Masz pytania? Chcesz zarezerwować stolik?

    690 214 515

    Nasza karta

    Kawy

    • Espresso

      8 PLN
    • Espresso podwójne

      12 PLN
    • Espresso Affogato

      17 PLN
    • Americano

      10 PLN
    • Flat White

      12 PLN
    • Cappucino

      12 PLN
    • Caffee Latte

      14 PLN
    • Latte Macchiato

      15 PLN
    • Kawa Mrożona

      22 PLN
    • Ice Latte

      20 PLN
    • Dodatki

    • Bita śmietana

      4 PLN
    • Syrop

      2 PLN
    • Dodatkowa porcja espresso

      2 PLN

    Słodkości

      Codziennie pieczemy coś innego! Zapytaj obsługę o dzisiejsze smaki.

    • Domowe ciasta

      10 - 20 LN
    • Deserki

      5 - 15 PLN
    • Mini Pavlova

      12 PLN

    Herbaty

    • Czarna

      10 PLN
    • Zielona

      10 PLN
    • Cytryna

      10 PLN
    • Imbir

      10 PLN
    • Owocowa

      10 PLN
    • Cappucino

      10 PLN
    • Ice Tea

      18 PLN

    Napoje

    • Woda gazowana

      6 PLN
    • Woda niegazowana

      6 PLN
    • Coca Cola

      8 PLN
    • Fanta

      8 PLN
    • Smoothie owocowe

      20 PLN
    • Milkshake

      24 PLN
    • Lemoniada

      18 PLN

    Lody

    • Mała gałka

      6 PLN
    • Duża gałka

      8 PLN
    • Deser Lodowy

      26 PLN
    • Małe włoskie

      10 PLN
    • Duże włoskie

      14 PLN

    Gofry

    • Gofr

      12 PLN
    • Gofr bąbelkowy

      24 PLN
    • Dodatki

    • Owoce

      5 PLN
    • Bita śmietana

      4 PLN
    • Posypka i/lub polewa

      2 PLN
    • Frużelina

      14 PLN
    ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "

    Odwiedź nas

    Czekamy na ciebie z świeżymi wypiekami i ciepłą kawą. Znajdź nas w samym centrum miasta.

    Adres

    ul. Dworcowa 3a
    83-300 Kartuzy

    Godziny Otwarcia

    • pn-pt9:00-19:00
    • sb-nd10:00-20:00

    Zadzwoń do nas

    Masz pytania? Chcesz zarezerwować stolik?

    690 214 515

    Nasza karta

    Kawy

    • Espresso

      8 PLN
    • Espresso podwójne

      12 PLN
    • Espresso Affogato

      17 PLN
    • Americano

      10 PLN
    • Flat White

      12 PLN
    • Cappucino

      12 PLN
    • Caffee Latte

      14 PLN
    • Latte Macchiato

      15 PLN
    • Kawa Mrożona

      22 PLN
    • Ice Latte

      20 PLN
    • Dodatki

    • Bita śmietana

      4 PLN
    • Syrop

      2 PLN
    • Dodatkowa porcja espresso

      2 PLN

    Słodkości

      Codziennie pieczemy coś innego! Zapytaj obsługę o dzisiejsze smaki.

    • Domowe ciasta

      10 - 20 PLN
    • Deserki

      5 - 15 PLN
    • Mini Pavlova

      12 PLN

    Herbaty

    • Czarna

      10 PLN
    • Zielona

      10 PLN
    • Cytryna

      10 PLN
    • Imbir

      10 PLN
    • Owocowa

      10 PLN
    • Ice Tea

      18 PLN

    Napoje

    • Woda gazowana

      6 PLN
    • Woda niegazowana

      6 PLN
    • Coca Cola

      8 PLN
    • Fanta

      8 PLN
    • Smoothie owocowe

      20 PLN
    • Milkshake

      24 PLN
    • Lemoniada

      18 PLN

    Lody

    • Mała gałka

      6 PLN
    • Duża gałka

      8 PLN
    • Deser Lodowy

      26 PLN
    • Małe włoskie

      10 PLN
    • Duże włoskie

      14 PLN

    Gofry

    • Gofr

      12 PLN
    • Gofr bąbelkowy

      24 PLN
    • Dodatki

    • Owoce

      5 PLN
    • Bita śmietana

      4 PLN
    • Posypka i/lub polewa

      2 PLN
    • Frużelina

      14 PLN
    ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/img/.DS_Store b/img/.DS_Store deleted file mode 100644 index 758d408..0000000 Binary files a/img/.DS_Store and /dev/null differ diff --git a/img/portfolio/.DS_Store b/img/portfolio/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/img/portfolio/.DS_Store and /dev/null differ diff --git a/img/wyroby/.DS_Store b/img/wyroby/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/img/wyroby/.DS_Store and /dev/null differ diff --git a/main.go b/main.go index 9310c89..d3d4b4d 100644 --- a/main.go +++ b/main.go @@ -99,13 +99,20 @@ func ensureDir() { } } +func mustCopy(src, dst string) { + _, err := utils.CopyIfNotExists(src, dst) + if err != nil { + log.Fatalf("copying %s: %s", src, err) + } +} + func main() { ensureDir() generateHTML() mergeStyles() - utils.CopyFile("img/favicon.avif", "www/images/favicon.avif") - utils.CopyFile("img/logo.svg", "www/images/logo.svg") - utils.CopyFile("js/portfolio.js", "www/portfolio.js") + mustCopy("img/favicon.avif", "www/images/favicon.avif") + mustCopy("img/logo.svg", "www/images/logo.svg") + mustCopy("js/portfolio.js", "www/portfolio.js") log.Println("listening on :8000") log.Fatal(http.ListenAndServe(":8000", http.FileServer(http.Dir("www")))) } diff --git a/resources/.DS_Store b/resources/.DS_Store deleted file mode 100644 index 0b64169..0000000 Binary files a/resources/.DS_Store and /dev/null differ diff --git a/resources/inspiration/.DS_Store b/resources/inspiration/.DS_Store deleted file mode 100644 index d60cbec..0000000 Binary files a/resources/inspiration/.DS_Store and /dev/null differ diff --git a/resources/scraped/.DS_Store b/resources/scraped/.DS_Store deleted file mode 100644 index 1b0730d..0000000 Binary files a/resources/scraped/.DS_Store and /dev/null differ diff --git a/todo.txt b/todo.txt deleted file mode 100644 index f775ef4..0000000 --- a/todo.txt +++ /dev/null @@ -1,17 +0,0 @@ -sernik klasyczny -sernik królewski -pleśniak -leśny mech z musem truskawkowym -snickers -mleczna kanapka -3 bit -biszkoptowe z kremem i owocami w galaretce -kora orzechowa -nutelowiec z wiśniami -karpatka - -mobile version -fix header alignement in wyroby -lody -portfolio -reszta ciast \ No newline at end of file diff --git a/utils/file.go b/utils/file.go index 5884bf9..164f2de 100644 --- a/utils/file.go +++ b/utils/file.go @@ -6,7 +6,7 @@ import ( "os" ) -func CopyFile(src, dst string) (string, error) { +func CopyIfNotExists(src, dst string) (string, error) { _, err := os.Stat(dst) if err == nil { return dst, nil