3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-27 14:29:29 +01:00
dbot/views/quotes.jade
Daniel Evans 6c459c5b23 Slight web improvements
Cleaned up polls.jade
Added a link to the first interpolated quotes.
2012-06-17 01:16:58 +01:00

27 lines
902 B
Plaintext

div#backlink
a(href='/quotes/') « Quote list
ul#quotelist
-var hasYouTubeVids=false
-each quote in quotes
-if(quote.match(locals.url_regex))
li.quote
-if(quote.match(/(jpg|png|gif|jpeg|tiff)$/))
a(href=quote)
img(src=quote)
-else if(quote.match(/youtube.com\/watch/))
-hasYouTubeVids = true
span(class='ytplaceholder')
=quote
-else
a(href=quote)
=quote
-else if(quote.match(/~~([^~]+)~~/))
-var res = quote.match(/~~([^~]+)~~/)
-if(res != null)
li.quote
a(href="/quotes/#{res[1]}") #{quote}
-else
li.quote #{quote}
-if(hasYouTubeVids)
script(src='/ytembed.js')