diff --git a/views/polls.jade b/views/polls.jade index 59378d8..504f3d3 100644 --- a/views/polls.jade +++ b/views/polls.jade @@ -27,10 +27,9 @@ ul#votelist .vote-track -if(!isNaN(percentage)) .vote-percentage(style="width: #{percentage}%") - -if(votes == 1) - |#{votes} vote - -else - |#{votes} votes + case votes + when 1: #{votes} vote + default: #{votes} votes -if(!isNaN(percentage)) |(#{percentage.toFixed(2)}%) -if(hasYouTubeVids) diff --git a/views/quotes.jade b/views/quotes.jade index 208754f..35dc519 100644 --- a/views/quotes.jade +++ b/views/quotes.jade @@ -15,7 +15,12 @@ ul#quotelist -else a(href=quote) =quote - -else + -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')