Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions dom-and-events/exercises/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<title>Flight Simulator</title>
<link rel="stylesheet" type="text/css" href="style.css"/>
<script src = "script.js"></script>
</head>
<body>
<h1>Flight Simulator</h1>
<p id="statusReport">The shuttle is on the ground</p>
<button id = "liftoffButton">Take off</button>
<button id = "abortMission">Abort mission</button>
</body>
</html>
10 changes: 10 additions & 0 deletions dom-and-events/exercises/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
function init () {
const missionAbort = document.getElementById("abortMission");
const button = document.getElementById("liftoffButton");
const paragraph = document.getElementById("statusReport");

// Put your code for the exercises here.

}

window.addEventListener("load", init);
3 changes: 3 additions & 0 deletions dom-and-events/exercises/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
h1 {
text-decoration: underline;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions dom-and-events/studio/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!DOCTYPE html>
<html>
<head>
<title>Flight Simulator</title>
<link rel = "stylesheet" type = "text/css" href = "styles.css" />
<script src = "scripts.js"></script>
</head>
<body>
<div class="centered">
<h1>Flight Simulator</h1>
<h2>Current Flight Status</h2>
<p id = "flightStatus">Space shuttle ready for takeoff</p>
<h2>Shuttle Trajectory</h2>
</div>
<div id="flightDisplay">
<div class="center-block">
<h3>Fuel Levels</h3>
<p>Tank Full</p>
<h3>Astronaut Chat</h3>
<p>Houston, we are ready when you are!</p>
</div>
<div id = "shuttleBackground">
<img src = "LaunchCode_rocketline_white.png" height = "75" width = "75" id = "rocket"/>
</div>
<div class="center-block">
<button id="up">Up</button>
<button id="down">Down</button>
<button id="right">Right</button>
<button id="left">Left</button>
<h3>Space Shuttle Height</h3>
<p id="spaceShuttleHeight">0</p><span> miles</span>
</div>
</div>
<div class="centered">
<button id = "takeoff">Take off</button>
<button id = "landing">Land</button>
<button id = "missionAbort">Abort Mission</button>
</div>
</body>
</html>
2 changes: 2 additions & 0 deletions dom-and-events/studio/scripts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Write your JavaScript code here.
// Remember to pay attention to page loading!
30 changes: 30 additions & 0 deletions dom-and-events/studio/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#shuttleBackground {
background-color: green;
display: inline-block;
height: 80%;
width: 40%;
position: relative;
}

#flightStatus {
color: green;
}

#flightDisplay {
text-align: center;
height: 400px;
width: 100%;
}

#spaceShuttleHeight {
display: inline-block;
}

.center-block {
text-align: center;
display: inline-block;
}

.centered {
text-align: center;
}