diff --git a/app_helpers.rb b/app_helpers.rb index 0723f111..638f1c48 100644 --- a/app_helpers.rb +++ b/app_helpers.rb @@ -76,3 +76,31 @@ def send_confirmation_email(site=current_site) body: Tilt.new('./views/templates/email_confirm.erb', pretty: true).render(self, site: site) }) end + +def plan_pricing_button(plan_type) + plan_type = plan_type.to_s + + if !parent_site + %{Sign Up} + elsif parent_site && parent_site.plan_type == plan_type + if request.path.match /\/welcome/ + %{Get Started} + else + %{
+ |
+ Free+ <% if request.path != '/welcome' %> +$<%= Site::PLAN_FEATURES[:free][:price] %>/mo + <%== plan_pricing_button :free %> + <% end %> + |
+
+ Supporter+ <% if request.path != '/welcome' %> + <% if parent_site && parent_site.legacy_supporter? %> +$<%= Site::LEGACY_SUPPORTER_PRICES[parent_site.values[:plan_type].to_sym] %>/mo +Current Plan
+ <% else %>
+ $<%= Site::PLAN_FEATURES[:supporter][:price] %>/mo + <%== plan_pricing_button :supporter %> + <% end %> + <% end %> + |
+
---|---|---|
+ Storage + | +<%= Site::PLAN_FEATURES[:free][:space].to_bytes_pretty %> | +<%= (Site::PLAN_FEATURES[:supporter][:space] / (10**6)).to_comma_separated %> MB | +
+ Bandwidth + | +<%= Site::PLAN_FEATURES[:free][:bandwidth].to_bytes_pretty %> | +<%= Site::PLAN_FEATURES[:supporter][:bandwidth].to_bytes_pretty %> | +
+ No advertising, ever + | ++ | + |
+ Global CDN Site Cache + | ++ | + |
+ Free Site Subdomain + | ++ | + |
+ One-Click Backups + | ++ | + |
+ Site Tags + | ++ | + |
+ RSS Feed + | ++ | + |
+ Follow Your Favorite Sites + | ++ | + |
+ Site Profile + | ++ | + |
+ Neocities Site Editor + | ++ | + |
+ WebDAV Uploading + | ++ | + |
+ Custom Domains + | ++ | + |
+ Unlimited Site Creation + | ++ | + |
+ Custom SSL Certs (soon) + | ++ | + |
+ No File Upload Type Restrictions + | ++ | + |
- |
- Free-$<%= Site::PLAN_FEATURES[:free][:price] %>/mo - <%== plan_pricing_button :free %> - |
-
- Supporter- <% if parent_site && parent_site.legacy_supporter? %> -$<%= Site::LEGACY_SUPPORTER_PRICES[parent_site.values[:plan_type].to_sym] %>/mo -Current Plan
- <% else %>
- $<%= Site::PLAN_FEATURES[:supporter][:price] %>/mo - <%== plan_pricing_button :supporter %> - <% end %> - |
-
---|---|---|
- Storage - | -<%= Site::PLAN_FEATURES[:free][:space].to_bytes_pretty %> | -<%= Site::PLAN_FEATURES[:supporter][:space].to_bytes_pretty %> | -
- Bandwidth - | -<%= Site::PLAN_FEATURES[:free][:bandwidth].to_bytes_pretty %> | -1000 GB | -
- No advertising, ever - | -- | - |
- Global CDN Site Cache - | -- | - |
- Free Site Subdomain - | -- | - |
- One-Click Backups - | -- | - |
- Site Tags - | -- | - |
- RSS Feed - | -- | - |
- Follow Your Favorite Sites - | -- | - |
- Site Profile - | -- | - |
- Neocities Site Editor - | -- | - |
- WebDAV Uploading - | -- | - |
- Custom Domains - | -- | - |
- Unlimited Site Creation - | -- | - |
- Custom SSL Certs (soon) - | -- | - |
- No File Upload Type Restrictions - | -- | - |