diff --git a/css/base.css b/css/base.css index a8b5ae9..516e6c7 100644 --- a/css/base.css +++ b/css/base.css @@ -133,3 +133,20 @@ ul { img { color: transparent; } + +main { + transition: opacity 0.15s ease; +} + +#about-us, +#featured-delights, +#kawiarnia, +#kawiarnia-content, +#portfolio-grid, +#wyroby, +#slodkie_stoly, +#lody, +#wyroby-torty > section { + content-visibility: auto; + contain-intrinsic-size: 600px; +} diff --git a/go.mod b/go.mod index 45602a6..16e58a0 100644 --- a/go.mod +++ b/go.mod @@ -10,14 +10,16 @@ require ( github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cli/browser v1.3.0 // indirect github.com/fatih/color v1.16.0 // indirect - github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/fsnotify/fsnotify v1.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/natefinch/atomic v1.0.1 // indirect + github.com/tdewolff/minify/v2 v2.24.13 // indirect + github.com/tdewolff/parse/v2 v2.8.12 // indirect golang.org/x/mod v0.26.0 // indirect golang.org/x/net v0.51.0 // indirect golang.org/x/sync v0.16.0 // indirect - golang.org/x/sys v0.41.0 // indirect + golang.org/x/sys v0.43.0 // indirect golang.org/x/tools v0.35.0 // indirect ) diff --git a/go.sum b/go.sum index 91446b2..ad118b4 100644 --- a/go.sum +++ b/go.sum @@ -14,6 +14,8 @@ github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= +github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -27,6 +29,11 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/tdewolff/minify/v2 v2.24.13 h1:xrcF7gKDnUszseEY9WX9mUlZII2v2Go/QAcAwRASw58= +github.com/tdewolff/minify/v2 v2.24.13/go.mod h1:emvwoYeIl8bfAKqRU5ww95LX9Gpggpqv/naal9a8Yq0= +github.com/tdewolff/parse/v2 v2.8.12 h1:5BBjfaCv482v3nltlS0u6wH1xJaxjR6ofDrWttNvROg= +github.com/tdewolff/parse/v2 v2.8.12/go.mod h1:Hwlni2tiVNKyzR1o6nUs4FOF07URA+JLBLd6dlIXYqo= +github.com/tdewolff/test v1.0.11/go.mod h1:XPuWBzvdUzhCuxWO1ojpXsyzsA5bFoS3tO/Q3kFuTG8= golang.org/x/mod v0.26.0 h1:EGMPT//Ezu+ylkCijjPc+f4Aih7sZvaAr+O3EHBxvZg= golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ= golang.org/x/net v0.51.0 h1:94R/GTO7mt3/4wIKpcR5gkGmRLOuE/2hNGeWq/GBIFo= @@ -37,6 +44,8 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k= golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI= +golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/tools v0.35.0 h1:mBffYraMEf7aa0sB+NuKnuCy8qI/9Bughn8dC2Gu5r0= golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/html/image.templ b/html/image.templ index 65c7278..b82c828 100644 --- a/html/image.templ +++ b/html/image.templ @@ -24,6 +24,13 @@ func processImage(fileName string) string { return dst[4:] } -templ AvifImage(srcPath, alt string) { - { +templ AvifImage(srcPath, alt string, lazy bool, priority bool) { + { } diff --git a/html/index.templ b/html/index.templ index 7fa7c06..8cf969f 100644 --- a/html/index.templ +++ b/html/index.templ @@ -13,17 +13,17 @@ templ Index() { Zobacz naszą ofertę
- @AvifImage("001.avif", "tort") + @AvifImage("001.avif", "tort", false, true)
- @AvifImage("002.avif", "kawiarnia") + @AvifImage("002.avif", "kawiarnia", true, false)
- @AvifImage("003.avif", "kawiarnia") + @AvifImage("003.avif", "kawiarnia", true, false)
@@ -42,7 +42,7 @@ templ Index() {

Nasze Wyroby

- @AvifImage("004.avif", "tort") + @AvifImage("004.avif", "tort", true, false)

Torty Okazjonalne

@@ -69,7 +69,7 @@ templ Index() {
- @AvifImage("005.avif", "ciasto") + @AvifImage("005.avif", "ciasto", true, false)

Domowe Ciasta

@@ -96,7 +96,7 @@ templ Index() {
- @AvifImage("006.avif", "slodkosci") + @AvifImage("006.avif", "slodkosci", true, false)

Słodkie Stoły

@@ -174,10 +174,10 @@ templ Index() {
- @AvifImage("007.avif", "kawiarnia") + @AvifImage("007.avif", "kawiarnia", true, false)
- @AvifImage("008.avif", "ciasto i kawa") + @AvifImage("008.avif", "ciasto i kawa", true, false)
diff --git a/html/kawiarnia.templ b/html/kawiarnia.templ index 8984b30..2e0ebe6 100644 --- a/html/kawiarnia.templ +++ b/html/kawiarnia.templ @@ -13,7 +13,7 @@ templ Kawiarnia() {

- @AvifImage("009.avif", "kawiarnia") + @AvifImage("009.avif", "kawiarnia", false, true)
diff --git a/html/layout.templ b/html/layout.templ index a00cb4b..f9a1c90 100644 --- a/html/layout.templ +++ b/html/layout.templ @@ -13,9 +13,10 @@ templ layout(activePage string) { + - +