diff --git a/app.rb b/app.rb index 176f11f2..0073a8b6 100644 --- a/app.rb +++ b/app.rb @@ -38,9 +38,7 @@ get '/browse' do @current_page = params[:current_page] || 1 @current_page = @current_page.to_i site_dataset = Site.order(:id.desc).filter(~{updated_at: nil}).paginate(@current_page, 100) - - @page_count = site_dataset.page_count - + @page_count = site_dataset.page_count || 1 @sites = site_dataset.all slim :browse end @@ -175,8 +173,6 @@ get '/site_files/:username.zip' do |username| Zip::ZipFile.open(file_path, Zip::ZipFile::CREATE) do |zipfile| current_site.file_list.collect {|f| f.filename}.each do |filename| - puts filename - puts site_file_path(filename) zipfile.add filename, site_file_path(filename) end end diff --git a/jobs/screenshot_job.rb b/jobs/screenshot_job.rb index 8d7aabc9..fac1b216 100644 --- a/jobs/screenshot_job.rb +++ b/jobs/screenshot_job.rb @@ -28,7 +28,6 @@ class ScreenshotJob screenshot.unlink img_list.new_image(img_list.first.columns, img_list.first.rows) { self.background_color = "white" } img = img_list.reverse.flatten_images - puts 'boners' img.crop!(0, 0, 1280, 720) img.resize! 600, 400 img.write File.join(DIR_ROOT, 'public', 'site_screenshots', "#{username}.jpg") diff --git a/views/browse.slim b/views/browse.slim index 22195ed1..ea984e61 100644 --- a/views/browse.slim +++ b/views/browse.slim @@ -8,7 +8,7 @@ .row .span6 style="background-color: #F8F8F8; margin-bottom: 30px" - + .row .span3 h3 style="margin-left: 20px": a href="http://#{site.username}.neocities.org" target="_blank" #{site.username} @@ -26,4 +26,4 @@ li class="#{"active" if num == @current_page}": a href="/browse?current_page=#{num}" #{num} - if @current_page != @page_count - li: a href="/browse?current_page=#{@current_page + 1}": i.icon-arrow-right style="font-size: 12pt" \ No newline at end of file + li: a href="/browse?current_page=#{@current_page + 1}": i.icon-arrow-right style="font-size: 12pt"