Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
theodoretnguyen committed Feb 8, 2023
1 parent 8b49ca0 commit 9e2b175
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 19 deletions.
3 changes: 3 additions & 0 deletions app.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ td {
text-align: center;
}

/* images */
img {
max-width: 40%;
height: auto;
Expand Down Expand Up @@ -62,6 +63,7 @@ p {
font-size: 14pt;
}

/* buttons */
input {
padding: 16px 32px;
text-decoration: none;
Expand Down Expand Up @@ -120,6 +122,7 @@ input {
color: black;
}

/* counter */
.counter {
font-size: 40pt;
}
19 changes: 5 additions & 14 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,24 @@
// price of tokens
const red_token_price = 2;
const blue_token_price = 3;

// Big Hero 6 button
let tix_bg6 = 0;
document.getElementById('button_bg6').addEventListener('click',
function() {
document.getElementById('tix_bg6').innerHTML = `${++tix_bg6}`;
}
);

/* document.getElementById('button_bg6').addEventListener('click',
function() {
let rev_bg6 = tix_bg6 * 3 * red_token_price + tix_bg6 * 2 * blue_token_price;
document.getElementById('rev_bg6').innerHTML = `${rev_bg6}`;
}
); */

// Inside Out button
let tix_io = 0;
document.getElementById('button_io').addEventListener('click',
function() {
document.getElementById('tix_io').innerHTML = `${++tix_io}`;
}
);

/* document.getElementById('button_io').addEventListener('click',
function() {
let rev_io = tix_io * 2 * red_token_price + tix_io * 3 * blue_token_price;
document.getElementById('rev_io').innerHTML = `${rev_io}`;
}
); */

// show revenues button
document.getElementById('button_rev').addEventListener('click',
function() {
let rev_bg6 = tix_bg6 * 3 * red_token_price + tix_bg6 * 2 * blue_token_price;
Expand All @@ -39,6 +29,7 @@ document.getElementById('button_rev').addEventListener('click',
}
);

// reset button
document.getElementById('button_reset').addEventListener('click',
function() {
tix_bg6 = 0;
Expand Down
9 changes: 4 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,10 @@ <h1>Movie Theater Equations</h1>
</div>
</main>


<footer>
<hr>
&copy; <i>Theodore Nguyen, 2023</i>
</footer>
</body>

<footer>
<hr>
&copy; <i>Theodore Nguyen, 2023</i>
</footer>
</html>

0 comments on commit 9e2b175

Please sign in to comment.