diff --git a/migrations/125_sites_stats_bigint.rb b/migrations/125_sites_stats_bigint.rb new file mode 100644 index 00000000..efb229ed --- /dev/null +++ b/migrations/125_sites_stats_bigint.rb @@ -0,0 +1,15 @@ +Sequel.migration do + up { + alter_table(:sites) do + set_column_type :hits, :bigint + set_column_type :views, :bigint + end + } + + down { + alter_table(:sites) do + set_column_type :hits, Integer + set_column_type :views, Integer + end + } +end diff --git a/models/site.rb b/models/site.rb index 0874fbe1..7366eafa 100644 --- a/models/site.rb +++ b/models/site.rb @@ -8,10 +8,9 @@ class Site < Sequel::Model include Sequel::ParanoidDelete VALID_MIME_TYPES = %w{ + application/atom+xml application/epub application/epub+zip - application/font-sfnt - application/javascript application/json application/octet-stream application/opensearchdescription+xml @@ -21,10 +20,13 @@ class Site < Sequel::Model application/rss+xml application/vnd.ms-fontobject application/vnd.ms-opentype - application/x-elc - application/x-font-ttf application/xml audio/midi + font/otf + font/sfnt + font/ttf + font/woff + font/woff2 image/apng image/avif image/gif @@ -38,10 +40,10 @@ class Site < Sequel::Model image/x-xcf message/rfc822 text/cache-manifest - text/cache-manifest text/css text/csv text/html + text/javascript text/plain text/tsv text/xml @@ -77,8 +79,8 @@ class Site < Sequel::Model INDEX_HTML_REGEX = /\/?index.html$/ ROOT_INDEX_HTML_REGEX = /^\/?index.html$/ MAX_COMMENT_SIZE = 420 # Used to be the limit for Facebook.. no comment (PUN NOT INTENDED). - MAX_FOLLOWS = 1000 - + MAX_FOLLOWS = 2000 + BROWSE_MINIMUM_VIEWS = 100 BROWSE_MINIMUM_FOLLOWER_VIEWS = 10_000 diff --git a/sass/_project-sass/_project-Main.scss b/sass/_project-sass/_project-Main.scss index eca73666..e8994455 100644 --- a/sass/_project-sass/_project-Main.scss +++ b/sass/_project-sass/_project-Main.scss @@ -2316,7 +2316,6 @@ pre, code { .chat-box { height: calc(100vh - 180px); overflow-y: scroll; - padding: 10px; background-color: #1d1f21; font-weight: 300; font-size: 13.5px; diff --git a/views/_follows.erb b/views/_follows.erb index 851257e7..05b1e5dc 100644 --- a/views/_follows.erb +++ b/views/_follows.erb @@ -1,22 +1,26 @@ -<% site_followings = site.followings_dataset.count %> -<% if (!is_current_site && site_followings > 0) || is_current_site %> +<% site_followings_count = site.followings_dataset.count %> +<% if (!is_current_site && site_followings_count > 0) || is_current_site %>
You are not following any sites yet. Add some by browsing sites or looking at your tags.
<% else %>
- <% site.followings_dataset.select(:site_id).all.each do |following| %>
+ <% site.followings_dataset.select(:site_id).limit(Site::MAX_DISPLAY_FOLLOWS).each do |following| %>
<% end %>
+
+ <% if Site::MAX_DISPLAY_FOLLOWS < site_followings_count %>
+ see more
+ <% end %>
<% end %>