procedural shuffle update
This commit is contained in:
parent
f92410f38a
commit
b55bc7c11e
6 changed files with 65 additions and 19 deletions
22
subsystem/subres/profileShuffle.js
Normal file
22
subsystem/subres/profileShuffle.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
function profileShuffle() {
|
||||
let shuffle = document.getElementsByClassName("profile");
|
||||
|
||||
for (let i = 0; i < shuffle.length; i++) {
|
||||
let rnd = Math.round((Math.random() * (1.5 + 1.5) - 1.5) * 100) / 100;
|
||||
|
||||
// Shuffle profile cards
|
||||
shuffle[i].style.transform = "rotate(" + rnd + "deg)";
|
||||
|
||||
//Headings and Image
|
||||
shuffle[i].getElementsByTagName("hgroup")[0].style.transform =
|
||||
"rotate(" + rnd * -1 + "deg)";
|
||||
|
||||
// Bio Text
|
||||
shuffle[i].getElementsByTagName("div")[0].style.transform =
|
||||
"rotate(" + rnd * -1 + "deg)";
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
profileShuffle();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue