Unverified Commit 9496e49d authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

decrease image size on small screens

parent d7b21809
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -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)
+15 −2
Original line number Diff line number Diff line
@@ -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;
}