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