diff --git a/app.rb b/app.rb index e1e156e7..fc071451 100644 --- a/app.rb +++ b/app.rb @@ -37,7 +37,7 @@ end 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) + site_dataset = Site.order(:hits.desc, :updated_at.desc).filter(~{updated_at: nil}).paginate(@current_page, 100) @page_count = site_dataset.page_count || 1 @sites = site_dataset.all slim :browse diff --git a/views/browse.slim b/views/browse.slim index 45bfa566..c32e1de9 100644 --- a/views/browse.slim +++ b/views/browse.slim @@ -1,7 +1,7 @@ .row .span12.text-center h1 Home Pages on NeoCities - p If you like a site, don't forget to bookmark it!
Hit counts are updated daily.
Want to make your own site? Click here! + p If you like a site, don't forget to bookmark it!
Visitor counts are updated hourly.
Want to make your own site? Click here! - @sites.each_with_index do |site,i| - if i.even? && i != 0