mirror of
https://github.com/AngelJumbo/gruvbox-wallpapers.git
synced 2026-10-14 21:26:18 +00:00
fix dysplay thumbnail
This commit is contained in:
@@ -37,8 +37,8 @@ generate_thumbnails() {
|
|||||||
current_image=$((current_image + 1))
|
current_image=$((current_image + 1))
|
||||||
local img_filename="${img##*/}"
|
local img_filename="${img##*/}"
|
||||||
local thumbnail="thumbnails/$section_name/$img_filename"
|
local thumbnail="thumbnails/$section_name/$img_filename"
|
||||||
echo "($current_image/$total_images): $img -> $thumbnail"
|
echo "Generating thumbnail ($current_image/$total_images): $img -> $thumbnail"
|
||||||
magick "$img" -resize 300x300 "$thumbnail"
|
magick "$img" -resize 200x200 "$thumbnail"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -54,12 +54,16 @@ write_section_header() {
|
|||||||
|
|
||||||
write_img() {
|
write_img() {
|
||||||
echo "write image ..."
|
echo "write image ..."
|
||||||
local img_relative_path=${1#./}
|
# Remove leading './' from path if present
|
||||||
local section_name=$(echo "$img_relative_path" | cut -d'/' -f2)
|
local img_path="${1#./}"
|
||||||
|
local section_name=$(echo "$img_path" | cut -d'/' -f2)
|
||||||
local img_filename="${1##*/}"
|
local img_filename="${1##*/}"
|
||||||
local thumbnail="thumbnails/$section_name/$img_filename"
|
|
||||||
echo " <a target='_blank' href='$img_relative_path'>
|
# Use web-friendly paths (no leading ./)
|
||||||
<img loading='lazy' src='$thumbnail' alt='$1' width='200'></a>" >>$2
|
local thumbnail_path="thumbnails/$section_name/$img_filename"
|
||||||
|
|
||||||
|
echo " <a target='_blank' href='$img_path'>
|
||||||
|
<img loading='lazy' src='$thumbnail_path' alt='$img_filename' width='200'></a>" >>$2
|
||||||
}
|
}
|
||||||
|
|
||||||
rm *.html
|
rm *.html
|
||||||
|
|||||||
Reference in New Issue
Block a user