diff --git a/app/assets/stylesheets/show_follow.css b/app/assets/stylesheets/show_follow.css new file mode 100644 index 0000000000..c9ed31c803 --- /dev/null +++ b/app/assets/stylesheets/show_follow.css @@ -0,0 +1,58 @@ +.follow-list{ + margin: -1px; + list-style-type: none; +} +.follow-list .follow-img img{ + max-width: 100%; +} +.follow-list{ + margin: -1px; + list-style-type: none; +} +.follow-list { + padding: 0; +} +.follow-list > li { + float: left; + width: 50%; +} +.follow-list > li > a { + display: block; + text-decoration: none; + color: #000; + padding: 0.625rem; + margin: 1px; + background: #fff; +} +.follow-list > li > a:after, +.follow-list > li > a:before { + content: ""; + display: table; + clear: both; +} +.follow-list .follow-img { + float: left; + width: 3rem; + height: 3rem; + overflow: hidden; + background: #efeff4; +} +.follow-list .follow-info { + margin-left: 3.625rem; +} +.follow-list .follow-info h4 { + margin: 0.3125rem 0; + font-size: 0.875rem; + font-weight: 600; +} +.follow-list .follow-info p { + color: #666; + margin: 0; +} + +@media (max-width: 767px) { + .follow-list > li { + float: none; + width: auto; + } +} diff --git a/app/views/users/show_follow.html.erb b/app/views/users/show_follow.html.erb index 8e59e2ef18..fc6c286a5b 100644 --- a/app/views/users/show_follow.html.erb +++ b/app/views/users/show_follow.html.erb @@ -1,3 +1,5 @@ +<%= stylesheet_link_tag "show_follow" %> +

<%= @user.username %>

<% if @users.length > 0 %> - - - <% @users.each do |user| %> - - - <% end %> -
<%= link_to " #{user.username}".html_safe, user_path(user.username) %> -
- <% if @pagy %> - <%= raw pagy_bootstrap_nav @pagy %> - <% else %> - <%= will_paginate @users, renderer: WillPaginate::ActionView::BootstrapLinkRenderer %> - <% end %> + +
+
+
+
+
+ +
+
+
+
+
+ <% if @pagy %> + <%= raw pagy_bootstrap_nav @pagy %> +
+ <% else %> + <%= will_paginate @users, renderer: WillPaginate::ActionView::BootstrapLinkRenderer %> + <% end %> <% else %>

<%= @user.username %><%= @title === "Followers" ? " has no followers yet" : " is not following anyone yet" %>

<% end %> -
+ \ No newline at end of file diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 013ebf3573..05c4610326 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -39,4 +39,5 @@ 'spam2.css', 'spam2.js', 'print_new.css', + 'show_follow.css', ]