summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-05-09 07:06:30 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-05-09 07:06:30 +0200
commit9496e49dea54e07b7af02d714bcdf532032d951f (patch)
treeca17e22498b504fc8e99b01e961d85cf7495ca0f /bin
parentd7b2180943a230073f1d82d5baabe0f02272f3ff (diff)
decrease image size on small screens
Diffstat (limited to 'bin')
-rwxr-xr-xbin/pyggle16
1 files changed, 12 insertions, 4 deletions
diff --git a/bin/pyggle b/bin/pyggle
index 1b935e4..a0e6d27 100755
--- a/bin/pyggle
+++ b/bin/pyggle
@@ -547,8 +547,12 @@ def copy_files(base_dir):
boxwidth = f"{args.size * args.spacing}px"
boxheight = f"{args.size * args.spacing}px"
- imgwidth = f"{args.size}px"
- imgheight = f"{args.size}px"
+ limgwidth = f"{args.size}px"
+ limgheight = f"{args.size}px"
+ mimgwidth = f"{args.size/2}px"
+ mimgheight = f"{args.size/2}px"
+ simgwidth = f"{args.size/3}px"
+ simgheight = f"{args.size/3}px"
css_files = ["glightbox.min.css", "light.css", "dark.css"]
js_files = ["glightbox.min.js"]
@@ -564,8 +568,12 @@ def copy_files(base_dir):
main_css = main_css.replace("/* $boxwidth */", boxwidth)
main_css = main_css.replace("/* $boxheight */", boxheight)
- main_css = main_css.replace("/* $imgwidth */", imgwidth)
- main_css = main_css.replace("/* $imgheight */", imgheight)
+ main_css = main_css.replace("/* $limgwidth */", limgwidth)
+ main_css = main_css.replace("/* $limgheight */", limgheight)
+ main_css = main_css.replace("/* $mimgwidth */", mimgwidth)
+ main_css = main_css.replace("/* $mimgheight */", mimgheight)
+ main_css = main_css.replace("/* $simgwidth */", simgwidth)
+ main_css = main_css.replace("/* $simgheight */", simgheight)
with open(".data/css/main.css", "w") as f:
f.write(main_css)