Add new index page
This commit was merged in pull request #6.
This commit is contained in:
24
projectorpi_web/index.html
Normal file
24
projectorpi_web/index.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head></head>
|
||||
<body>
|
||||
<main>
|
||||
<button class="remote-button" data-direction="up">UP</button>
|
||||
<button class="remote-button" data-direction="right">RIGHT</button>
|
||||
<button class="remote-button" data-direction="down">DOWN</button>
|
||||
<button class="remote-button" data-direction="left">LEFT</button>
|
||||
<button class="remote-button" data-direction="enter">ENTER</button>
|
||||
<button class="remote-button" data-direction="menu">MENU</button>
|
||||
<button class="remote-button" data-direction="vol_up">VOL UP</button>
|
||||
<button class="remote-button" data-direction="vol_down">VOL DOWN</button>
|
||||
</main>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
document.addEventListener('click', (e) => {
|
||||
let direction = e.target.dataset.direction
|
||||
fetch(`/control/${direction}`, {method: 'POST'})
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user