diff --git a/models/site.rb b/models/site.rb index fc8de90e..fcdd0861 100644 --- a/models/site.rb +++ b/models/site.rb @@ -1099,7 +1099,7 @@ class Site < Sequel::Model if results.include? true && opts[:new_install] != true time = Time.now sql = DB["update sites set site_changed=?, site_updated_at=?, updated_at=?, changed_count=changed_count+1, space_used=space_used#{new_size < 0 ? new_size.to_s : '+'+new_size.to_s} where id=?", - html_uploaded, + true, time, time, self.id diff --git a/tests/acceptance/index_tests.rb b/tests/acceptance/index_tests.rb index d23cf98c..ff8aee1b 100644 --- a/tests/acceptance/index_tests.rb +++ b/tests/acceptance/index_tests.rb @@ -11,8 +11,8 @@ describe '/' do it 'loads the news feed with welcome' do visit '/' - page.body.must_match /Neocities news feed/i - page.body.must_match /You aren’t following any websites yet/i + page.body.must_match /Thanks for joining the Neocities community/i + page.body.wont_match /You aren’t following any websites yet/i end it 'displays a follow and an unrelated follow' do diff --git a/tests/site_file_tests.rb b/tests/site_file_tests.rb index 3e9fe636..482027da 100644 --- a/tests/site_file_tests.rb +++ b/tests/site_file_tests.rb @@ -144,7 +144,7 @@ describe 'site_files' do File.exists?(@site.thumbnail_path('test.jpg', resolution)).must_equal true end - @site.site_changed.must_equal false + @site.site_changed.must_equal true end it 'fails with unsupported file' do diff --git a/views/home.erb b/views/home.erb index ea9fc7cb..61926895 100644 --- a/views/home.erb +++ b/views/home.erb @@ -21,7 +21,13 @@
- <% if site.followings_dataset.count == 0 %> + <% if site.site_changed == false || site.changed_count == 0 %> +
+

Thanks for joining the Neocities community!

+

Now start building your website! +

+
+ <% elsif site.followings_dataset.count == 0 %>

Welcome to your Neocities news feed!

@@ -32,14 +38,6 @@

<% 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 %>