diff options
-rwxr-xr-x | bin/pyggle | 16 | ||||
-rw-r--r-- | share/css/main.css | 17 |
2 files changed, 27 insertions, 6 deletions
@@ -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) diff --git a/share/css/main.css b/share/css/main.css index 3ee132c..3072929 100644 --- a/share/css/main.css +++ b/share/css/main.css @@ -7,9 +7,10 @@ a { } h1 { + font-size: 120%; clear: both; padding-top: 1em; - margin-left: 1em; + margin-left: 0.5em; } .nav { @@ -42,11 +43,23 @@ div.image-container a { } div.image-container img { - height: /* $imgheight */; + height: /* $limgheight */; margin: 0; padding: 0; } +@media (max-width: 992px) { + div.image-container img { + height: /* $mimgheight */; + } +} + +@media (max-width: 600px) { + div.image-container img { + height: /* $simgheight */; + } +} + div.image-page { text-align: center; } |