Update index.html
Browse files- index.html +69 -23
index.html
CHANGED
|
@@ -2,50 +2,96 @@
|
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
-
<
|
|
|
|
| 6 |
<style>
|
| 7 |
body {
|
|
|
|
|
|
|
| 8 |
font-family: Arial, sans-serif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
text-align: center;
|
| 10 |
-
margin-
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
}
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
}
|
|
|
|
| 17 |
button {
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
cursor: pointer;
|
| 22 |
border: none;
|
| 23 |
-
border-radius:
|
|
|
|
|
|
|
| 24 |
transition: 0.2s;
|
| 25 |
-
color: white;
|
| 26 |
}
|
|
|
|
| 27 |
#leftBtn {
|
| 28 |
-
background-color: #
|
| 29 |
}
|
| 30 |
-
#leftBtn:
|
| 31 |
-
background-color: #
|
| 32 |
}
|
|
|
|
| 33 |
#rightBtn {
|
| 34 |
-
background-color: #
|
| 35 |
}
|
| 36 |
-
#rightBtn:
|
| 37 |
-
background-color: #
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
}
|
| 39 |
</style>
|
| 40 |
</head>
|
| 41 |
<body>
|
| 42 |
-
<
|
| 43 |
-
|
| 44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
<script>
|
| 47 |
-
// Replace with your PC
|
| 48 |
-
const pcIP = "192.168.100.121";
|
| 49 |
|
| 50 |
function sendAction(action) {
|
| 51 |
fetch(`http://${pcIP}:8000/trigger`, {
|
|
|
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Slide Controller</title>
|
| 7 |
<style>
|
| 8 |
body {
|
| 9 |
+
margin: 0;
|
| 10 |
+
padding: 0;
|
| 11 |
font-family: Arial, sans-serif;
|
| 12 |
+
background-color: #121212;
|
| 13 |
+
color: #ffffff;
|
| 14 |
+
display: flex;
|
| 15 |
+
flex-direction: column;
|
| 16 |
+
justify-content: space-between;
|
| 17 |
+
align-items: center;
|
| 18 |
+
height: 100vh;
|
| 19 |
+
padding: 20px;
|
| 20 |
+
box-sizing: border-box;
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
header {
|
| 24 |
text-align: center;
|
| 25 |
+
margin-bottom: 20px;
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
header h1 {
|
| 29 |
+
font-size: 2.5em;
|
| 30 |
+
margin: 0;
|
| 31 |
+
color: #00e676;
|
| 32 |
}
|
| 33 |
+
|
| 34 |
+
header p {
|
| 35 |
+
font-size: 1em;
|
| 36 |
+
margin: 0;
|
| 37 |
+
color: #aaaaaa;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
.buttons {
|
| 41 |
+
width: 100%;
|
| 42 |
+
display: flex;
|
| 43 |
+
justify-content: space-between;
|
| 44 |
+
flex-grow: 1;
|
| 45 |
+
align-items: center;
|
| 46 |
}
|
| 47 |
+
|
| 48 |
button {
|
| 49 |
+
width: 40%;
|
| 50 |
+
height: 40%;
|
| 51 |
+
font-size: 2.5em;
|
|
|
|
| 52 |
border: none;
|
| 53 |
+
border-radius: 20px;
|
| 54 |
+
cursor: pointer;
|
| 55 |
+
color: #ffffff;
|
| 56 |
transition: 0.2s;
|
|
|
|
| 57 |
}
|
| 58 |
+
|
| 59 |
#leftBtn {
|
| 60 |
+
background-color: #ff5722;
|
| 61 |
}
|
| 62 |
+
#leftBtn:active {
|
| 63 |
+
background-color: #e64a19;
|
| 64 |
}
|
| 65 |
+
|
| 66 |
#rightBtn {
|
| 67 |
+
background-color: #2196f3;
|
| 68 |
}
|
| 69 |
+
#rightBtn:active {
|
| 70 |
+
background-color: #1976d2;
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
@media (max-width: 600px) {
|
| 74 |
+
button {
|
| 75 |
+
width: 45%;
|
| 76 |
+
height: 35%;
|
| 77 |
+
font-size: 2em;
|
| 78 |
+
}
|
| 79 |
}
|
| 80 |
</style>
|
| 81 |
</head>
|
| 82 |
<body>
|
| 83 |
+
<header>
|
| 84 |
+
<h1>Slide Controller</h1>
|
| 85 |
+
<p>Developed by Hamza</p>
|
| 86 |
+
</header>
|
| 87 |
+
|
| 88 |
+
<div class="buttons">
|
| 89 |
+
<button id="leftBtn">⬅ Left</button>
|
| 90 |
+
<button id="rightBtn">➡ Right</button>
|
| 91 |
+
</div>
|
| 92 |
|
| 93 |
<script>
|
| 94 |
+
const pcIP = "192.168.100.121"; // Replace with your PC IP
|
|
|
|
| 95 |
|
| 96 |
function sendAction(action) {
|
| 97 |
fetch(`http://${pcIP}:8000/trigger`, {
|