2012-12-24 06:47:47 +01:00
|
|
|
extends ../layout
|
2012-12-24 05:06:04 +01:00
|
|
|
|
|
|
|
block content
|
|
|
|
div#backlink
|
|
|
|
a(href='/quotes/') « Quote list
|
|
|
|
ul#quotelist
|
|
|
|
-var hasYouTubeVids=false
|
|
|
|
-each quote in quotes
|
2013-10-15 08:06:16 +02:00
|
|
|
-if(quote.match(url_regex))
|
2012-12-24 05:06:04 +01:00
|
|
|
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
|
2013-10-15 08:06:16 +02:00
|
|
|
-else
|
2012-12-24 05:06:04 +01:00
|
|
|
-var res = quote.match(/~~([^~]+)~~/)
|
|
|
|
-if(res != null)
|
|
|
|
li.quote
|
|
|
|
a(href="/quotes/#{res[1]}") #{quote}
|
2013-10-15 08:06:16 +02:00
|
|
|
-else
|
|
|
|
li.quote #{quote}
|
2012-12-24 05:06:04 +01:00
|
|
|
-if(hasYouTubeVids)
|
|
|
|
script(src='/ytembed.js')
|