Skip to content

Commit

Permalink
Update styles. Add some animations. Add favicon.
Browse files Browse the repository at this point in the history
  • Loading branch information
drum-IT committed Aug 9, 2018
1 parent c6fc191 commit f5a80da
Show file tree
Hide file tree
Showing 31 changed files with 3,829 additions and 41 deletions.
Binary file added android-icon-144x144.png
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 android-icon-192x192.png
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 android-icon-36x36.png
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 android-icon-48x48.png
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 android-icon-72x72.png
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 android-icon-96x96.png
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 apple-icon-114x114.png
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 apple-icon-120x120.png
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 apple-icon-144x144.png
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 apple-icon-152x152.png
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 apple-icon-180x180.png
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 apple-icon-57x57.png
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 apple-icon-60x60.png
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 apple-icon-72x72.png
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 apple-icon-76x76.png
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 apple-icon-precomposed.png
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 apple-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 56 additions & 2 deletions assets/scripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ const religionTable = document.getElementById("religion_table");
const hobbyTable = document.getElementById("hobby_table");
const quirkTable = document.getElementById("quirk_table");

const hidden = document.querySelectorAll(".hidden");
const list = document.querySelectorAll(".list");
const control = document.getElementById("control");

export function updatePersonDetails(person) {
personNameField.innerText = `${person.name} - ${person.profession}`;
Expand Down Expand Up @@ -125,7 +126,60 @@ export function updatePersonDetails(person) {
}

export function newPerson() {
control.classList.add("disabled");
control.classList.add("animated", "bounceOutLeft");
const newPerson = new Person();
list.forEach((listItem, index) => {
if (Array.from(listItem.classList).indexOf("hidden") > -1) {
listItem.classList.add("animated", "bounceInRight");
listItem.classList.remove("hidden");
if (index === list.length - 1) {
updatePersonDetails(newPerson);
setTimeout(() => {
control.classList.remove("disabled");
control.classList.remove("new");
control.classList.remove("bounceOutLeft");
control.classList.add("old");
control.classList.add("fadeIn");
}, 1000);
}
} else {
listItem.classList.remove("bounceInRight");
listItem.classList.add("bounceOutLeft");
control.classList.remove("fadeIn");
control.classList.add("bounceOutLeft");
setTimeout(() => {
listItem.classList.remove("bounceOutLeft");
listItem.classList.add("bounceInRight");
}, 500);
if (index === list.length - 1) {
setTimeout(() => {
clearPersonDetails();
}, 500);
setTimeout(() => {
updatePersonDetails(newPerson);
}, 600);
setTimeout(() => {
control.classList.remove("bounceOutLeft");
control.classList.add("fadeIn");
control.classList.remove("disabled");
}, 1500);
}
}
});
}

function clearPersonDetails() {
personalityTable.innerHTML = "";
personTable.innerHTML = "";
religionTable.innerHTML = "";
hobbyTable.innerHTML = "";
quirkTable.innerHTML = "";
}

function start() {
const newPerson = new Person();
hidden.forEach(hidden => hidden.classList.remove("hidden"));
updatePersonDetails(newPerson);
}

// start();
Loading

0 comments on commit f5a80da

Please sign in to comment.