mirror of
https://github.com/gen2brain/cam2ip.git
synced 2026-01-09 08:08:33 +00:00
Remove CSS and add table
This commit is contained in:
@@ -45,36 +45,6 @@ func (h *HTML) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||||||
var html = `<html>
|
var html = `<html>
|
||||||
<head>
|
<head>
|
||||||
<title>cam2ip</title>
|
<title>cam2ip</title>
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
background-color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
div {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
canvas {
|
|
||||||
height: auto;
|
|
||||||
width: auto;
|
|
||||||
max-height: 100%;
|
|
||||||
max-width: 100%;
|
|
||||||
display: block;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
margin: auto;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<script>
|
<script>
|
||||||
var url = "ws://{BIND}/socket";
|
var url = "ws://{BIND}/socket";
|
||||||
ws = new WebSocket(url);
|
ws = new WebSocket(url);
|
||||||
@@ -103,7 +73,13 @@ var html = `<html>
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body style="background-color: #000000">
|
||||||
<div><canvas id="canvas" width="{WIDTH}" height="{HEIGHT}"></canvas></div>
|
<table style="width:100%; height:100%">
|
||||||
|
<tr style="height:100%">
|
||||||
|
<td style="height:100%; text-align:center">
|
||||||
|
<canvas id="canvas" width="{WIDTH}" height="{HEIGHT}"></canvas>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</body>
|
</body>
|
||||||
</html>`
|
</html>`
|
||||||
|
|||||||
Reference in New Issue
Block a user