-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head><title>MRQART</title> | ||
<link rel="stylesheet" type="text/css" href="static/main.css" /> | ||
</head> | ||
<script> | ||
/* TODO: move into own file. run tests? */ | ||
function receivedMessage(msg) { | ||
console.log("new message!", msg); | ||
//TODO: msg as json; parse alert | ||
let el = document.createElement("p"); | ||
el.textContent = msg.data; | ||
document.getElementById("sequences").appendChild(el); | ||
} | ||
|
||
function update_via_ws() { | ||
const ws = new WebSocket("ws://127.0.0.1:5000/"); | ||
ws.addEventListener('message', receivedMessage); | ||
} | ||
window.onload = update_via_ws; | ||
|
||
</script> | ||
|
||
<body> | ||
<div id="alert"></div> | ||
<div id="project"></div> | ||
<div id="sequence number"></div> | ||
<ul id="sequences">waiting for scanner</ul> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
html { | ||
max-width: 70ch; | ||
padding: 3em 1em; | ||
margin: auto; | ||
line-height: 1.75; | ||
font-size: 1.25em; | ||
} |