Skip to content

Commit

Permalink
Update group_photos.html
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiq authored Dec 19, 2023
1 parent 62532b7 commit 264ea62
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions _includes/main/group_photos.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,7 @@
caption: "Lucas, Leandro, Pamella, and Jéssica, 2023."
}
];
var rand = 1000/pics.length
function randomimage() {
currentdate = new Date()
image_number = currentdate.getMilliseconds()
image_number = Math.floor(image_number/rand)
return [
pics[image_number].image,
pics[image_number].caption
]
}
var imgdata = randomimage()
document.write("<img width=485px src='" + imlocation + imgdata[0]+ "'><br>"+ imgdata[1]);
let randomIndex = Math.floor(Math.random() * pics.length);
let rndpic = pics[randomIndex];
document.write("<img width=485px src='" +rndpic.image+ "'><br>"+rndpic.caption);
</script>

0 comments on commit 264ea62

Please sign in to comment.