-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhomepage.js
46 lines (35 loc) · 1.46 KB
/
homepage.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
window.onload = () => {
const homeButton = document.getElementById("Home")
const homepage = document.getElementById("homepage")
const addArea = document.getElementById("addArea")
const nasaForm = document.getElementById("NASA-Form")
const missionToMars = document.getElementById("Mission-To-Mars")
const MMS = document.getElementById("MMS")
const nasaSpacex = document.getElementById("nasa-spacex")
const submitbtn = document.getElementById("submit")
const logout = document.getElementById("logout")
missionToMars.addEventListener('click', () => {
homepage.style.display = "none"
addArea.style.display = "flex"
nasaForm.style.display = "flex"
MMS.style.display = "flex"
nasaForm.style.flexDirection = "column"
nasaForm.style.justifyContent = "left"
nasaForm.style.alignItems = "left"
})
homeButton.addEventListener('click', () => {
homepage.style.display = "flex"
addArea.style.display = "none"
MMS.style.display = "none"
nasaSpacex.style.width = "79.5rem"
nasaSpacex.style.height = "28rem"
nasaSpacex.style.marginTop = "1rem"
nasaSpacex.style.marginLeft = "2rem"
nasaSpacex.style.marginRight = "2rem"
nasaSpacex.style.marginBottom = "1rem"
nasaSpacex.style.float = "center"
})
logout.addEventListener('click', () => {
alert("You have successfully logged out.")
})
}