Skip to content

Instantly share code, notes, and snippets.

@Kaliz3au
Created July 18, 2023 13:22
Show Gist options
  • Save Kaliz3au/dc7b1fe548a34390166ce8239b30f494 to your computer and use it in GitHub Desktop.
Save Kaliz3au/dc7b1fe548a34390166ce8239b30f494 to your computer and use it in GitHub Desktop.
Tesla
<button class="comein" onclick="comein()">
Ouvrir
</button>
<button class="comeout" onclick="comeout()">
Fermer
</button>
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')
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