Skip to content

Commit d2a8c30

Browse files
committed
fix: image zoom
1 parent ba42eac commit d2a8c30

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

journal-dnd-ki/image.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
img {
1212
object-fit: contain;
13-
width: 100%;
1413
}
1514
</style>
1615
</head>
@@ -25,6 +24,9 @@
2524
const img = document.getElementById("image")
2625
img.setAttribute("src", url.searchParams.get('image'));
2726
img.setAttribute("alt", url.searchParams.get('title'));
27+
const style = document.createElement('style');
28+
document.head.appendChild(style);
29+
style.sheet.insertRule('img {width: '+window.innerWidth+'px;}');
2830
</script>
2931

3032
</html>

0 commit comments

Comments
 (0)