News feed now shows both news feed items and site suggestions if user hasn't followed anyone yet. After following someone, shows a banner encouraging user to start building their website.

This commit is contained in:
Victoria Wang 2014-10-27 16:09:36 -07:00
parent ef405a753f
commit 460ffb6698
2 changed files with 26 additions and 11 deletions

View file

@ -384,6 +384,12 @@
width: 100%; width: 100%;
position: relative; position: relative;
border-right: 1px solid #ddd; border-right: 1px solid #ddd;
h2 {
margin-top: 1em;
float: left;
width: 100%;
margin-bottom: .75em;
}
} }
.right-col { .right-col {
background: #FAF6F1; background: #FAF6F1;

View file

@ -23,24 +23,33 @@
<div class="content misc-page columns right-col"> <div class="content misc-page columns right-col">
<div class="col-left"> <div class="col-left">
<div class="col col-66"> <div class="col col-66">
<% if !@events.empty? %>
<%== erb :'_news', layout: false, locals: {site: current_site, events: @events} %>
<% elsif params[:activity] == 'mine' %> <% if site.followings_dataset.count == 0 %>
<div class="welcome">
<h4>No updates on your site yet!</h4>
<p>
You should <a href="/dashboard">start editing your site</a>!
</div>
<% else %>
<div class="welcome"> <div class="welcome">
<h4>Welcome to your Neocities news feed!</h4> <h4>Welcome to your Neocities news feed!</h4>
<p> <p>
You arent following any websites yet! Once you do, more updates will show up here. You arent following any websites yet! Once you do, <% if !@events.empty? %>more<% end %> updates will show up here.
Here are some website suggestions for you. Want to find some sites to follow? <a href="/browse">Check out all the sites on Neocities!</a> Below are some website suggestions for you. For more, <a href="/browse">check out all the sites on Neocities</a>!
</p> </p>
</div> </div>
<% end %>
<% if !site.site_changed && site.followings_dataset.count > 0 %>
<div class="welcome">
<h4>Thanks for joining the Neocities community!</h4>
<p>Now start <a href="/dashboard">building your website</a>!</a>
</p>
</div>
<% end %>
<% if !@events.empty? %>
<%== erb :'_news', layout: false, locals: {site: current_site, events: @events} %>
<% end %>
<% if site.followings_dataset.count == 0 %>
<% if !@events.empty? %><h2>Sites to Follow</h2><% end %>
<ul class="row website-Gallery content int-Gall suggestions"> <ul class="row website-Gallery content int-Gall suggestions">
<% @suggestions.each do |suggested_site| %> <% @suggestions.each do |suggested_site| %>
<li> <li>