From 460ffb66982e052e92415713b98c88168b6c725e Mon Sep 17 00:00:00 2001 From: Victoria Wang Date: Mon, 27 Oct 2014 16:09:36 -0700 Subject: [PATCH] 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. --- sass/_project-sass/_project-Main.scss | 6 ++++++ views/home.erb | 31 +++++++++++++++++---------- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/sass/_project-sass/_project-Main.scss b/sass/_project-sass/_project-Main.scss index 29697590..3c815973 100644 --- a/sass/_project-sass/_project-Main.scss +++ b/sass/_project-sass/_project-Main.scss @@ -384,6 +384,12 @@ width: 100%; position: relative; border-right: 1px solid #ddd; + h2 { + margin-top: 1em; + float: left; + width: 100%; + margin-bottom: .75em; + } } .right-col { background: #FAF6F1; diff --git a/views/home.erb b/views/home.erb index 91861972..83946202 100644 --- a/views/home.erb +++ b/views/home.erb @@ -23,24 +23,33 @@
- <% if !@events.empty? %> - <%== erb :'_news', layout: false, locals: {site: current_site, events: @events} %> - <% elsif params[:activity] == 'mine' %> -
-

No updates on your site yet!

-

- You should start editing your site! -

- <% else %> + + + <% if site.followings_dataset.count == 0 %>

Welcome to your Neocities news feed!

- You aren’t following any websites yet! Once you do, more updates will show up here. + You aren’t 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? Check out all the sites on Neocities! + Below are some website suggestions for you. For more, check out all the sites on Neocities!

+ <% end %> + + <% if !site.site_changed && site.followings_dataset.count > 0 %> +
+

Thanks for joining the Neocities community!

+

Now start building your website! +

+
+ <% end %> + <% if !@events.empty? %> + <%== erb :'_news', layout: false, locals: {site: current_site, events: @events} %> + <% end %> + + <% if site.followings_dataset.count == 0 %> + <% if !@events.empty? %>

Sites to Follow

<% end %>