Skip to content

Commit

Permalink
add photos
Browse files Browse the repository at this point in the history
  • Loading branch information
zhamic7 committed Jul 17, 2024
1 parent a42537c commit cb4343c
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions week3/gallery.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ <h1>GALLERY! ^_< ☆</h1>

<!-- hint: majority of your lab assignment can go here -->
<div class="col1">
<button onclick="openPopup(1)" class="placeholder-img"></button>
<button onclick="openPopup(2)" class="placeholder-img"></button>
<button onclick="openPopup(1)" class="placeholder-img" style="background-image:url(images/img_001.jpg);"></button>
<button onclick="openPopup(2)" class="placeholder-img" style="background-image:url(images/img_002.jpg);"></button>
</div>

<div class="col2">
<button onclick="openPopup(3)" class="placeholder-img"></button>
<button onclick="openPopup(4)" class="placeholder-img"></button>
<button onclick="openPopup(3)" class="placeholder-img" style="background-image:url(images/img_003.jpg);"></button>
<button onclick="openPopup(4)" class="placeholder-img" style="background-image:url(images/img_004.jpg);"></button>
</div>
</main>

Expand All @@ -49,10 +49,10 @@ <h1>GALLERY! ^_< ☆</h1>
function createImage(img_id) {
const newImage = document.createElement("img");
newImage.id = "display-img";
newImage.src = "images/image.jpg";
newImage.setAttribute("alt", "Placeholder image " + img_id);
let image_source = "images/img_00" + img_id + ".jpg";
newImage.src = image_source;
newImage.setAttribute("alt", "Location image");
document.getElementById("content").appendChild(newImage);

}

function openPopup(img_id) {
Expand Down
File renamed without changes
Binary file added week3/images/img_001.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added week3/images/img_002.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added week3/images/img_003.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added week3/images/img_004.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
2 changes: 1 addition & 1 deletion week3/styles/gallery.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ main {
.placeholder-img {
width: 75%;
height: 100%;
background: url("../images/image.jpg");
background: url("../images/img_000.jpg");
background-size: cover;
background-position: center;

Expand Down

0 comments on commit cb4343c

Please sign in to comment.