Skip to content

Commit

Permalink
Add ungrouped image
Browse files Browse the repository at this point in the history
  • Loading branch information
Aqua-sc committed Dec 26, 2024
1 parent 4c8cc74 commit 4a8c880
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 3 deletions.
Binary file added collage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 54 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,54 @@
<body bgcolor="black">
<img src="collage.png_stacked.png" style="width: 100%; height: auto; max-width: 100%;" />
</body>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Toggle Images</title>
<style>
body {
background-color: black;
color: white;
font-family: Arial, sans-serif;
text-align: center;
}

img {
width: 100%;
height: auto;
max-width: 100%;
display: none;
}

.visible {
display: block;
}
</style>
</head>
<body>

<button onclick="toggleImage()" id="button">Show ungrouped</button>

<img src="collage.png_stacked.png" id="image1" class="visible" />
<img src="collage.png" id="image2" />

<script>
function toggleImage() {
var image1 = document.getElementById('image1');
var image2 = document.getElementById('image2');

var button = document.getElementById('button');

if (image1.classList.contains('visible')) {
image1.classList.remove('visible');
image2.classList.add('visible');
button.innerHTML = 'Show ungrouped';
} else {
image2.classList.remove('visible');
image1.classList.add('visible');
button.innerHTML = 'Show grouped';
}
}
</script>

</body>
</html>

0 comments on commit 4a8c880

Please sign in to comment.