-unless @time[5].length < 10 == false :css .background{ background-image: url('/images/#{@time[5]}-568h@2x.jpg'); height: 900px; background-repeat: no-repeat; } -unless @time[5].length > 10 == false :css .background{ background-image: url('http://s3.amazonaws.com/medows/images/#{@time[5]}'); height: 900px; background-repeat: no-repeat; } -##{@url.url} -#Opening the awesome event now! %h1 #countdown %h3 until: = URI.unescape(@time[8]) %h3 Event Date: #{@time[4].gsub!('~',' ')} :javascript var end = new Date('#{@date.insert(6, '20')}'); var _second = 1000; var _minute = _second * 60; var _hour = _minute * 60; var _day = _hour * 24; var timer; function showRemaining() { var now = new Date(); var distance = end - now; if (distance < 0) { clearInterval(timer); document.getElementById('countdown').innerHTML = 'EXPIRED!'; return; } var days = Math.floor(distance / _day); var hours = Math.floor((distance % _day) / _hour); var minutes = Math.floor((distance % _hour) / _minute); var seconds = Math.floor((distance % _minute) / _second); document.getElementById('countdown').innerHTML = days + 'days '; document.getElementById('countdown').innerHTML += hours + 'hrs '; document.getElementById('countdown').innerHTML += minutes + 'mins '; document.getElementById('countdown').innerHTML += seconds + 'secs'; } timer = setInterval(showRemaining, 1000);