From 8cb368e584c4d406ffe185525f2e96fe96548d6d Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Wed, 15 Oct 2014 15:24:23 -0700 Subject: [PATCH 1/3] fix for tags --- app.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.rb b/app.rb index 59c2ea56..7fa222d5 100644 --- a/app.rb +++ b/app.rb @@ -432,7 +432,7 @@ get '/browse/?' do site_dataset.where! ['sites.is_nsfw = ?', (params[:is_nsfw] == 'true' ? true : false)] if params[:tag] - site_dataset = site_dataset.association_join(:tags) + site_dataset = site_dataset.association_join(:tags).select_all(:sites) site_dataset.where! ['tags.name = ?', params[:tag]] site_dataset.where! ['tags.is_nsfw = ?', (params[:is_nsfw] == 'true' ? true : false)] end From f2bf9da535aa13a67fc116c3d5d7ca895d2396d7 Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Wed, 15 Oct 2014 15:33:22 -0700 Subject: [PATCH 2/3] move new index mockup to main index --- app.rb | 10 - views/index.erb | 222 ++++++++------- views/newindex_mockup.erb | 560 -------------------------------------- views/plan/_pricing.erb | 242 ++++++++++++++++ 4 files changed, 350 insertions(+), 684 deletions(-) create mode 100644 views/plan/_pricing.erb diff --git a/app.rb b/app.rb index 7fa222d5..ff802ad3 100644 --- a/app.rb +++ b/app.rb @@ -57,16 +57,6 @@ error do end # :nocov: -get '/newindex_mockup' do - if SimpleCache.expired?(:sites_count) - @sites_count = SimpleCache.store :sites_count, Site.count.roundup(100), 600 # 10 Minutes - else - @sites_count = SimpleCache.get :sites_count - end - - erb :newindex_mockup, layout: false -end - get '/home_mockup' do erb :'home_mockup' end diff --git a/views/index.erb b/views/index.erb index aea14e8c..6e547487 100644 --- a/views/index.erb +++ b/views/index.erb @@ -117,22 +117,28 @@
- -
    -
  • - -

    Create your own free website

    -

    - You get <%= Site::FREE_MAXIMUM.to_space_pretty %> of free web space to make whatever you’d like! -

    -
  • +
    +

    Introducing the New Neocities

    +

    Now’s a great time to join our community of over + <%= @sites_count.to_s.reverse.gsub(/...(?=.)/,'\&,').reverse %> websites! + You get <%= Site::FREE_MAXIMUM.to_space_pretty %> of free web space to make whatever you’d like. +

    +
    • + +

      Free web hosting goes social

      +

      + Follow your favorite Neocities sites to keep up with all the latest updates! You can also now discover new websites related to your interests, comment on them, and share them. +

      +
    • +
    • Making the web fun again

      -

      - We're a community of over <%= @sites_count.to_s.reverse.gsub(/...(?=.)/,'\&,').reverse %> websites that are bringing back creative expression on the web. Anyone can make a site, only your imagination is required. Join us! +

      + We’ve been working to make it easier to build your website and explore other sites. Neocities now has folders, tag browsing (our take on webrings), WebDAV uploading, RSS subscriptions, and more!

    +
@@ -321,4 +315,4 @@ - + \ No newline at end of file diff --git a/views/newindex_mockup.erb b/views/newindex_mockup.erb index 0fbdcf51..e69de29b 100644 --- a/views/newindex_mockup.erb +++ b/views/newindex_mockup.erb @@ -1,560 +0,0 @@ - - - - - - - - Neocities: Create your free website now! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - <% if flash.keys.length > 0 %> -
-

- <% flash.keys.each do |key| %> - <%= flash[key] %> - <% end %> -

-
- <% end %> - - - - - -
-

- - Neocities.org -

-
- -
- -
-
-

Introducing the New Neocities

-

Now’s a great time to join our community of over - <%= @sites_count.to_s.reverse.gsub(/...(?=.)/,'\&,').reverse %> websites! - You get <%= Site::FREE_MAXIMUM.to_space_pretty %> of free web space to make whatever you’d like. -

-
    -
  • - -

    Free web hosting goes social

    -

    - Follow your favorite Neocities sites to keep up with all the latest updates! You can also now discover new websites related to your interests, comment on them, and share them. -

    -
  • -
  • - -

    Making the web fun again

    -

    - We’ve been working to make it easier to build your website and explore other sites. Neocities now has folders, tag browsing (our take on webrings), WebDAV uploading, RSS subscriptions, and more! -

  • -
-
- - - -
- -
- -
- -
- - - -
- -

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce dapibus semper magna id euismod. Vivamus rutrum ultricies.

