Permalink
Browse files

Bring back background on the login screen. Link to github.

  • Loading branch information...
1 parent b97ef7e commit 7ea18c72f15eb543958d4e100501b2ba18fa0478 @ry ry committed Jun 5, 2009
Showing with 19 additions and 43 deletions.
  1. BIN bg.png
  2. +0 −1 client.js
  3. +1 −1 fu.js
  4. +9 −7 index.html
  5. +4 −2 server.js
  6. +5 −32 style.css
View
BIN bg.png
Deleted file not rendered
View
1 client.js
@@ -276,7 +276,6 @@ $(document).ready(function() {
$("#entry").keypress(handleKeyPress);
$("#connectButton").click(function () {
- $("#loading").show();
showLoad();
var nick = $("#nickInput").attr("value");
View
2 fu.js
@@ -1,4 +1,4 @@
-DEBUG = false;
+DEBUG = true;
var fu = exports;
View
16 index.html
@@ -10,14 +10,16 @@
<div id="connect">
<form action="#">
<fieldset>
- <div class="field">
- <label for="nick">Name</label>
- <input id="nickInput" class="text"type="text" name="nick" value=""/>
- </div>
+ <p>
+ This is a chat room. Both the client-side and server-side are
+ written in javascript. The source code is
+ <a href="http://github.com/ry/node_chat/tree/master">here</a>.
+ </p>
+
+ <label for="nick">Name</label>
+ <input id="nickInput" class="text"type="text" name="nick" value=""/>
+ <input id="connectButton" class="button" type="submit" name="" value="Join"/>
- <div class="buttons">
- <input id="connectButton" class="button" type="submit" name="" value="Join"/>
- </div>
</fieldset>
</form>
</div>
View
6 server.js
@@ -1,3 +1,6 @@
+HOST = null; // localhost
+PORT = 8000;
+
var fu = require("fu");
var MESSAGE_BACKLOG = 200;
@@ -96,10 +99,9 @@ setInterval(function () {
}, 1000);
function onLoad () {
- fu.listen(7000);
+ fu.listen(PORT, HOST);
fu.get("/", fu.staticHandler("index.html"));
- fu.get("/bg.png", fu.staticHandler("bg.png"));
fu.get("/style.css", fu.staticHandler("style.css"));
fu.get("/client.js", fu.staticHandler("client.js"));
fu.get("/jquery-1.2.6.min.js", fu.staticHandler("jquery-1.2.6.min.js"));
View
37 style.css
@@ -27,7 +27,7 @@ a { text-decoration: none; color: #888; }
a:hover { text-decoration: underline; color: #aaa; }
#loading, #connect {
- background: url(/bg.png);
+ background: #22252a;
position: fixed;
top: 0;
left: 0;
@@ -40,37 +40,11 @@ a:hover { text-decoration: underline; color: #aaa; }
#connect { z-index: 10000001; }
#loading p, #connect fieldset {
- margin: 5em auto;
- width: 20em;
-}
-
-/* Here's our form stuff */
- fieldset, form, label, legend
-{border: 0; margin: 0; outline: 0; padding: 0; background: transparent; vertical-align: baseline;}
-
-form .field, form .buttons {clear: both; margin: 0 0 1.5em;}
-form .field label {display: block;}
-form ul.fields {margin: 0 0 1.5em; padding: 0;}
-form ul.fields li {list-style-type: none; margin: 0;}
-form ul.inline li, form ul.inline label {display: inline;}
-form ul.inline li {padding: 0 .75em 0 0;}
-
-input.radio, input.checkbox {vertical-align: top;}
-label, button, input.submit, input.image {cursor: pointer;}
-* html input.radio, * html input.checkbox {vertical-align: middle;} /* ie6 */
-*+html input.radio, *+html input.checkbox {vertical-align: middle;} /* ie7 */
-
-textarea {overflow: auto;}
-input.text, input.password, textarea, select {margin: 0; vertical-align: baseline;}
-input.text, input.password, textarea {border: 1px solid #444; padding: 2px;}
-input.text, input.password, textarea {
- background: #aaa;
+ font-family: DejaVu Sans Mono, fixed;
+ width: 30em;
+ border: 0;
}
-/* horizontal layout */
-form.horizontal .field {padding-left: 150px;}
-form.horizontal .field label {display: inline; float: left; width: 140px; margin-left: -150px;}
-
#toolbar {
position: fixed;
@@ -114,11 +88,11 @@ form.horizontal .field label {display: inline; float: left; width: 140px; margin
font-weight: bold;
padding: 0 1em 0 0.5em;
}
+
.nick a {
color: inherit;
}
-
#toolbar ul {
margin: 0;
padding: 0;
@@ -130,4 +104,3 @@ form.horizontal .field label {display: inline; float: left; width: 140px; margin
float: left;
margin: 0 0.5em;
}
-

0 comments on commit 7ea18c7

Please sign in to comment.