3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-28 06:49:25 +01:00
dbot/views/quotes.jade

20 lines
639 B
Plaintext
Raw Normal View History

2011-11-25 15:44:18 +01:00
ul#quotelist
-var hasYouTubeVids=false
2011-09-15 13:30:52 +02:00
-each quote in quotes
-if(quote.match(locals.url_regex))
2011-11-25 15:44:18 +01:00
li.quote
-if(quote.match(/(jpg|png|gif|jpeg|tiff)$/))
a(href=quote)
2011-11-10 01:31:05 +01:00
img(src=quote)
-else if(quote.match(/youtube.com\/watch/))
-hasYouTubeVids = true
span(class='ytplaceholder')
=quote
-else
a(href=quote)
=quote
-else
2011-11-25 15:44:18 +01:00
li.quote #{quote}
-if(hasYouTubeVids)
script(src='/ytembed.js')