-
-
-

You own your own site

-

We support custom domains (yoursite.com) for free. This means you always control the content on your site, and you can move it to/from Neocities whenever you want. And of course, all sites still get a subdomain (sitename.neocities.org) for free.

- -

Developer tools

-

We now have powerful APIs for developers building applications, and support for remote file uploading via command line tools. Using WebDAV, you can now mount your site to your computer, just like Dropbox.

-
- -
-

More space, more performance

-

Neocities now uses a distributed, globally-cached file system in tier-1 datacenters to serve your sites. It's a system that took us a year to build - and it's ready to serve your site with blazing speed, whether it's your personal home page, or your professional site. Go ahead, put your site on Neocities. We can handle it.

-
- -
-

Encrypted everything

-

Neocities now secures serving all your content with Snowden-grade cryptography, by default, preventing snoops, whether they are hackers or rogue government agencies, from seeing what you browse. And we're working on letting you use your own SSL (HTTPS) certificates for custom domains. - - Until January, Neocities will donate 5% of all Supporter plan proceeds to the Courage Foundation, an international organization that supports those who risk life or liberty to disclose privacy abuses online.

-
-
- -
- - - - See all press » -
-
- -
-

All Neocities plans include a neocities.org subdomain, WebDAV uploading, one-click backups, and all our social features. We'll never show ads on your site.

- -
-
-
- Personal -
-
- Professional -
-
- -
-
-
-

Free

-
$0
-
per month
- Choose -
    -
  • 30 MB storage
  • -
  • 10 GB bandwidth
  • -
-
- -
-
-

Supporter

-
$5
-
per month
- Choose -
    -
  • 1 GB storage
  • -
  • 100 GB bandwidth
  • -
-
    -
  • Custom Domains
  • -
  • Global CDN Cache
  • -
  • DDoS mitigation
  • -
-
- -
- -
-

Cat Bus

-
$20
-
per month
- Choose -
    -
  • 10 GB storage
  • -
  • 500 GB bandwidth
  • -
-
    -
  • Custom Domains
  • -
  • Global CDN Cache
  • -
  • DDoS mitigation
  • -
  • Custom SSL Certificates
  • -
  • No upload type restrictions
  • -
  • Coming Soon: Unlimited Sites
  • -
-
- -
-
-

Fat Cat

-
$50
-
per month
- Choose -
    -
  • 100 GB storage
  • -
  • 2 TB bandwidth
  • -
-
    -
  • Custom Domains
  • -
  • Global CDN Cache
  • -
  • DDoS mitigation
  • -
  • Custom SSL Certificates
  • -
  • No upload type restrictions
  • -
  • Coming Soon: Unlimited Sites
  • -
-
- -
- -
- -

Compare Plans

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Free

-

$0/mo

- Choose -
-

Supporter

-

$5/mo

- Choose -
-

Cat Bus

-

$20/mo

- Choose -
-

Fat Cat

-

$50/mo

- Choose -
Storage30 MB1 GB10 GB100 GB
Bandwidth10 GB100 GB500 GB2 TB
No advertising, ever
WebDAV Uploading
Neocities.org Subdomain
One-Click Backups
Site Tags
RSS Feed
Follow Your Favorite Sites
Site Profile
Neocities Site Editor
Site Tipping (Coming Soon)
Custom Domains
High Performance Global CDN Cache
DDoS Mitigation
Unlimited Site Creation (Coming Soon)
Custom SSL Certificates
No File Upload Type Restrictions
-
-
- -
- - - <%== erb :'_footer', layout: false%> -
- -
- - - - \ No newline at end of file diff --git a/views/plan/_pricing.erb b/views/plan/_pricing.erb new file mode 100644 index 00000000..eacc8f4a --- /dev/null +++ b/views/plan/_pricing.erb @@ -0,0 +1,242 @@ +
+

All Neocities plans include a neocities.org subdomain, WebDAV uploading, one-click backups, and all our social features. We'll never show ads on your site.

+ +
+
+
+ Personal +
+
+ Professional +
+
+ +
+
+
+

Free

+
$0
+
per month
+ Choose +
    +
  • 30 MB storage
  • +
  • 10 GB bandwidth
  • +
+
+ +
+
+

Supporter

+
$5
+
per month
+ Choose +
    +
  • 1 GB storage
  • +
  • 100 GB bandwidth
  • +
+
    +
  • Custom Domains
  • +
  • Global CDN Cache
  • +
  • DDoS mitigation
  • +
+
+ +
+ +
+

Cat Bus

+
$20
+
per month
+ Choose +
    +
  • 10 GB storage
  • +
  • 500 GB bandwidth
  • +
