Permalink
Browse files

added jquery mobile

  • Loading branch information...
1 parent 646e656 commit 3abe99912fb80e580214fc44692007ef1639c367 @butu5 committed Aug 22, 2011
Showing with 43 additions and 4 deletions.
  1. +2 −2 index.coffee
  2. +39 −0 public/index.html
  3. +1 −1 public/js/client.coffee
  4. +1 −1 public/js/client.js
View
@@ -13,8 +13,8 @@ io = require('socket.io').listen(app)
console.log "Server started listening on port 80..."
app.listen 5000
-#client = new irc.Client 'irc.freenode.net', 'pkbot', {
-client = new irc.Client 'localhost', 'pkbot', {
+client = new irc.Client 'irc.freenode.net', 'pkbot', {
+#client = new irc.Client 'localhost', 'pkbot', {
debug: true,
channels: ['#node.js']
}
View
@@ -1,3 +1,41 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Hacker IRC</title>
+ <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.css" />
+ <script src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
+ <script src="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.js"></script>
+ <script src="http://cdn.socket.io/stable/socket.io.js"></script>
+ <script src="/js/handlebars.1.0.0.beta.3.js"></script>
+ <script src="/js/client.js"></script>
+</head>
+
+<body>
+ <script type='text/x-handlebars-template', id='msg-tmpl'>
+ <div class="msg">
+ <p>{{this.message}}</p>
+ </div>
+ </script>
+
+<div data-role="page">
+
+ <div data-role="header">
+ <h1>Hacker IRC</h1>
+ </div><!-- /header -->
+
+ <div data-role="content">
+ <div id="msgs">
+ </div>
+ </div><!-- /content -->
+</div><!-- /page -->
+
+</body>
+</html>
+
+<!--
<html>
<head>
<title>Hacker IRC</title>
@@ -17,3 +55,4 @@
</div>
</body>
</html>
+-->
@@ -1,4 +1,4 @@
-socket = io.connect "http://localhost"
+socket = io.connect "http://localhost:5000"
socket.on "msg", (data) ->
source = $("#msg-tmpl").html()
View
@@ -1,6 +1,6 @@
(function() {
var socket;
- socket = io.connect("http://localhost");
+ socket = io.connect("http://localhost:5000");
socket.on("msg", function(data) {
var html, source, template;
source = $("#msg-tmpl").html();

0 comments on commit 3abe999

Please sign in to comment.