remaining cakes
This commit is contained in:
parent
a0ea21b884
commit
c1eaebb9c9
2 changed files with 20 additions and 9 deletions
|
|
@ -25,6 +25,16 @@ var Cakes = []types.Product{
|
|||
{Name: "Sernik mango marakuja", Image: "sernik_mango_marakuja", Price: "120", Description: ""},
|
||||
{Name: "Sernik palone masło", Image: "sernik_palone_maslo", Price: "150", Description: ""},
|
||||
{Name: "Sernik z rosą", Image: "sernik_rosa", Price: "150", Description: ""},
|
||||
{Name: "Sernik klasyczny", Image: "", Price: "150", Description: "wykończony czekoladowym ganache lub oprószony cukrem pudrem"},
|
||||
{Name: "Pleśniak", Image: "", Price: "120", Description: "kruche ciasto waniliowe, powidła owocowe, kruche ciasto kakaowe, beza i kruszonka"},
|
||||
{Name: "Snickers", Image: "", Price: "150", Description: "dwie warstwy kakaowego biszkoptu a pomiędzy bezowy blat orzechowy , krem budyniowy , toffi i orzeszki ziemne"},
|
||||
{Name: "3Bit", Image: "", Price: "120", Description: "herbatniki, krem budyniowy, toffi i śmietana"},
|
||||
{Name: "Biszkoptowe z kremem i owocami w galaretce", Image: "", Price: "120", Description: "biszkopt, krem budyniowy, owoce"},
|
||||
{Name: "Kora orzechowa", Image: "", Price: "150", Description: "dwa blaty bezy orzechowej a pomiędzy krem budyniowy na bazie soku z brzoskwiń, delicje pomarańczowe, owoce brzoskwiń i galaretka"},
|
||||
{Name: "Nutellowiec z wiśniami", Image: "", Price: "120", Description: "nutelowy spód , krem śmietankowy z dodatkiem twarożku, wiśnie i galaretka"},
|
||||
{Name: "Karpatka", Image: "", Price: "120", Description: ""},
|
||||
{Name: "Tarta cytrynowa", Image: "", Price: "100", Description: ""},
|
||||
// {Name: "Sernik lawendowy z pomarańczą", Image: "", Price: "150", Description: ""},
|
||||
}
|
||||
|
||||
var Desserts = []types.Product{
|
||||
|
|
@ -46,4 +56,5 @@ var Desserts = []types.Product{
|
|||
{Name: "Savarin", Image: "savarin", Price: "12", Description: "mus z białej czekolady i żelką malinową na migdałowym ciasteczku"},
|
||||
{Name: "Profiterol", Image: "profiterol", Price: "9", Description: "z kruszonką i kremem porzeczkowym/śmietankowym"},
|
||||
{Name: "Babeczki", Image: "babeczki", Price: "6", Description: "z kremem i piankami mashmallow"},
|
||||
{Name: "Cake Pops", Image: "", Price: "6", Description: ""},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package html
|
|||
import (
|
||||
"crypto/sha256"
|
||||
"encoding/hex"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"piekarnikgosi/utils"
|
||||
|
|
@ -17,11 +16,7 @@ func imageSrcDst(input string) (src, dst string) {
|
|||
}
|
||||
|
||||
func processImage(fileName string) string {
|
||||
dst, err := utils.CopyIfNotExists(imageSrcDst(fileName))
|
||||
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
dst, _ := utils.CopyIfNotExists(imageSrcDst(fileName))
|
||||
|
||||
return "/" + dst[4:]
|
||||
}
|
||||
|
|
@ -32,10 +27,12 @@ func thumbnailPath(fullPath string) string {
|
|||
}
|
||||
|
||||
templ AvifAlbumImage(srcPath, alt string) {
|
||||
<img src={ processImage(albumImageSrc(srcPath)) }
|
||||
<img
|
||||
src={ processImage(albumImageSrc(srcPath)) }
|
||||
data-fullsrc={ processImage(srcPath) }
|
||||
alt={ alt }
|
||||
loading="lazy" />
|
||||
loading="lazy"
|
||||
/>
|
||||
}
|
||||
|
||||
func albumImageSrc(srcPath string) string {
|
||||
|
|
@ -47,11 +44,14 @@ func albumImageSrc(srcPath string) string {
|
|||
}
|
||||
|
||||
templ AvifImage(srcPath, alt string, lazy bool) {
|
||||
<img src={ processImage(srcPath) } alt={ alt }
|
||||
<img
|
||||
src={ processImage(srcPath) }
|
||||
alt={ alt }
|
||||
if lazy {
|
||||
loading="lazy"
|
||||
} else {
|
||||
fetchpriority="high"
|
||||
}
|
||||
onerror="this.onerror=null;this.parentElement.style.position='relative';this.src='data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27currentColor%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Ccircle cx=%2712%27 cy=%2712%27 r=%2710%27/%3E%3Cline x1=%2712%27 x2=%2712%27 y1=%278%27 y2=%2712%27/%3E%3Cline x1=%2712%27 x2=%2712.01%27 y1=%2716%27 y2=%2716%27/%3E%3C/svg%3E';this.style.cssText='width:48px;height:48px;object-fit:contain;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)'"
|
||||
/>
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue