content/hifi-content/rebecca/laser/laser.html
2022-02-14 02:04:11 +01:00

117 lines
No EOL
4.3 KiB
HTML

<html>
<head>
<title>Laser Pointer</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Raleway:300,400,600,700" rel="stylesheet">
<style>
body {
margin: 10;
width: 100% - 10px;
font-family: 'Raleway', sans-serif;
color: white;
background: linear-gradient(#2b2b2b, #0f212e);
}
.top-bar {
height: 90px;
background: linear-gradient(#2b2b2b, #1e1e1e);
font-weight: bold;
padding-left: 30px;
padding-right: 30px;
display: flex;
align-items: center;
position: fixed;
width: 480px;
top: 0;
z-index: 1;
}
.content {
margin-top: 90px;
padding: 30px;
}
input[type=button] {
font-family: 'Raleway';
font-weight: bold;
font-size: 13px;
text-transform: uppercase;
vertical-align: top;
height: 28px;
min-width: 120px;
padding: 0px 18px;
margin-right: 6px;
border-radius: 5px;
border: none;
color: #fff;
background-color: #000;
background: linear-gradient(#343434 20%, #000 100%);
cursor: pointer;
}
input[type=button].white {
color: #121212;
background-color: #afafaf;
background: linear-gradient(#fff 20%, #afafaf 100%);
}
input[type=button]:enabled:hover {
background: linear-gradient(#000, #000);
border: none;
}
input[type=button].white:enabled:hover {
background: linear-gradient(#fff, #fff);
border: none;
}
input[type=button]:active {
background: linear-gradient(#343434, #343434);
}
input[type=button].white:active {
background: linear-gradient(#afafaf, #afafaf);
}
input[type=button]:disabled {
color: #252525;
background: linear-gradient(#575757 20%, #252525 100%);
}
input[type=button][pressed=pressed] {
color: #00b4ef;
}
</style>
</head>
<body>
<h1>Laser Pointer/Flashlight</h1>
<h2>Lead the way!</h2>
<br><br>
<input type="button" class="white" id="toggle" value="On/Off"> </input>
<input type="checkbox" id="flashlight"> Flashlight Mode </input><br><br>
<input type="button" class="white" id="done" value = "I'm Done!"></input> <br><br>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script>
$('#toggle').click(function(){
var event = {
type: "toggle"
};
EventBridge.emitWebEvent(JSON.stringify(event));
});
$('#flashlight').click(function(){
var event = {
type: "flashlight",
value: document.getElementById("flashlight").checked
};
EventBridge.emitWebEvent(JSON.stringify(event));
});
$('#done').click(function(){
var event = {
type: "done"
};
EventBridge.emitWebEvent(JSON.stringify(event));
});
</script>
</body>
</html>