+
    +
  • Custom Domains
  • +
  • Global CDN Cache
  • +
  • DDoS mitigation
  • +
  • Custom SSL Certificates
  • +
  • No upload type restrictions
  • +
  • Coming Soon: Unlimited Sites
  • +
+
+ +
+
+

Fat Cat

+
$50
+
per month
+ Choose +
    +
  • 100 GB storage
  • +
  • 2 TB bandwidth
  • +
+
    +
  • Custom Domains
  • +
  • Global CDN Cache
  • +
  • DDoS mitigation
  • +
  • Custom SSL Certificates
  • +
  • No upload type restrictions
  • +
  • Coming Soon: Unlimited Sites
  • +
+
+ +
+ +
+ +

Compare Plans

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Free

+

$0/mo

+ Choose +
+

Supporter

+

$5/mo

+ Choose +
+

Cat Bus

+

$20/mo

+ Choose +
+

Fat Cat

+

$50/mo

+ Choose +
Storage30 MB1 GB10 GB100 GB
Bandwidth10 GB100 GB500 GB2 TB
No advertising, ever
WebDAV Uploading
Neocities.org Subdomain
One-Click Backups
Site Tags
RSS Feed
Follow Your Favorite Sites
Site Profile
Neocities Site Editor
Site Tipping (Coming Soon)
Custom Domains
High Performance Global CDN Cache
DDoS Mitigation
Unlimited Site Creation (Coming Soon)
Custom SSL Certificates
No File Upload Type Restrictions
+
\ No newline at end of file From dbdf55841fdcf858820a65578443b16242e5208d Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Wed, 15 Oct 2014 15:43:29 -0700 Subject: [PATCH 3/3] fix tests --- tests/acceptance/index_tests.rb | 2 +- tests/acceptance/settings/site_tests.rb | 4 ++-- tests/acceptance/signin_tests.rb | 4 ++-- tests/acceptance/signup_tests.rb | 2 +- views/layout.erb | 20 ++++++++++---------- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/acceptance/index_tests.rb b/tests/acceptance/index_tests.rb index 70b8a7ac..a458d4e8 100644 --- a/tests/acceptance/index_tests.rb +++ b/tests/acceptance/index_tests.rb @@ -5,7 +5,7 @@ describe 'index' do it 'goes to signup' do Capybara.reset_sessions! visit '/' - click_button 'Create My Website' + click_button 'Create My Site' page.must_have_content('Create a New Website') end end \ No newline at end of file diff --git a/tests/acceptance/settings/site_tests.rb b/tests/acceptance/settings/site_tests.rb index d1bd336d..b5e1d616 100644 --- a/tests/acceptance/settings/site_tests.rb +++ b/tests/acceptance/settings/site_tests.rb @@ -203,7 +203,7 @@ describe 'site/settings' do def visit_signup visit '/' - click_button 'Create My Website' + click_button 'Create My Site' end def fill_in_valid @@ -220,7 +220,7 @@ describe 'site/settings' do it 'does not allow bad usernames' do visit '/' - click_button 'Create My Website' + click_button 'Create My Site' fill_in_valid click_button 'Create Home Page' visit "/settings/#{@site[:username]}#username" diff --git a/tests/acceptance/signin_tests.rb b/tests/acceptance/signin_tests.rb index a990870e..df3d4e92 100644 --- a/tests/acceptance/signin_tests.rb +++ b/tests/acceptance/signin_tests.rb @@ -39,7 +39,7 @@ describe 'signin' do it 'signs in with proper credentials' do visit '/' - click_button 'Create My Website' + click_button 'Create My Site' fill_in_valid_signup click_button 'Create Home Page' Capybara.reset_sessions! @@ -53,7 +53,7 @@ describe 'signin' do it 'signs in with email' do visit '/' - click_button 'Create My Website' + click_button 'Create My Site' fill_in_valid_signup click_button 'Create Home Page' Capybara.reset_sessions! diff --git a/tests/acceptance/signup_tests.rb b/tests/acceptance/signup_tests.rb index 61ab5db5..133fb7c6 100644 --- a/tests/acceptance/signup_tests.rb +++ b/tests/acceptance/signup_tests.rb @@ -12,7 +12,7 @@ describe 'signup' do def visit_signup visit '/' - click_button 'Create My Website' + click_button 'Create My Site' end before do diff --git a/views/layout.erb b/views/layout.erb index 4bc78fd7..bcdc85b3 100644 --- a/views/layout.erb +++ b/views/layout.erb @@ -1,12 +1,12 @@ - <%= title %> - - - - + + + + + @@ -14,14 +14,14 @@ - + - + - - - + + +