From 91627c2d531a34ae032141af4e18bb1bd8619125 Mon Sep 17 00:00:00 2001 From: xAlpharax <42233094+xAlpharax@users.noreply.github.com> Date: Mon, 18 Aug 2025 08:30:32 +0300 Subject: Pagespeed optimisation Changes to be committed: modified: .gitignore modified: config.toml deleted: sass/_animate.scss modified: sass/style.scss modified: templates/404.html modified: templates/shortcodes/image.html --- .gitignore | 3 + config.toml | 15 +++ sass/_animate.scss | 232 ---------------------------------------- sass/style.scss | 1 - templates/404.html | 2 +- templates/shortcodes/image.html | 6 +- 6 files changed, 22 insertions(+), 237 deletions(-) delete mode 100644 sass/_animate.scss diff --git a/.gitignore b/.gitignore index 10677a1..e31b984 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ public/ .obsidian/ *.sh + +*.png +*.webp diff --git a/config.toml b/config.toml index 03ec1a2..bce794b 100644 --- a/config.toml +++ b/config.toml @@ -76,6 +76,21 @@ smart_punctuation = false # For example, `![xx](...)` is ok but `![*x*x](...)` isn’t ok lazy_async_image = false +[search] +# Whether to build a search index to be used by the templates +build_search_index = true +# The name of the file to write the search index to. +# This is used by the default search JavaScript implementation. +index_format = "elasticlunr_json" +# Whether to include the title of the page in the search index. +include_title = true +# Whether to include the description of the page in the search index. +include_description = true +# Whether to include the path of the page in the search index. +include_path = true +# Whether to include the rendered content of the page in the search index. +include_content = true + [extra] home_subtitle = "Neural Art at its finest :))" diff --git a/sass/_animate.scss b/sass/_animate.scss deleted file mode 100644 index 6b97612..0000000 --- a/sass/_animate.scss +++ /dev/null @@ -1,232 +0,0 @@ -@charset "UTF-8"; - -/*! - * animate.css -https://daneden.github.io/animate.css/ - * Version - 3.7.0 - * Licensed under the MIT license - http://opensource.org/licenses/MIT - * - * Copyright (c) 2018 Daniel Eden - */ - -@-webkit-keyframes bounceInRight { - 0%, - 60%, - 75%, - 90%, - to { - -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - } - 0% { - opacity: 0; - -webkit-transform: translate3d(3000px, 0, 0); - transform: translate3d(3000px, 0, 0); - } - 60% { - opacity: 1; - -webkit-transform: translate3d(-25px, 0, 0); - transform: translate3d(-25px, 0, 0); - } - 75% { - -webkit-transform: translate3d(10px, 0, 0); - transform: translate3d(10px, 0, 0); - } - 90% { - -webkit-transform: translate3d(-5px, 0, 0); - transform: translate3d(-5px, 0, 0); - } - to { - -webkit-transform: translateZ(0); - transform: translateZ(0); - } -} -@keyframes bounceInRight { - 0%, - 60%, - 75%, - 90%, - to { - -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - } - 0% { - opacity: 0; - -webkit-transform: translate3d(3000px, 0, 0); - transform: translate3d(3000px, 0, 0); - } - 60% { - opacity: 1; - -webkit-transform: translate3d(-25px, 0, 0); - transform: translate3d(-25px, 0, 0); - } - 75% { - -webkit-transform: translate3d(10px, 0, 0); - transform: translate3d(10px, 0, 0); - } - 90% { - -webkit-transform: translate3d(-5px, 0, 0); - transform: translate3d(-5px, 0, 0); - } - to { - -webkit-transform: translateZ(0); - transform: translateZ(0); - } -} -.bounceInRight { - -webkit-animation-name: bounceInRight; - animation-name: bounceInRight; -} -@-webkit-keyframes bounceOutRight { - 20% { - opacity: 1; - -webkit-transform: translate3d(-20px, 0, 0); - transform: translate3d(-20px, 0, 0); - } - to { - opacity: 0; - -webkit-transform: translate3d(2000px, 0, 0); - transform: translate3d(2000px, 0, 0); - } -} -@keyframes bounceOutRight { - 20% { - opacity: 1; - -webkit-transform: translate3d(-20px, 0, 0); - transform: translate3d(-20px, 0, 0); - } - to { - opacity: 0; - -webkit-transform: translate3d(2000px, 0, 0); - transform: translate3d(2000px, 0, 0); - } -} -.bounceOutRight { - -webkit-animation-name: bounceOutRight; - animation-name: bounceOutRight; -} -@-webkit-keyframes fadeIn { - 0% { - opacity: 0; - } - to { - opacity: 1; - } -} -@keyframes fadeIn { - 0% { - opacity: 0; - } - to { - opacity: 1; - } -} -.fadeIn { - -webkit-animation-name: fadeIn; - animation-name: fadeIn; -} -@-webkit-keyframes slideInUp { - 0% { - -webkit-transform: translate3d(0, 100%, 0); - transform: translate3d(0, 100%, 0); - visibility: visible; - } - to { - -webkit-transform: translateZ(0); - transform: translateZ(0); - } -} -@keyframes slideInUp { - 0% { - -webkit-transform: translate3d(0, 100%, 0); - transform: translate3d(0, 100%, 0); - visibility: visible; - } - to { - -webkit-transform: translateZ(0); - transform: translateZ(0); - } -} -.slideInUp { - -webkit-animation-name: slideInUp; - animation-name: slideInUp; -} -@-webkit-keyframes slideOutDown { - 0% { - -webkit-transform: translateZ(0); - transform: translateZ(0); - } - to { - visibility: hidden; - -webkit-transform: translate3d(0, 100%, 0); - transform: translate3d(0, 100%, 0); - } -} -@keyframes slideOutDown { - 0% { - -webkit-transform: translateZ(0); - transform: translateZ(0); - } - to { - visibility: hidden; - -webkit-transform: translate3d(0, 100%, 0); - transform: translate3d(0, 100%, 0); - } -} -.slideOutDown { - -webkit-animation-name: slideOutDown; - animation-name: slideOutDown; -} -.animated { - -webkit-animation-duration: 1s; - animation-duration: 1s; - -webkit-animation-fill-mode: both; - animation-fill-mode: both; -} -.animated.infinite { - -webkit-animation-iteration-count: infinite; - animation-iteration-count: infinite; -} -.animated.delay-1s { - -webkit-animation-delay: 1s; - animation-delay: 1s; -} -.animated.delay-2s { - -webkit-animation-delay: 2s; - animation-delay: 2s; -} -.animated.delay-3s { - -webkit-animation-delay: 3s; - animation-delay: 3s; -} -.animated.delay-4s { - -webkit-animation-delay: 4s; - animation-delay: 4s; -} -.animated.delay-5s { - -webkit-animation-delay: 5s; - animation-delay: 5s; -} -.animated.fast { - -webkit-animation-duration: 0.8s; - animation-duration: 0.8s; -} -.animated.faster { - -webkit-animation-duration: 0.5s; - animation-duration: 0.5s; -} -.animated.slow { - -webkit-animation-duration: 2s; - animation-duration: 2s; -} -.animated.slower { - -webkit-animation-duration: 3s; - animation-duration: 3s; -} -@media (prefers-reduced-motion) { - .animated { - -webkit-animation: unset !important; - animation: unset !important; - -webkit-transition: none !important; - transition: none !important; - } -} diff --git a/sass/style.scss b/sass/style.scss index 52c03e9..442c97e 100644 --- a/sass/style.scss +++ b/sass/style.scss @@ -1,6 +1,5 @@ @import "predefined.scss"; @import "normalize.scss"; -@import "animate.scss"; /* Webkit Scrollbar Customize */ ::-webkit-scrollbar { diff --git a/templates/404.html b/templates/404.html index 58d8f52..f84858b 100644 --- a/templates/404.html +++ b/templates/404.html @@ -22,7 +22,7 @@ - + diff --git a/templates/shortcodes/image.html b/templates/shortcodes/image.html index 8b1a006..9b8124b 100644 --- a/templates/shortcodes/image.html +++ b/templates/shortcodes/image.html @@ -11,14 +11,14 @@ {# --- Get optional parameters, with sensible defaults --- #} {% set lazy = lazy | default(value=true) %} {% set fetch = fetch | default(value="auto") %} -{% set quality = quality | default(value=60) %} {# <-- New: Set a default quality #} +{% set quality = quality | default(value=100) %} {# <-- New: Set a default quality #} {# --- Let Zola process the image into ALL necessary formats and sizes --- #} {% set image_meta = get_image_metadata(path=src) %} {# Create small versions (PNG and WebP) with higher compression #} -{% set image_small_png = resize_image(path=src, width=383, op="fit_width", quality=quality) %} -{% set image_small_webp = resize_image(path=src, width=383, op="fit_width", format="webp", quality=quality) %} +{% set image_small_png = resize_image(path=src, width=575, op="fit_width", quality=quality) %} +{% set image_small_webp = resize_image(path=src, width=575, op="fit_width", format="webp", quality=quality) %} {# Create large versions (PNG and WebP) with higher compression #} {% set image_large_png = resize_image(path=src, width=682, op="fit_width", quality=quality) %} -- cgit v1.2.3