Skip to content

Commit

Permalink
added message for postless user
Browse files Browse the repository at this point in the history
  • Loading branch information
adam3sUK committed Dec 16, 2021
1 parent 2f26241 commit 5905434
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ body {

.site-main-wrap {
background: #f7f7f7;
padding: 80px 0 40px;
padding: 100px 0 40px;
display: block;
height: 100%;
}
Expand Down
6 changes: 6 additions & 0 deletions app/views/users/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@
</div>
</div>
<div class="col-sm-8 col-lg-7">
<% if @user.posts.count == 0 %>
<div class="text-center">
<h2 class="soft-bottom soft-top">Looks like you have yet to post anything.</h2>
<%= link_to "Join the conversation", posts_path, class: "btn btn-primary" %>
</div>
<% end %>
<% @user.posts.reverse.each do |post| %>
<div class="post bg-white">
<div class="profile-holder post-heading">
Expand Down

0 comments on commit 5905434

Please sign in to comment.