This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const signUpButton = document.getElementById('signUp'); | |
const signInButton = document.getElementById('signIn'); | |
const container = document.getElementById('container'); | |
signUpButton.addEventListener('click', () => { | |
container.classList.add('right-panel-active'); | |
}); | |
signInButton.addEventListener('click', () => { | |
container.classList.remove('right-panel-active'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { body } = document; | |
let zoomActivated = false; | |
window.addEventListener('keydown', (e) => { | |
if(e.key === 'z') { | |
zoomActivated = !zoomActivated; | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<div class="row text-center"> | |
<h3> | |
Feeling hungry? | |
</h3> | |
<h5>Get a random meal by clicking below</h5> | |
<button class="button-primary" id="get_meal">Get Meal 🍔</button> | |
</div> | |
<div id="meal" class="row meal"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<h3>Don't laugh challenge</h3> | |
<div id="joke" class="joke"></div> | |
<button id="get_joke" class="btn">Get Another Joke</button> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a class="blob" href="google.com"> Check Price </a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Countdown | |
timeTillDate="05 26 2019, 6:00 am" | |
timeFormat="MM DD YYYY, h:mm a" | |
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import moment from 'moment'; | |
class Countdown extends React.Component { | |
state = { | |
days: undefined, | |
hours: undefined, | |
minutes: undefined, | |
seconds: undefined | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mapNumber(number, in_min, in_max, out_min, out_max) { | |
return ( | |
((number - in_min) * (out_max - out_min)) / (in_max - in_min) + out_min | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.countdown-svg { | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100px; | |
height: 100px; | |
} |
NewerOlder