-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
52 lines (49 loc) · 1.7 KB
/
index.html
File metadata and controls
52 lines (49 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Submit a Ticket</title>
</head>
<body>
<!-- Begin embedable code -->
<style>
#submitBtn {
color: #ffffff;
/* background-color: #ff0000; */
background: linear-gradient(-45deg, #ff0000 60%, #ffffff);
border: 15px solid #5d5d5d;
border-radius: 50%;
padding: 20px;
font-family: sans-serif;
font-size: 30px;
font-weight: 900;
height: 220px;
width: 220px;
cursor: pointer;
box-shadow: 5px 5px 15px #000000;
}
#submitBtn:active {
font-size: 29px;
box-shadow: inset 0 0 10px #000000, 5px 5px 15px #000000;
background: linear-gradient(-50deg, #ff0000 70%, #ffffff);
}
</style>
<div>
<button id="submitBtn">Submit a Ticket</button>
</div>
<script>
// get button and audio
let submitBtn = document.getElementById("submitBtn");
// event listener
submitBtn.onclick = () => {
// play audio
let audio = new Audio("https://github.com/ComputerPile/SubmitATicketButton/blob/main/audio/SubmitATicket.m4a?raw=true");
audio.play().catch(e => {
console.error("Error playing audio: ", e);
});
};
</script>
<!-- End embedable code -->
</body>
</html>