Skip to content

Commit

Permalink
:
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyhuang07 committed Nov 20, 2024
1 parent 1b84f03 commit 1e96068
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 35 deletions.
Binary file added assets/appstore.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 assets/discord.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 0 additions & 30 deletions src/pages/megan.html

This file was deleted.

32 changes: 27 additions & 5 deletions src/scripts/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
const inApp = document.querySelector("#inApp")
const menu = document.querySelector(".menu")
const appStore = document.querySelector(".appStore")
const projects = document.querySelector(".projects")
const contacts = document.querySelector(".contacts")
const appButton = document.querySelector(".appButton")
const appView = document.querySelector(".appView")

window.onkeydown = (e) => {
if(e.keyCode == 27){
returnHome()
if (appView.style.visibility === "visible") {
hideAppView();
} else {
returnHome();
}
}
}

Expand All @@ -20,6 +27,9 @@ function appOpen(app){
appStore.style.opacity = "1";
break;
case 2:
projects.style.visibility = "visible";
projects.style.overflow = "auto";
projects.style.opacity = "1";
break;
case 3:
contacts.style.visibility = "visible";
Expand All @@ -30,7 +40,19 @@ function appOpen(app){

function returnHome(){
document.body.style.overflow = "hidden";
inApp.style.overflow = menu.style.overflow = "hidden"
inApp.style.visibility = appStore.style.visibility = contacts.style.visibility = "hidden";
inApp.style.opacity = menu.style.opacity = "0";
}
inApp.style.overflow = menu.style.overflow = appView.style.overflow = "hidden";
inApp.style.visibility = appStore.style.visibility = appView.style.visibility = projects.style.visibility = contacts.style.visibility = "hidden";
inApp.style.opacity = menu.style.opacity = appView.style.opacity = "0";
}

function hideAppView(){
appView.style.visibility = "hidden"
appView.style.opacity = "0"
appView.style.overflow = "hidden"
}

appButton.addEventListener("click", () => {
appView.style.visibility = "visible"
appView.style.opacity = "1"
appView.style.overflow = "auto"
})

0 comments on commit 1e96068

Please sign in to comment.