Commit | Line | Data |
---|---|---|
27d9c22b JA |
1 | !!! transitional |
2 | html(xmlns="http://www.w3.org/1999/xhtml") | |
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(src="http://192.168.1.127:7777/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 | ||
25 | - if (touchscreen) | |
26 | script(type="text/javascript", src="js/touchscreen_tweaks.js") | |
27 | ||
28 | - var proto | |
29 | - if (config.listen_ssl) | |
30 | - proto = 'https' | |
31 | - else | |
32 | - proto = 'http' | |
33 | script(type="text/javascript") | |
34 | var agent = '#{agent}'; | |
35 | var touchscreen = #{touchscreen}; | |
36 | var init_data = {}; | |
37 | var kiwi_server = '#{proto}://192.168.1.127:7777/'; | |
38 | var touch_scroll; | |
39 | ||
40 | $(document).ready(function(){ | |
41 | manageDebug(false); | |
42 | ||
43 | //#channel,##channel,&channel | |
44 | var chans = document.location.hash.match(/[#&]+[^ ,\\007]+/g); | |
45 | if(chans != null && chans.length > 0) { | |
46 | init_data.channel = chans.join(','); | |
47 | $('#channel').val(init_data.channel); | |
48 | } | |
49 | ||
50 | front.init(); | |
51 | gateway.start(kiwi_server); | |
52 | ||
53 | addEvents(); | |
54 | $('.nick').focus(); | |
55 | }); | |
56 | ||
57 | ||
58 | function addEvents(){ | |
59 | $('.more_link').click(function(){ $('.content.bottom').slideDown('fast'); $('.network').focus(); return false; }); | |
60 | $('.formconnectwindow').submit(function(){ | |
61 | init_data.channel = $('#channel').val(); | |
62 | return false; | |
63 | }); | |
64 | $('a.connect').click(function(){ $('.formconnectwindow').submit(); return false; }); | |
65 | } | |
66 | ||
67 | ||
68 | script#tmpl_about_box(type="text/x-jquery-tmpl") | |
69 | | <h2>Kiwi IRC</h2> | |
70 | | <p>An alternative to downloading an irc client. Kiwi IRC is the best web app you'll use for the next couple years.</p> | |
71 | | <button class="about_close">Close</button> | |
72 | | <p class="info">${about}</p> | |
73 | | <p class="revisions">Front: ${front_revision}<br />Gateway: ${gateway_revision}</p> | |
74 | ||
75 | script#tmpl_change_nick(type="text/x-jquery-tmpl") | |
76 | | <div class="newnick box"> | |
77 | | Your new nick:<br /> | |
78 | | <form class="form_newnick"> | |
79 | | <input type="text" class="txtnewnick" /><br /> | |
80 | | <button class="butnewnick" type="submit">Change</button> <a class="link cancelnewnick">Cancel</a> | |
81 | | </form> | |
82 | | </div> | |
83 | ||
84 | ||
85 | script#tmpl_plugins(type="text/x-jquery-tmpl") | |
86 | | <div class="list"> | |
87 | | <h2>Kiwi plugins</h2> | |
88 | | <p> | |
89 | | <select multiple="multiple" id="plugin_list"> | |
90 | | </select> | |
91 | | <button id="plugins_list_unload">Unload</button> | |
92 | | </p> | |
93 | | </div> | |
94 | | <div class="load"> | |
95 | | Plugin file URL:<br /> | |
96 | | <form> | |
97 | | <input type="text" class="txtpluginfile" /><br /> | |
98 | | <button class="butnewnick" type="submit">Load..</button> <a class="link cancelpluginfile">Cancel</a> | |
99 | | </form> | |
100 | | </div> | |
101 | ||
102 | script#tmpl_user_box(type="text/x-jquery-tmpl") | |
103 | | <div class="userbox"> | |
104 | | <input type="hidden" class="userbox_nick" value="${nick}" /> | |
105 | | <a href="#" class="userbox_query">Message</a> | |
106 | | <a href="#" class="userbox_whois">Info</a> | |
107 | | </div> | |
108 | ||
109 | body | |
110 | ||
111 | div#kiwi | |
112 | div.connectwindow | |
113 | h1.logo Kiwi IRC | |
114 | div#login | |
115 | form.formconnectwindow | |
116 | div.content.top | |
117 | ul | |
118 | li | |
119 | label(for="nick") Your nickname: | |
120 | input(type="text", id="nick", name="nick", class="nick", placeholder="Your nick..") | |
121 | a.connect(href="") Connect... | |
122 | ||
123 | - var display | |
124 | - if (server_set) | |
125 | - display = 'display:none' | |
126 | - else | |
127 | - display = ''; | |
128 | div.more(style=display) | |
129 | a(href="", class="more_link") more | |
130 | div.content.bottom | |
131 | ul | |
132 | li | |
133 | label(for="network") Server: | |
134 | input(type="text", id="network", name="network", class="network", value=server) | |
135 | li | |
136 | label(for="channel") Channel: | |
137 | input(type="text", id="channel", name="channel", class="channel", value="#kiwiirc") | |
138 | a.connect(href="") Connect... | |
139 | ||
140 | ||
141 | ||
142 | div.windowlist | |
143 | div.poweredby Powered by Kiwi IRC | |
144 | ul | |
145 | ||
146 | div.cur_topic | |
147 | ||
148 | div.userlist | |
149 | ul | |
150 | ||
151 | div#windows.windows | |
152 | div.scroller(style="width:100%") | |
153 | ||
154 | div.control | |
155 | div.msginput | |
156 | div.nick | |
157 | a(href="#") | |
158 | | : | |
159 | input(type="text", name="kiwi_msginput", id="kiwi_msginput") | |
160 | div.plugins | |
161 | ul | |
162 | li | |
163 | a.load_plugin_file Plugins | |
164 | - if (debug) | |
165 | li | |
166 | a.reload_css Reload CSS |