From 49059872329c799f97ffe36b64e7307e17d41c10 Mon Sep 17 00:00:00 2001
From: Christofer <imchris@tuta.io>
Date: Tue, 29 Aug 2023 20:34:53 +0400
Subject: [PATCH] .

---
 scripts/generate-blurred-images.sh                  |   8 ++++++++
 .../1}/amadeus.png                                  | Bin
 .../1}/flafy.png                                    | Bin
 .../1}/flicko.png                                   | Bin
 .../1}/lauroro.jpg                                  | Bin
 .../1}/lyasm.png                                    | Bin
 .../2}/day-night.png                                | Bin
 .../2}/end_4.jpg                                    | Bin
 .../2}/flafy.png                                    | Bin
 .../readme.md                                       |   4 +---
 10 files changed, 9 insertions(+), 3 deletions(-)
 create mode 100755 scripts/generate-blurred-images.sh
 rename static/imgs/{ricingcomp1 => ricing_competitions/1}/amadeus.png (100%)
 rename static/imgs/{ricingcomp1 => ricing_competitions/1}/flafy.png (100%)
 rename static/imgs/{ricingcomp1 => ricing_competitions/1}/flicko.png (100%)
 rename static/imgs/{ricingcomp1 => ricing_competitions/1}/lauroro.jpg (100%)
 rename static/imgs/{ricingcomp1 => ricing_competitions/1}/lyasm.png (100%)
 rename static/imgs/{ricingcomp2 => ricing_competitions/2}/day-night.png (100%)
 rename static/imgs/{ricingcomp2 => ricing_competitions/2}/end_4.jpg (100%)
 rename static/imgs/{ricingcomp2 => ricing_competitions/2}/flafy.png (100%)
 rename static/imgs/{wall_of_fame-home-thumbnails => ricing_competitions}/readme.md (61%)

diff --git a/scripts/generate-blurred-images.sh b/scripts/generate-blurred-images.sh
new file mode 100755
index 0000000..f6d8896
--- /dev/null
+++ b/scripts/generate-blurred-images.sh
@@ -0,0 +1,8 @@
+find "./static/imgs/ricing_competitions/" -type f \
+   \( -iname "*.jpg" -o -iname "*.png" -o -iname "*.gif" -o -iname "*.bmp" -o -iname "*.jpeg" \) -print0 |
+while IFS= read -r -d '' filepath; do
+    directory=$(dirname "$filepath")
+    filename=$(basename "$filepath")
+    generated_filename="${directory}/generated_${filename}"
+    magick convert  -scale 10% -gaussian-blur 0x1 -modulate 100,300,100 -resize 1000% "$filepath" "$generated_filename"
+done
diff --git a/static/imgs/ricingcomp1/amadeus.png b/static/imgs/ricing_competitions/1/amadeus.png
similarity index 100%
rename from static/imgs/ricingcomp1/amadeus.png
rename to static/imgs/ricing_competitions/1/amadeus.png
diff --git a/static/imgs/ricingcomp1/flafy.png b/static/imgs/ricing_competitions/1/flafy.png
similarity index 100%
rename from static/imgs/ricingcomp1/flafy.png
rename to static/imgs/ricing_competitions/1/flafy.png
diff --git a/static/imgs/ricingcomp1/flicko.png b/static/imgs/ricing_competitions/1/flicko.png
similarity index 100%
rename from static/imgs/ricingcomp1/flicko.png
rename to static/imgs/ricing_competitions/1/flicko.png
diff --git a/static/imgs/ricingcomp1/lauroro.jpg b/static/imgs/ricing_competitions/1/lauroro.jpg
similarity index 100%
rename from static/imgs/ricingcomp1/lauroro.jpg
rename to static/imgs/ricing_competitions/1/lauroro.jpg
diff --git a/static/imgs/ricingcomp1/lyasm.png b/static/imgs/ricing_competitions/1/lyasm.png
similarity index 100%
rename from static/imgs/ricingcomp1/lyasm.png
rename to static/imgs/ricing_competitions/1/lyasm.png
diff --git a/static/imgs/ricingcomp2/day-night.png b/static/imgs/ricing_competitions/2/day-night.png
similarity index 100%
rename from static/imgs/ricingcomp2/day-night.png
rename to static/imgs/ricing_competitions/2/day-night.png
diff --git a/static/imgs/ricingcomp2/end_4.jpg b/static/imgs/ricing_competitions/2/end_4.jpg
similarity index 100%
rename from static/imgs/ricingcomp2/end_4.jpg
rename to static/imgs/ricing_competitions/2/end_4.jpg
diff --git a/static/imgs/ricingcomp2/flafy.png b/static/imgs/ricing_competitions/2/flafy.png
similarity index 100%
rename from static/imgs/ricingcomp2/flafy.png
rename to static/imgs/ricing_competitions/2/flafy.png
diff --git a/static/imgs/wall_of_fame-home-thumbnails/readme.md b/static/imgs/ricing_competitions/readme.md
similarity index 61%
rename from static/imgs/wall_of_fame-home-thumbnails/readme.md
rename to static/imgs/ricing_competitions/readme.md
index b2a6ca6..0359bc8 100755
--- a/static/imgs/wall_of_fame-home-thumbnails/readme.md
+++ b/static/imgs/ricing_competitions/readme.md
@@ -1,6 +1,4 @@
-The images here a displayed on the homepage.
-
-For their effect to work, they need a blurred version, which gets generated on build or manually.
+For the effect of the images to work, they need a blurred version, which gets generated on build or manually.
 This is to prevent lag especially on mobile by removing the need for the CSS blur filter.
 
 `magick convert -gaussian-blur 0x20 -modulate 100,300,100 /home/vdawg/Downloads/tmp/a/img4.webp /home/vdawg/Downloads/tmp/a/img4_xx.webp`