forked from GitHub/dbot
Merge git://github.com/danharibo/depressionbot
This commit is contained in:
commit
fedc019f1d
@ -2,9 +2,8 @@ var express = require('express');
|
|||||||
|
|
||||||
var webInterface = function(dbot) {
|
var webInterface = function(dbot) {
|
||||||
var pub = 'public';
|
var pub = 'public';
|
||||||
var app = express.createServer();
|
var app = express();
|
||||||
|
|
||||||
app.use(express.compiler({ src: pub, enable: ['sass'] }));
|
|
||||||
app.use(express.static(pub));
|
app.use(express.static(pub));
|
||||||
app.set('view engine', 'jade');
|
app.set('view engine', 'jade');
|
||||||
|
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
h3 Channels on #{connection}
|
extends layout
|
||||||
div#backlink
|
|
||||||
a(href='/connections') « Connection List
|
block content
|
||||||
ul#quotelist
|
h3 Channels on #{connection}
|
||||||
-each channel in channels
|
div#backlink
|
||||||
a(href='/users/'+connection+'/'+channel.substr(1,channel.length))
|
a(href='/connections') « Connection List
|
||||||
li.quotes #{channel}
|
ul#quotelist
|
||||||
|
-each channel in channels
|
||||||
|
a(href='/users/'+connection+'/'+channel.substr(1,channel.length))
|
||||||
|
li.quotes #{channel}
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
h3 Current Connections
|
extends layout
|
||||||
div#backlink
|
|
||||||
a(href='/') « Home
|
block content
|
||||||
|
h3 Current Connections
|
||||||
|
div#backlink
|
||||||
|
a(href='/') « Home
|
||||||
#modulelinks
|
#modulelinks
|
||||||
-each connection in connections
|
-each connection in connections
|
||||||
a.module(href='/channels/'+connection) #{connection}
|
a.module(href='/channels/'+connection) #{connection}
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
#modulelinks
|
extends layout
|
||||||
|
|
||||||
|
block content
|
||||||
|
#modulelinks
|
||||||
a.module(href='/quotes') Quotes
|
a.module(href='/quotes') Quotes
|
||||||
a.module(href='/polls') Polls
|
a.module(href='/polls') Polls
|
||||||
a.module(href='/connections') Users
|
a.module(href='/connections') Users
|
||||||
|
@ -9,5 +9,5 @@ html(lang='en')
|
|||||||
div#title
|
div#title
|
||||||
a(href='/') #{name} web interface
|
a(href='/') #{name} web interface
|
||||||
div#main
|
div#main
|
||||||
!{body}
|
block content
|
||||||
script(type="text/javascript", src="/script.js")
|
script(type="text/javascript", src="/script.js")
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
div#backlink
|
extends layout
|
||||||
a(href='/') « Home
|
|
||||||
div#controls
|
block content
|
||||||
input(type="text", name="search", id="search-text", oninput="search(this.value)")
|
div#backlink
|
||||||
ul#quotelist
|
a(href='/') « Home
|
||||||
-each poll in polllist
|
div#controls
|
||||||
a(href='/polls/'+poll)
|
input(type="text", name="search", id="search-text", oninput="search(this.value)")
|
||||||
li.quotes #{poll}
|
ul#quotelist
|
||||||
|
-each poll in polllist
|
||||||
|
a(href='/polls/'+poll)
|
||||||
|
li.quotes #{poll}
|
||||||
|
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
div#backlink
|
extends layout
|
||||||
a(href='/') « Home
|
|
||||||
div#controls
|
block content
|
||||||
input(type="text", name="search", id="search-text", oninput="search(this.value)")
|
div#backlink
|
||||||
ul#quotelist
|
a(href='/') « Home
|
||||||
-each quote in quotelist
|
div#controls
|
||||||
a(href='/quotes/'+quote)
|
input(type="text", name="search", id="search-text", oninput="search(this.value)")
|
||||||
li.quotes #{quote}
|
ul#quotelist
|
||||||
|
-each quote in quotelist
|
||||||
|
a(href='/quotes/'+quote)
|
||||||
|
li.quotes #{quote}
|
||||||
|
|
||||||
|
@ -1,26 +1,29 @@
|
|||||||
div#backlink
|
extends layout
|
||||||
a(href='/quotes/') « Quote list
|
|
||||||
ul#quotelist
|
block content
|
||||||
-var hasYouTubeVids=false
|
div#backlink
|
||||||
-each quote in quotes
|
a(href='/quotes/') « Quote list
|
||||||
-if(quote.match(locals.url_regex))
|
ul#quotelist
|
||||||
li.quote
|
-var hasYouTubeVids=false
|
||||||
-if(quote.match(/(jpg|png|gif|jpeg|tiff)$/))
|
-each quote in quotes
|
||||||
a(href=quote)
|
-if(quote.match(locals.url_regex))
|
||||||
img(src=quote)
|
li.quote
|
||||||
-else if(quote.match(/youtube.com\/watch/))
|
-if(quote.match(/(jpg|png|gif|jpeg|tiff)$/))
|
||||||
-hasYouTubeVids = true
|
a(href=quote)
|
||||||
span(class='ytplaceholder')
|
img(src=quote)
|
||||||
=quote
|
-else if(quote.match(/youtube.com\/watch/))
|
||||||
-else
|
-hasYouTubeVids = true
|
||||||
a(href=quote)
|
span(class='ytplaceholder')
|
||||||
=quote
|
=quote
|
||||||
-else if(quote.match(/~~([^~]+)~~/))
|
-else
|
||||||
-var res = quote.match(/~~([^~]+)~~/)
|
a(href=quote)
|
||||||
-if(res != null)
|
=quote
|
||||||
li.quote
|
-else if(quote.match(/~~([^~]+)~~/))
|
||||||
a(href="/quotes/#{res[1]}") #{quote}
|
-var res = quote.match(/~~([^~]+)~~/)
|
||||||
-else
|
-if(res != null)
|
||||||
li.quote #{quote}
|
li.quote
|
||||||
-if(hasYouTubeVids)
|
a(href="/quotes/#{res[1]}") #{quote}
|
||||||
script(src='/ytembed.js')
|
-else
|
||||||
|
li.quote #{quote}
|
||||||
|
-if(hasYouTubeVids)
|
||||||
|
script(src='/ytembed.js')
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
h3 #{user}'s profile
|
extends layout
|
||||||
div#backlink
|
|
||||||
a(href='/users/'+connection+'/'+channel.substr(1,channel.length)) « #{channel} Nick List
|
|
||||||
|
|
||||||
div.quotecount
|
block content
|
||||||
#{cleanUser} is filled with
|
h3 #{user}'s profile
|
||||||
a(href='/quotes/'+cleanUser) #{quotecount} quotes
|
div#backlink
|
||||||
.
|
a(href='/users/'+connection+'/'+channel.substr(1,channel.length)) « #{channel} Nick List
|
||||||
|
|
||||||
div.kickcount
|
div.quotecount
|
||||||
#{cleanUser} has kicked people #{kicked} times and has been kicked #{kicks} times.
|
#{cleanUser} is filled with
|
||||||
|
a(href='/quotes/'+cleanUser) #{quotecount} quotes
|
||||||
|
.
|
||||||
|
|
||||||
|
div.kickcount
|
||||||
|
#{cleanUser} has kicked people #{kicked} times and has been kicked #{kicks} times.
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
h3 Users currently in #{channel} on #{connection}
|
extends layout
|
||||||
div#backlink
|
|
||||||
a(href='/channels/'+connection) « Channel List
|
block content
|
||||||
ul#quotelist
|
h3 Users currently in #{channel} on #{connection}
|
||||||
-each nick in nicks
|
div#backlink
|
||||||
a(href='/user/'+connection+'/'+channel.substr(1,channel.length)+'/'+nick)
|
a(href='/channels/'+connection) « Channel List
|
||||||
li.quotes #{nick}
|
ul#quotelist
|
||||||
|
-each nick in nicks
|
||||||
|
a(href='/user/'+connection+'/'+channel.substr(1,channel.length)+'/'+nick)
|
||||||
|
li.quotes #{nick}
|
||||||
|
Loading…
Reference in New Issue
Block a user