Minifcation of all javascript, plus caching of the minifies js and main HTML. Also...
[KiwiIRC.git] / node / client / index.html.jade
1 !!! 5
2 html(xmlns="http://www.w3.org/1999/xhtml", lang="en-gb")
3 head
4
5 meta(http-equiv="Content-Type", content="text/html; charset=utf-8")
6 - if ((agent === 'android') || (agent === 'iphone') || (agent === 'ipad') || (agent === 'ipod'))
7 meta(name="viewport", content="width=device-width,user-scalable=no")
8
9 title Kiwi IRC
10 link(rel="stylesheet", type="text/css", href="css/default.css")
11 link(rel="stylesheet", type="text/css", href="css/ui.css")
12
13 - if (touchscreen)
14 link(rel="stylesheet", type="text/css", href="css/touchscreen_tweaks.css")
15
16 script(type="text/javascript", src="/socket.io/socket.io.js")
17 script(type="text/javascript", src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js")
18 script(type="text/javascript", src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js")
19 script(type="text/javascript", src="js/jquery.json-2.2.min.js")
20 //script(type="text/javascript", src="js/util.js")
21 //script(type="text/javascript", src="js/gateway.js")
22 //script(type="text/javascript", src="js/front.js")
23 //script(type="text/javascript", src="js/iscroll.js")
24 script(type="text/javascript", src="js/all.js")
25
26 - if (touchscreen)
27 script(type="text/javascript", src="js/touchscreen_tweaks.js")
28
29 - var proto
30 - if (config.listen_ssl)
31 - proto = 'https'
32 - else
33 - proto = 'http'
34 script(type="text/javascript")
35 var agent = '#{agent}';
36 var touchscreen = #{touchscreen};
37 var init_data = {};
38 var kiwi_server = '#{proto}://' + document.location.host + '/kiwi';
39 var touch_scroll;
40
41 $(document).ready(function(){
42 manageDebug(false);
43
44 //#channel,##channel,&channel
45 var chans = document.location.hash.match(/[#&]+[^ ,\\007]+/g);
46 if(chans != null && chans.length > 0) {
47 init_data.channel = chans.join(',');
48 $('#channel').val(init_data.channel);
49 }
50
51 front.init();
52 gateway.start(kiwi_server);
53
54 addEvents();
55 $('.nick').focus();
56 });
57
58
59 function addEvents(){
60 $('.more_link').click(function(){ $('.content.bottom').slideDown('fast'); $('.network').focus(); return false; });
61 $('.formconnectwindow').submit(function(){
62 init_data.channel = $('#channel').val();
63 return false;
64 });
65 $('a.connect').click(function(){ $('.formconnectwindow').submit(); return false; });
66 $('a.chan').live('click', function() {
67 front.joinChannel($(this).text());
68 return false;
69 });
70 }
71
72
73 script#tmpl_about_box(type="text/x-jquery-tmpl")
74 | <h2>Kiwi IRC</h2>
75 | <p>An alternative to downloading an irc client. Kiwi IRC is the best web app you'll use for the next couple years.</p>
76 | <button class="about_close">Close</button>
77 | <p class="info">${about}</p>
78 | <p class="revisions">Front: ${front_revision}<br />Gateway: ${gateway_revision}</p>
79
80 script#tmpl_change_nick(type="text/x-jquery-tmpl")
81 | <div class="newnick box">
82 | Your new nick:<br />
83 | <form class="form_newnick">
84 | <input type="text" class="txtnewnick" /><br />
85 | <button class="butnewnick" type="submit">Change</button> <a class="link cancelnewnick">Cancel</a>
86 | </form>
87 | </div>
88
89
90 script#tmpl_plugins(type="text/x-jquery-tmpl")
91 | <div class="list">
92 | <h2>Kiwi plugins</h2>
93 | <p>
94 | <select multiple="multiple" id="plugin_list">
95 | </select>
96 | <button id="plugins_list_unload">Unload</button>
97 | </p>
98 | </div>
99 | <div class="load">
100 | Plugin file URL:<br />
101 | <form>
102 | <input type="text" class="txtpluginfile" /><br />
103 | <button class="butnewnick" type="submit">Load..</button> <a class="link cancelpluginfile">Cancel</a>
104 | </form>
105 | </div>
106
107 script#tmpl_user_box(type="text/x-jquery-tmpl")
108 | <div class="userbox">
109 | <input type="hidden" class="userbox_nick" value="${nick}" />
110 | <a href="#" class="userbox_query">Message</a>
111 | <a href="#" class="userbox_whois">Info</a>
112 | </div>
113
114 body
115
116 div#kiwi
117 div.connectwindow
118 h1.logo Kiwi IRC
119 div#login
120 form.formconnectwindow
121 div.content.top
122 ul
123 li
124 label(for="nick") Your nickname:
125 input(type="text", id="nick", name="nick", class="nick", placeholder="Your nick..")
126 a.connect(href="") Connect...
127
128 - var display
129 - if (server_set)
130 - display = 'display:none'
131 - else
132 - display = '';
133 div.more(style=display)
134 a(href="", class="more_link") more
135 div.content.bottom
136 ul
137 li
138 label(for="network") Server:
139 input(type="text", id="network", name="network", class="network", value=server)
140 li
141 label(for="channel") Channel:
142 input(type="text", id="channel", name="channel", class="channel", value="#kiwiirc")
143 a.connect(href="") Connect...
144
145
146
147 div.windowlist
148 div.poweredby Powered by Kiwi IRC
149 ul
150
151 div.cur_topic(contenteditable="true", spellcheck="true")
152 //
153 ul.edit(style="float:right;")
154 li
155 img(src="img/more.png")
156 ul#kiwi_menu
157 li Item 1
158 li Item 2
159 li Item 3
160 div.topic(style="margin-right:5em; overflow:hidden; white-space: pre-wrap; word-wrap: break-word;")
161
162 div.userlist
163 ul
164
165 div#windows.windows
166 div.scroller(style="width:100%")
167
168 div.control
169 div.msginput
170 div.nick
171 a(href="#")
172 | :
173 input(type="text", name="kiwi_msginput", id="kiwi_msginput")
174 div.plugins
175 ul
176 li
177 a.load_plugin_file Plugins
178 - if (debug)
179 li
180 a.reload_css Reload CSS