A Pen by Matthieu Godin on CodePen.
Created
July 18, 2023 13:22
-
-
Save Kaliz3au/dc7b1fe548a34390166ce8239b30f494 to your computer and use it in GitHub Desktop.
Tesla
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
<button class="comein" onclick="comein()"> | |
Ouvrir | |
</button> | |
<button class="comeout" onclick="comeout()"> | |
Fermer | |
</button> |
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 comein = () => fetch('https://maker.ifttt.com/trigger/when_come_in_event/json/with/key/nb3oo5Mx7SVAlIDsME-c0') | |
const comeout = () => fetch('https://maker.ifttt.com/trigger/when_come_out_event/json/with/key/nb3oo5Mx7SVAlIDsME-c0') |
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
body { | |
display: flex; | |
flex-direction: column; | |
gap: 20px; | |
width: 100vw; | |
height: 100vh; | |
margin: 0; | |
padding: 20px; | |
box-sizing: border-box; | |
background-color: #2c3e50; | |
} | |
button { | |
flex: 1; | |
border: none; | |
border-radius: 20px; | |
font-size: 20vh; | |
color: #ecf0f1; | |
&:active { | |
&.comein { | |
background-color: #16a085; | |
} | |
&.comeout { | |
background-color: #f39c12; | |
} | |
} | |
&.comein { | |
background-color: #1abc9c; | |
} | |
&.comeout { | |
background-color: #f1c40f; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment