Try it as a background image

This commit is contained in:
Timothy Farrell 2026-04-12 11:04:28 +00:00
parent 9fd80f5d12
commit 63d223b4d6

View File

@ -14,7 +14,7 @@
overflow: hidden; overflow: hidden;
zoom: 1; zoom: 1;
} }
img { .img {
max-width: 100%; max-width: 100%;
max-height: 100%; max-height: 100%;
width: auto; width: auto;
@ -23,7 +23,9 @@
cursor: pointer; cursor: pointer;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
background: #1a1a1a; background-image: url($img_url);
background-size: cover; /* Important for proper scaling */
background-position: center;
} }
.chevron { .chevron {
position: absolute; position: absolute;
@ -55,7 +57,7 @@
</head> </head>
<body> <body>
<div id="container"> <div id="container">
<a href="$image_click_url"><img id="img" src="$img_url" title="$filename"></a> <a href="$image_click_url"><div id="img" title="$filename"></div></a>
<a href="$prev_url" class="chevron left" id="prev-btn">&#8249;</a> <a href="$prev_url" class="chevron left" id="prev-btn">&#8249;</a>
<a href="$next_url" class="chevron right" id="next-btn">&#8250;</a> <a href="$next_url" class="chevron right" id="next-btn">&#8250;</a>
$play_button $play_button