diff --git a/app/javascript/src/styles/common/recent_posts.scss b/app/javascript/src/styles/common/recent_posts.scss new file mode 100644 index 000000000..b302f842b --- /dev/null +++ b/app/javascript/src/styles/common/recent_posts.scss @@ -0,0 +1,9 @@ +/* A small set of recent posts. Used for recent uploads and favorites on user + * profile pages, and recent posts on artist and wiki pages. */ +div.recent-posts { + margin-bottom: 1rem; + + h2.recent-posts-header { + margin-bottom: 0.25rem; + } +} diff --git a/app/javascript/src/styles/specific/users.scss b/app/javascript/src/styles/specific/users.scss index 954d665f5..fdaf705e1 100644 --- a/app/javascript/src/styles/specific/users.scss +++ b/app/javascript/src/styles/specific/users.scss @@ -1,9 +1,5 @@ div#c-users { div#a-show { - div.box { - margin-bottom: 2em; - } - table.user-statistics { th { width: 15%; diff --git a/app/views/artists/_show.html.erb b/app/views/artists/_show.html.erb index 8a00e1bf6..b6fae3244 100644 --- a/app/views/artists/_show.html.erb +++ b/app/views/artists/_show.html.erb @@ -22,11 +22,13 @@ <% if @artist.tag.present? && @artist.tag.post_count > 0 %>
-

Recent Posts <%= link_to "»", posts_path(tags: @artist.name) %>

+

+ <%= link_to "Posts", posts_path(tags: @artist.name) %> +

<%= render "posts/partials/common/inline_blacklist" %> -
+
<%= post_previews_html(@artist.tag.posts.limit(8), tags: @artist.name) %>
diff --git a/app/views/users/_post_summary.html.erb b/app/views/users/_post_summary.html.erb index 0987a1748..ce2fa71ce 100644 --- a/app/views/users/_post_summary.html.erb +++ b/app/views/users/_post_summary.html.erb @@ -1,36 +1,21 @@ <% if presenter.has_uploads? %> -
-

- <%= link_to "Uploads", posts_path(:tags => "user:#{user.name}") %> +
+

+ <%= link_to "Uploads", posts_path(tags: "user:#{user.name}") %>

-
+
<%= post_previews_html(presenter.uploads, tags: "user:#{user.name}") %>
<% end %> <% if presenter.has_favorites? && policy(user).can_see_favorites? %> -
-

+
+

<%= link_to "Favorites", posts_path(tags: "ordfav:#{user.name}") %>

-
+
<%= post_previews_html(presenter.favorites, tags: "ordfav:#{user.name}") %>
<% end %> - -<% if false %> - <% presenter.saved_search_labels.each do |label| %> - - <% end %> -<% end %> diff --git a/app/views/wiki_pages/_posts.html.erb b/app/views/wiki_pages/_posts.html.erb index 79c09fe03..756329a9f 100644 --- a/app/views/wiki_pages/_posts.html.erb +++ b/app/views/wiki_pages/_posts.html.erb @@ -1,7 +1,11 @@ <% if wiki_page.tag.present? && !wiki_page.tag.empty? %> -
-

Recent Posts <%= link_to "»", posts_path(tags: wiki_page.title) %>

+
+

+ <%= link_to "Posts", posts_path(tags: wiki_page.title) %> +

- <%= post_previews_html(wiki_page.tag.posts.limit(8), tags: wiki_page.title) %> +
+ <%= post_previews_html(wiki_page.tag.posts.limit(8), tags: wiki_page.title) %> +
<% end %>