Less prototypey

This commit is contained in:
Neale Pickett 2016-04-05 04:16:22 +00:00
parent dbd164e65d
commit 1727383fec
4 changed files with 18 additions and 13 deletions

View File

@ -17,16 +17,16 @@
</head> </head>
<body> <body>
<div id="overview" class="terminal"> <div id="overview" class="terminal">
🎃 <h1>Monarch Of The Hill</h1>
<p>Brought to you by dirtbags.net</p>
</div> </div>
<div id="messages" class="terminal"> <div id="messages" class="terminal">
💾 If you turn on JavaScript this will look a lot cooler.
</div> </div>
<div id="puzzles" class="terminal"> <div id="puzzles" class="terminal">
🌮 🌮 🌮 🌮 🌮 🌮 🌮 🌮 🌮
</div> </div>
<div id="main" class="terminal"> <div id="main" class="terminal">
🎩
</div> </div>
</body> </body>
</html> </html>

View File

@ -3,7 +3,7 @@ var main_terminal;
function Main(element) { function Main(element) {
var term = new Terminal(element); var term = new Terminal(element);
this.start = function() { function start() {
term.clear(); term.clear();
term.par("Main terminal.") term.par("Main terminal.")
term.par("This is the main terminal. In this terminal you will get your puzzle content and someplace to enter in possible answers. It's probably just going to pull the old URL, steal the body element, and submit it to a new Terminal method for slow-despooling of the content of text nodes.") term.par("This is the main terminal. In this terminal you will get your puzzle content and someplace to enter in possible answers. It's probably just going to pull the old URL, steal the body element, and submit it to a new Terminal method for slow-despooling of the content of text nodes.")
@ -11,12 +11,16 @@ function Main(element) {
term.par("Anyway."); term.par("Anyway.");
term.par("Hopefully this demo illustrates how things are going to look."); term.par("Hopefully this demo illustrates how things are going to look.");
} }
term.clear();
term.par("Loading…");
setTimeout(start, 2500);
} }
function main_start() { function main_start() {
main_terminal = new Main(document.getElementById("main")); main_terminal = new Main(document.getElementById("main"));
setTimeout(main_terminal.start, 2500);
} }
window.addEventListener("load", main_start); window.addEventListener("load", main_start);

View File

@ -3,17 +3,20 @@ var messages_terminal;
function Messages(element) { function Messages(element) {
var term = new Terminal(element); var term = new Terminal(element);
this.start = function() { function start() {
term.clear(); term.clear();
term.par("Messages terminal"); term.par("Messages terminal");
term.par("I've long wanted a way to communicate things to participants, like «yes, we're aware that JS 12 is broken, we are working on it», or «tanks category is now open!». This might have updates about people scoring points, or provide a chat service (although that has not historically been well-utilized)."); term.par("I've long wanted a way to communicate things to participants, like «yes, we're aware that JS 12 is broken, we are working on it», or «tanks category is now open!». This might have updates about people scoring points, or provide a chat service (although that has not historically been well-utilized).");
} }
term.clear();
term.par("Loading…");
setTimeout(start, 500);
} }
function messages_start() { function messages_start() {
messages_terminal = new Messages(document.getElementById("messages")); messages_terminal = new Messages(document.getElementById("messages"));
setTimeout(messages_terminal.start, 500);
} }
window.addEventListener("load", messages_start); window.addEventListener("load", messages_start);

View File

@ -27,15 +27,13 @@ function Puzzles(element) {
} }
function start() { function start() {
term.clear();
term.par("Loading...");
term.par("This is going to show you the list of open puzzles. It should refresh itself periodically, since not refreshing was a source of major confusion in the last setup, at least for kids, who seem not to realize what the reload button in the browser does.")
refreshInterval = setInterval(refresh, 20 * 1000); refreshInterval = setInterval(refresh, 20 * 1000);
refresh(); refresh();
} }
term.clear();
term.par("Loading…");
setTimeout(start, 3000); setTimeout(start, 3000);
} }