mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
major refactor of supporter structure
This commit is contained in:
parent
dadeb778c9
commit
2c88c62cbc
45 changed files with 440 additions and 1704 deletions
2
app.rb
2
app.rb
|
@ -30,7 +30,7 @@ before do
|
|||
content_type :json
|
||||
elsif request.path.match /^\/webhooks\//
|
||||
# Skips the CSRF/validation check for stripe web hooks
|
||||
elsif email_not_validated? && !(request.path =~ /^\/site\/.+\/confirm_email|^\/settings\/change_email|^\/signout|^\/welcome|^\/plan/)
|
||||
elsif email_not_validated? && !(request.path =~ /^\/site\/.+\/confirm_email|^\/settings\/change_email|^\/signout|^\/welcome|^\/supporter/)
|
||||
redirect "/site/#{current_site.username}/confirm_email"
|
||||
else
|
||||
content_type :html, 'charset' => 'utf-8'
|
||||
|
|
|
@ -41,7 +41,7 @@ end
|
|||
|
||||
get '/welcome' do
|
||||
require_login
|
||||
redirect '/' if current_site.plan_type != 'free'
|
||||
redirect '/' if current_site.supporter?
|
||||
erb :'welcome', locals: {site: current_site}
|
||||
end
|
||||
|
||||
|
|
201
app/plan.rb
201
app/plan.rb
|
@ -1,202 +1,3 @@
|
|||
get '/plan/?' do
|
||||
@title = 'Support Us'
|
||||
|
||||
if parent_site && parent_site.unconverted_legacy_supporter?
|
||||
customer = Stripe::Customer.retrieve(parent_site.stripe_customer_id)
|
||||
subscription = customer.subscriptions.first
|
||||
|
||||
# Subscription was deleted, add to free plan.
|
||||
if subscription.nil?
|
||||
subscription = customer.subscriptions.create plan: 'free'
|
||||
end
|
||||
|
||||
parent_site.stripe_subscription_id = subscription.id
|
||||
parent_site.plan_type = subscription.plan.id
|
||||
parent_site.save_changes
|
||||
end
|
||||
|
||||
erb :'plan/index'
|
||||
end
|
||||
|
||||
def is_special_upgrade
|
||||
params[:username] && params[:plan_type] == 'special'
|
||||
end
|
||||
|
||||
post '/plan/update' do
|
||||
require_login
|
||||
|
||||
if is_special_upgrade
|
||||
require_admin
|
||||
site = Site[username: params[:username]]
|
||||
|
||||
if site.nil?
|
||||
flash[:error] = 'Cannot find the requested user.'
|
||||
redirect '/admin'
|
||||
end
|
||||
end
|
||||
|
||||
site ||= parent_site
|
||||
|
||||
DB.transaction do
|
||||
if site.stripe_subscription_id
|
||||
customer = Stripe::Customer.retrieve site.stripe_customer_id
|
||||
subscription = customer.subscriptions.retrieve site.stripe_subscription_id
|
||||
subscription.plan = params[:plan_type]
|
||||
subscription.save
|
||||
|
||||
site.update(
|
||||
plan_ended: false,
|
||||
plan_type: params[:plan_type]
|
||||
)
|
||||
else
|
||||
customer = Stripe::Customer.create(
|
||||
card: params[:stripe_token],
|
||||
description: "#{site.username} - #{site.id}",
|
||||
email: site.email,
|
||||
plan: params[:plan_type]
|
||||
)
|
||||
|
||||
site.update(
|
||||
stripe_customer_id: customer.id,
|
||||
stripe_subscription_id: customer.subscriptions.first.id,
|
||||
plan_ended: false,
|
||||
plan_type: params[:plan_type]
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
if site.email
|
||||
if is_special_upgrade
|
||||
site.send_email(
|
||||
subject: "[Neocities] Your site has been upgraded to supporter!",
|
||||
body: Tilt.new('./views/templates/email/supporter_upgrade.erb', pretty: true).render(self)
|
||||
)
|
||||
|
||||
redirect '/admin'
|
||||
else
|
||||
site.send_email(
|
||||
subject: "[Neocities] You've become a supporter!",
|
||||
body: Tilt.new('./views/templates/email_subscription.erb', pretty: true).render(
|
||||
self, {
|
||||
username: site.username,
|
||||
plan_name: Site::PLAN_FEATURES[params[:plan_type].to_sym][:name],
|
||||
plan_space: Site::PLAN_FEATURES[params[:plan_type].to_sym][:space].to_space_pretty,
|
||||
plan_bw: Site::PLAN_FEATURES[params[:plan_type].to_sym][:bandwidth].to_space_pretty
|
||||
})
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
if is_special_upgrade
|
||||
flash[:success] = "#{site.username} has been upgraded to supporter."
|
||||
redirect '/admin'
|
||||
end
|
||||
|
||||
redirect params[:plan_type] == 'free' ? '/plan' : '/plan/thanks'
|
||||
end
|
||||
|
||||
get '/plan/thanks' do
|
||||
require_login
|
||||
erb :'plan/thanks'
|
||||
end
|
||||
|
||||
get '/plan/bitcoin/?' do
|
||||
erb :'plan/bitcoin'
|
||||
end
|
||||
|
||||
get '/plan/alternate/?' do
|
||||
redirect '/plan/bitcoin'
|
||||
end
|
||||
|
||||
def paypal_recurring_hash
|
||||
{
|
||||
ipn_url: "https://neocities.org/webhooks/paypal",
|
||||
description: 'Neocities Supporter - Monthly',
|
||||
amount: Site::PLAN_FEATURES[:supporter][:price].to_s,
|
||||
currency: 'USD'
|
||||
}
|
||||
end
|
||||
|
||||
def paypal_recurring_authorization_hash
|
||||
paypal_recurring_hash.merge(
|
||||
return_url: "https://neocities.org/plan/paypal/return",
|
||||
cancel_url: "https://neocities.org/plan",
|
||||
ipn_url: "https://neocities.org/webhooks/paypal"
|
||||
)
|
||||
end
|
||||
|
||||
get '/plan/paypal' do
|
||||
require_login
|
||||
redirect '/plan' if parent_site.supporter?
|
||||
|
||||
hash = paypal_recurring_authorization_hash
|
||||
|
||||
if current_site.paypal_token
|
||||
hash.merge! token: current_site.paypal_token
|
||||
end
|
||||
|
||||
ppr = PayPal::Recurring.new hash
|
||||
|
||||
paypal_response = ppr.checkout
|
||||
|
||||
redirect paypal_response.checkout_url if paypal_response.valid?
|
||||
end
|
||||
|
||||
get '/plan/paypal/return' do
|
||||
require_login
|
||||
|
||||
if params[:token].nil? || params[:PayerID].nil?
|
||||
flash[:error] = 'Unknown error, could not complete the request. Please contact Neocities support.'
|
||||
end
|
||||
|
||||
ppr = PayPal::Recurring.new(paypal_recurring_hash.merge(
|
||||
token: params[:token],
|
||||
payer_id: params[:PayerID]
|
||||
))
|
||||
|
||||
paypal_response = ppr.request_payment
|
||||
unless paypal_response.approved? && paypal_response.completed?
|
||||
flash[:error] = 'Unknown error, could not complete the request. Please contact Neocities support.'
|
||||
redirect '/plan'
|
||||
end
|
||||
|
||||
ppr = PayPal::Recurring.new(paypal_recurring_authorization_hash.merge(
|
||||
frequency: 1,
|
||||
token: params[:token],
|
||||
period: :monthly,
|
||||
reference: current_site.id.to_s,
|
||||
payer_id: params[:PayerID],
|
||||
start_at: 1.month.from_now,
|
||||
failed: 3,
|
||||
outstanding: :next_billing
|
||||
))
|
||||
|
||||
paypal_response = ppr.create_recurring_profile
|
||||
|
||||
current_site.paypal_token = params[:token]
|
||||
current_site.paypal_profile_id = paypal_response.profile_id
|
||||
current_site.paypal_active = true
|
||||
current_site.plan_type = 'supporter'
|
||||
current_site.save_changes validate: false
|
||||
|
||||
redirect '/plan/thanks-paypal'
|
||||
end
|
||||
|
||||
get '/plan/thanks-paypal' do
|
||||
require_login
|
||||
erb :'plan/thanks-paypal'
|
||||
end
|
||||
|
||||
get '/plan/paypal/cancel' do
|
||||
require_login
|
||||
redirect '/plan' unless parent_site.paypal_active
|
||||
ppr = PayPal::Recurring.new profile_id: parent_site.paypal_profile_id
|
||||
ppr.cancel
|
||||
|
||||
parent_site.plan_type = nil
|
||||
parent_site.paypal_active = false
|
||||
parent_site.paypal_profile_id = nil
|
||||
parent_site.paypal_token = nil
|
||||
parent_site.save_changes validate: false
|
||||
redirect '/plan'
|
||||
redirect '/supporter'
|
||||
end
|
||||
|
|
|
@ -32,15 +32,6 @@ post '/settings/:username/delete' do
|
|||
redirect "/settings/#{@site.username}#delete"
|
||||
end
|
||||
|
||||
if @site.parent? && @site.stripe_customer_id
|
||||
customer = Stripe::Customer.retrieve @site.stripe_customer_id
|
||||
subscription = customer.subscriptions.retrieve @site.stripe_subscription_id
|
||||
subscription.plan = 'free'
|
||||
subscription.save
|
||||
@site.plan_type = 'free'
|
||||
@site.save_changes validate: false
|
||||
end
|
||||
|
||||
@site.deleted_reason = params[:deleted_reason]
|
||||
@site.save validate: false
|
||||
@site.destroy
|
||||
|
|
|
@ -114,7 +114,7 @@ post '/site_files/upload' do
|
|||
file_upload_response "#{file[:filename]} is too large, upload cancelled."
|
||||
end
|
||||
if !current_site.okay_to_upload? file
|
||||
file_upload_response %{#{file[:filename]}: file type (or content in file) is only supported by <a href="/plan">supporter accounts</a>. <a href="/site_files/allowed_types">Why We Do This</a>}
|
||||
file_upload_response %{#{file[:filename]}: file type (or content in file) is only supported by <a href="/supporter">supporter accounts</a>. <a href="/site_files/allowed_types">Why We Do This</a>}
|
||||
end
|
||||
end
|
||||
|
||||
|
|
186
app/supporter.rb
Normal file
186
app/supporter.rb
Normal file
|
@ -0,0 +1,186 @@
|
|||
get '/supporter/?' do
|
||||
@title = 'Become a Supporter'
|
||||
erb :'welcome'
|
||||
end
|
||||
|
||||
post '/supporter/end' do
|
||||
require_login
|
||||
redirect '/' unless parent_site.paying_supporter?
|
||||
parent_site.end_supporter_membership!
|
||||
|
||||
flash[:success] = "Your supporter membership has been cancelled. We're sorry to see you go, but thanks again for your support! Remember, you can always become a supporter again in the future."
|
||||
redirect '/supporter'
|
||||
end
|
||||
|
||||
post '/supporter/update' do
|
||||
require_login
|
||||
|
||||
plan_type = 'supporter'
|
||||
|
||||
if is_special_upgrade
|
||||
require_admin
|
||||
site = Site[username: params[:username]]
|
||||
|
||||
plan_type = 'special'
|
||||
|
||||
if site.nil?
|
||||
flash[:error] = 'Cannot find the requested user.'
|
||||
redirect '/admin'
|
||||
end
|
||||
end
|
||||
|
||||
site ||= parent_site
|
||||
|
||||
DB.transaction do
|
||||
if site.stripe_customer_id
|
||||
customer = Stripe::Customer.retrieve site.stripe_customer_id
|
||||
customer.cards.each {|card| card.delete}
|
||||
|
||||
if !params[:stripe_token].blank?
|
||||
customer.sources.create source: params[:stripe_token]
|
||||
end
|
||||
|
||||
subscription = customer.subscriptions.create plan: plan_type
|
||||
|
||||
site.plan_ended = false
|
||||
site.plan_type = plan_type
|
||||
site.stripe_subscription_id = subscription.id
|
||||
site.save_changes validate: false
|
||||
else
|
||||
customer = Stripe::Customer.create(
|
||||
card: params[:stripe_token],
|
||||
description: "#{site.username} - #{site.id}",
|
||||
email: site.email,
|
||||
plan: plan_type
|
||||
)
|
||||
|
||||
site.update(
|
||||
stripe_customer_id: customer.id,
|
||||
stripe_subscription_id: customer.subscriptions.first.id,
|
||||
plan_ended: false,
|
||||
plan_type: plan_type
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
if site.email
|
||||
if is_special_upgrade
|
||||
site.send_email(
|
||||
subject: "[Neocities] Your site has been upgraded to supporter!",
|
||||
body: Tilt.new('./views/templates/email/supporter_upgrade.erb', pretty: true).render(self)
|
||||
)
|
||||
|
||||
redirect '/admin'
|
||||
end
|
||||
|
||||
site.send_email(
|
||||
subject: "[Neocities] You've become a supporter!",
|
||||
body: Tilt.new('./views/templates/email_subscription.erb', pretty: true).render(
|
||||
self, {
|
||||
username: site.username,
|
||||
plan_name: Site::PLAN_FEATURES[params[:plan_type].to_sym][:name],
|
||||
plan_space: Site::PLAN_FEATURES[params[:plan_type].to_sym][:space].to_space_pretty,
|
||||
plan_bw: Site::PLAN_FEATURES[params[:plan_type].to_sym][:bandwidth].to_space_pretty
|
||||
})
|
||||
)
|
||||
end
|
||||
|
||||
if is_special_upgrade
|
||||
flash[:success] = "#{site.username} has been upgraded to supporter."
|
||||
redirect '/admin'
|
||||
end
|
||||
|
||||
redirect '/supporter/thanks'
|
||||
end
|
||||
|
||||
get '/supporter/thanks' do
|
||||
require_login
|
||||
erb :'supporter/thanks'
|
||||
end
|
||||
|
||||
get '/supporter/bitcoin/?' do
|
||||
erb :'supporter/bitcoin'
|
||||
end
|
||||
|
||||
get '/supporter/paypal' do
|
||||
require_login
|
||||
redirect '/supporter' if parent_site.supporter?
|
||||
|
||||
hash = paypal_recurring_authorization_hash
|
||||
|
||||
if parent_site.paypal_token
|
||||
hash.merge! token: parent_site.paypal_token
|
||||
end
|
||||
|
||||
ppr = PayPal::Recurring.new hash
|
||||
|
||||
paypal_response = ppr.checkout
|
||||
|
||||
if !paypal_response.valid?
|
||||
flash[:error] = 'There was an issue connecting to Paypal, please contact support.'
|
||||
redirect '/supporter'
|
||||
end
|
||||
|
||||
redirect paypal_response.checkout_url
|
||||
end
|
||||
|
||||
get '/supporter/paypal/return' do
|
||||
require_login
|
||||
|
||||
if params[:token].nil? || params[:PayerID].nil?
|
||||
flash[:error] = 'Unknown error, could not complete the request. Please contact Neocities support.'
|
||||
end
|
||||
|
||||
ppr = PayPal::Recurring.new(paypal_recurring_hash.merge(
|
||||
token: params[:token],
|
||||
payer_id: params[:PayerID]
|
||||
))
|
||||
|
||||
paypal_response = ppr.request_payment
|
||||
unless paypal_response.approved? && paypal_response.completed?
|
||||
flash[:error] = 'Unknown error, could not complete the request. Please contact Neocities support.'
|
||||
redirect '/supporter'
|
||||
end
|
||||
|
||||
ppr = PayPal::Recurring.new(paypal_recurring_authorization_hash.merge(
|
||||
frequency: 1,
|
||||
token: params[:token],
|
||||
period: :monthly,
|
||||
reference: current_site.id.to_s,
|
||||
payer_id: params[:PayerID],
|
||||
start_at: 1.month.from_now,
|
||||
failed: 3,
|
||||
outstanding: :next_billing
|
||||
))
|
||||
|
||||
paypal_response = ppr.create_recurring_profile
|
||||
|
||||
current_site.paypal_token = params[:token]
|
||||
current_site.paypal_profile_id = paypal_response.profile_id
|
||||
current_site.paypal_active = true
|
||||
current_site.plan_type = 'supporter'
|
||||
current_site.save_changes validate: false
|
||||
|
||||
redirect '/supporter/thanks-paypal'
|
||||
end
|
||||
|
||||
def paypal_recurring_hash
|
||||
{
|
||||
ipn_url: "https://neocities.org/webhooks/paypal",
|
||||
description: 'Neocities Supporter - Monthly',
|
||||
amount: Site::PLAN_FEATURES[:supporter][:price].to_s,
|
||||
currency: 'USD'
|
||||
}
|
||||
end
|
||||
|
||||
def paypal_recurring_authorization_hash
|
||||
paypal_recurring_hash.merge(
|
||||
return_url: "https://neocities.org/supporter/paypal/return",
|
||||
cancel_url: "https://neocities.org/supporter",
|
||||
ipn_url: "https://neocities.org/webhooks/paypal"
|
||||
)
|
||||
end
|
||||
|
||||
def is_special_upgrade
|
||||
params[:username] && params[:plan_type] == 'special'
|
||||
end
|
|
@ -40,6 +40,7 @@ post '/webhooks/stripe' do
|
|||
site = stripe_get_site_from_event event
|
||||
site.stripe_subscription_id = nil
|
||||
site.plan_type = nil
|
||||
site.plan_ended = true
|
||||
site.save_changes validate: false
|
||||
|
||||
EmailWorker.perform_async({
|
||||
|
|
|
@ -88,38 +88,6 @@ def send_confirmation_email(site=current_site)
|
|||
})
|
||||
end
|
||||
|
||||
def plan_pricing_button(plan_type)
|
||||
plan_type = plan_type.to_s
|
||||
|
||||
if !parent_site
|
||||
%{<a href="/#new" class="btn-Action">Sign Up</a>}
|
||||
elsif parent_site && parent_site.plan_type == plan_type
|
||||
if request.path.match /\/welcome/
|
||||
%{<a href="/" class="btn-Action">Get Started</a>}
|
||||
else
|
||||
%{<div class="current-plan">Current Plan</div>}
|
||||
end
|
||||
else
|
||||
#if plan_type == 'supporter'
|
||||
# plan_price = "$#{Site::PLAN_FEATURES[plan_type.to_sym][:price]*12}, once per year"
|
||||
#else
|
||||
plan_price = "$#{Site::PLAN_FEATURES[plan_type.to_sym][:price]}, monthly"
|
||||
#end
|
||||
|
||||
if request.path.match /\/welcome/
|
||||
button_title = 'Get Started'
|
||||
else
|
||||
button_title = parent_site.plan_type == 'free' ? 'Upgrade' : 'Change'
|
||||
end
|
||||
|
||||
if button_title == 'Change' && parent_site && parent_site.paypal_active
|
||||
return %{<a href="/plan/paypal/cancel" onclick="return confirm('This will end your supporter plan.')" class="btn-Action">Change</a>}
|
||||
end
|
||||
|
||||
%{<a data-plan_name="#{Site::PLAN_FEATURES[plan_type.to_sym][:name]}" data-plan_type="#{plan_type}" data-plan_price="#{plan_price}" onclick="card = new Skeuocard($('#skeuocard')); return false" class="btn-Action planPricingButton">#{button_title}</a>}
|
||||
end
|
||||
end
|
||||
|
||||
def dont_browser_cache
|
||||
headers['Cache-Control'] = 'private, no-store, max-age=0, no-cache, must-revalidate, post-check=0, pre-check=0'
|
||||
headers['Pragma'] = 'no-cache'
|
||||
|
|
|
@ -426,6 +426,8 @@ class Site < Sequel::Model
|
|||
|
||||
def before_destroy
|
||||
DB.transaction {
|
||||
owner.end_supporter_membership! if parent?
|
||||
|
||||
if !Dir.exist? DELETED_SITES_ROOT
|
||||
FileUtils.mkdir DELETED_SITES_ROOT
|
||||
end
|
||||
|
@ -447,18 +449,10 @@ class Site < Sequel::Model
|
|||
end
|
||||
|
||||
return if is_banned == true
|
||||
|
||||
DB.transaction {
|
||||
self.is_banned = true
|
||||
self.banned_at = Time.now
|
||||
save(validate: false)
|
||||
|
||||
if !Dir.exist? BANNED_SITES_ROOT
|
||||
FileUtils.mkdir BANNED_SITES_ROOT
|
||||
end
|
||||
|
||||
FileUtils.mv files_path, File.join(BANNED_SITES_ROOT, username)
|
||||
}
|
||||
save validate: false
|
||||
destroy
|
||||
|
||||
site_files.each do |site_file|
|
||||
delete_cache site_file.path
|
||||
|
@ -999,7 +993,7 @@ class Site < Sequel::Model
|
|||
|
||||
def current_base_files_path(name=username)
|
||||
raise 'username missing' if name.nil? || name.empty?
|
||||
return File.join BANNED_SITES_ROOT, name if is_banned
|
||||
return File.join DELETED_SITES_ROOT, name if is_deleted
|
||||
base_files_path name
|
||||
end
|
||||
|
||||
|
@ -1114,7 +1108,43 @@ class Site < Sequel::Model
|
|||
end
|
||||
|
||||
def stripe_paying_supporter?
|
||||
stripe_customer_id && !plan_ended && values[:plan_type].match(/free|special/).nil?
|
||||
owner.stripe_customer_id && !owner.plan_ended && owner.values[:plan_type] && owner.values[:plan_type].match(/free|special/).nil?
|
||||
end
|
||||
|
||||
def paypal_paying_supporter?
|
||||
owner.paypal_active && owner.paypal_profile_id
|
||||
end
|
||||
|
||||
def paying_supporter?
|
||||
return true if stripe_paying_supporter? || owner.values[:paypal_active] == true
|
||||
end
|
||||
|
||||
def end_supporter_membership!
|
||||
owner.end_supporter_membership! unless parent?
|
||||
|
||||
if stripe_paying_supporter?
|
||||
customer = Stripe::Customer.retrieve stripe_customer_id
|
||||
subscription = customer.subscriptions.retrieve stripe_subscription_id
|
||||
subscription.delete
|
||||
|
||||
self.plan_type = nil
|
||||
self.stripe_subscription_id = nil
|
||||
self.plan_ended = true
|
||||
elsif paypal_paying_supporter?
|
||||
ppr = PayPal::Recurring.new profile_id: paypal_profile_id
|
||||
ppr.cancel
|
||||
|
||||
self.plan_type = nil
|
||||
self.paypal_active = false
|
||||
self.paypal_profile_id = nil
|
||||
self.paypal_token = nil
|
||||
self.plan_ended = true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
save_changes validate: false
|
||||
true
|
||||
end
|
||||
|
||||
def unconverted_legacy_supporter?
|
||||
|
|
|
@ -312,12 +312,10 @@ describe 'delete' do
|
|||
fill_in 'deleted_reason', with: 'derp'
|
||||
click_button 'Delete Site'
|
||||
|
||||
subscription = Stripe::Customer.retrieve(@site.stripe_customer_id).subscriptions.first
|
||||
|
||||
subscription.plan.id.must_equal 'free'
|
||||
Stripe::Customer.retrieve(@site.stripe_customer_id).subscriptions.count.must_equal 0
|
||||
@site.reload
|
||||
@site.stripe_subscription_id.must_equal nil
|
||||
@site.is_deleted.must_equal true
|
||||
@site.plan_type.must_equal 'free'
|
||||
end
|
||||
|
||||
it 'should fail unless owned by current user' do
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require_relative './environment.rb'
|
||||
|
||||
describe '/plan' do
|
||||
describe '/supporter' do
|
||||
include Capybara::DSL
|
||||
|
||||
before do
|
||||
|
@ -24,16 +24,16 @@ describe '/plan' do
|
|||
end
|
||||
|
||||
it 'should work for fresh signup' do
|
||||
visit '/plan'
|
||||
visit '/supporter'
|
||||
fill_in 'Card Number', with: '4242424242424242'
|
||||
fill_in 'Expiration Month', with: '01'
|
||||
fill_in 'Expiration Year', with: Date.today.next_year
|
||||
fill_in 'Cardholder\'s Name', with: 'Penelope'
|
||||
fill_in 'Card Validation Code', with: '123'
|
||||
find('#stripe_token').set @stripe_helper.generate_card_token
|
||||
find('#upgradePlanType').set 'supporter'
|
||||
click_button 'Upgrade'
|
||||
page.current_path.must_equal '/plan/thanks'
|
||||
#find('#upgradePlanType').set 'supporter'
|
||||
click_link 'Upgrade for'
|
||||
page.current_path.must_equal '/supporter/thanks'
|
||||
page.body.must_match /You now have the Supporter plan./
|
||||
@site.reload
|
||||
@site.stripe_customer_id.wont_be_nil
|
|
@ -10,7 +10,7 @@ describe Site do
|
|||
site = Fabricate :site
|
||||
site.ban!
|
||||
File.exist?(site.current_files_path('index.html')).must_equal true
|
||||
site.current_files_path('index.html').must_equal File.join(Site::BANNED_SITES_ROOT, site.username, 'index.html')
|
||||
site.current_files_path('index.html').must_equal File.join(Site::DELETED_SITES_ROOT, site.username, 'index.html')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<a href="/tutorials">Learn</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/plan">
|
||||
<a href="/supporter">
|
||||
<% if signed_in? %>
|
||||
<% unless current_site.supporter? %>
|
||||
Upgrade to Supporter<i class="fa fa-heart"><i class="fa fa-heart"></i></i>
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
</ul>
|
||||
|
||||
<p style="margin-top:20px">
|
||||
If you share our values, we would love your support. Spread the word! We also have a <a href="/plan">supporter plan</a> to help pay for the site, and we accept <a href="/donate">donations</a> through multiple options (including Bitcoin... and Dogecoin).
|
||||
If you share our values, we would love your support. Spread the word! We also have a <a href="/supporter">supporter plan</a> to help pay for the site, and we accept <a href="/donate">donations</a> through multiple options (including Bitcoin... and Dogecoin).
|
||||
</p>
|
||||
</article>
|
||||
<%== erb :'_team', layout: false %>
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
<div class="row">
|
||||
<div class="col col-50">
|
||||
<h2>Upgrade to Supporter</h2>
|
||||
<form id="upgradeToSupporter" action="/plan/update" method="POST">
|
||||
<form id="upgradeToSupporter" action="/supporter/update" method="POST">
|
||||
<input type="hidden" name="plan_type" value="special">
|
||||
<%== csrf_token_input_html %>
|
||||
<p>This site will be upgraded to the supporter plan.</p>
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
</p>
|
||||
|
||||
<p>
|
||||
Our <a href="/api">API</a> allows you to very easily write a script to upload content if you need. We also have <a href="/site_files/mount_info">WebDAV</a> available for <a href="https://neocities.org/plan">supporter</a> accounts, which allows you to mount your Neocities site as a disk on your computer.
|
||||
Our <a href="/api">API</a> allows you to very easily write a script to upload content if you need. We also have <a href="/site_files/mount_info">WebDAV</a> available for <a href="https://neocities.org/supporter">supporter</a> accounts, which allows you to mount your Neocities site as a disk on your computer.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<% end %>
|
||||
<li>Using <strong><%= current_site.space_percentage_used %>% (<%= current_site.total_space_used.to_space_pretty %>) of your <%= current_site.maximum_space.to_space_pretty %></strong>.
|
||||
<br>
|
||||
<% unless current_site.is_education || current_site.supporter? %>Need more space? <a href="/plan">Become a Supporter!</a><% end %></li>
|
||||
<% unless current_site.is_education || current_site.supporter? %>Need more space? <a href="/supporter">Become a Supporter!</a><% end %></li>
|
||||
<li><strong><%= current_site.views.format_large_number %></strong> views</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -187,7 +187,7 @@
|
|||
<h2>Support Us</h2>
|
||||
<div class="row quote">
|
||||
<div class="col" style="">
|
||||
<p>Neocities is funded directly by our community through supporter plans and donations. We will never sell users' personal data or embed advertising on member sites. Your support allows us to pay for server costs and continue working on Neocities full-time. You can support us by making a <a href="/donate">one-time donation</a> or by <a href="/plan">subscribing for $5/month</a>.</p>
|
||||
<p>Neocities is funded directly by our community through supporter plans and donations. We will never sell users' personal data or embed advertising on member sites. Your support allows us to pay for server costs and continue working on Neocities full-time. You can support us by making a <a href="/donate">one-time donation</a> or by <a href="/supporter">subscribing for $5/month</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -202,7 +202,7 @@
|
|||
<span class="footer-icon"></span>
|
||||
<h2 class="delta">Support Us</h2>
|
||||
<p class="tiny">
|
||||
Neocities is funded by <a href="/plan">supporters</a> and <a href="/donate">donations</a>. If you’d like to contribute, you can help us pay our server costs using credit card, Bitcoin, or PayPal.
|
||||
Neocities is funded by <a href="/supporter">supporters</a> and <a href="/donate">donations</a>. If you’d like to contribute, you can help us pay our server costs using credit card, Bitcoin, or PayPal.
|
||||
</p>
|
||||
<a href="/donate" title="Donate to Neocities" class="action-Link">Donate Today</a>
|
||||
</div>
|
||||
|
|
|
@ -1,287 +0,0 @@
|
|||
<div class="header-Outro with-columns">
|
||||
<div class="row content">
|
||||
<div class="col col-66">
|
||||
<h3>My Feed</h3>
|
||||
<div class="feed-filter"><a href="">All Activity</a> <a href="">Activity on your profile</a></div>
|
||||
</div>
|
||||
<div class="col col-32">
|
||||
<h3>My Website</h3>
|
||||
<a href="/dashboard" class="btn-Action edit">Edit Site</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="content misc-page columns right-col"><div class="col-left">
|
||||
<div class="col col-66">
|
||||
<% if false %>
|
||||
<div class="welcome">
|
||||
<h4>Welcome to your Neocities news feed!</h4>
|
||||
<p>You aren't following any websites yet! Once you do, updates will show up here and you can like and comment on them. Here are some website suggestions based on your tags, or <a href="/browse">check out all the sites on Neocities!</a></p>
|
||||
</div>
|
||||
|
||||
<div class="site-suggestion">
|
||||
<div class="site-portrait">
|
||||
<a href="http://dragonquest.neocities.org">
|
||||
<img src="http://neocities.org/site_screenshots/dragonquest.jpg" alt="">
|
||||
<span class="caption">dragonquest</span>
|
||||
</a>
|
||||
</div>
|
||||
<a class="tag" href="http://neocities.org">Games</a>
|
||||
<a class="tag" href="http://neocities.org">Anime</a>
|
||||
<a class="tag" href="http://neocities.org">Art</a>
|
||||
<a class="tag" href="http://neocities.org">Cooking</a>
|
||||
</div>
|
||||
|
||||
<div class="site-suggestion">
|
||||
<div class="site-portrait">
|
||||
<a href="http://dragonquest.neocities.org">
|
||||
<img src="http://neocities.org/site_screenshots/dragonquest.jpg" alt="">
|
||||
<span class="caption">dragonquest</span>
|
||||
</a>
|
||||
</div>
|
||||
<a class="tag" href="http://neocities.org">Games</a>
|
||||
<a class="tag" href="http://neocities.org">Anime</a>
|
||||
<a class="tag" href="http://neocities.org">Art</a>
|
||||
</div>
|
||||
|
||||
<div class="site-suggestion">
|
||||
<div class="site-portrait">
|
||||
<a href="http://dragonquest.neocities.org">
|
||||
<img src="http://neocities.org/site_screenshots/dragonquest.jpg" alt="">
|
||||
<span class="caption">dragonquest</span>
|
||||
</a>
|
||||
</div>
|
||||
<a class="tag" href="http://neocities.org">Games</a>
|
||||
<a class="tag" href="http://neocities.org">Anime</a>
|
||||
</div>
|
||||
|
||||
<div class="site-suggestion">
|
||||
<div class="site-portrait">
|
||||
<a href="http://dragonquest.neocities.org">
|
||||
<img src="http://neocities.org/site_screenshots/dragonquest.jpg" alt="">
|
||||
<span class="caption">dragonquest</span>
|
||||
</a>
|
||||
</div>
|
||||
<a class="tag" href="http://neocities.org">Games</a>
|
||||
</div>
|
||||
|
||||
<div class="site-suggestion">
|
||||
<div class="site-portrait">
|
||||
<a href="http://dragonquest.neocities.org">
|
||||
<img src="http://neocities.org/site_screenshots/dragonquest.jpg" alt="">
|
||||
<span class="caption">dragonquest</span>
|
||||
</a>
|
||||
</div>
|
||||
<a class="tag" href="http://neocities.org">Games</a>
|
||||
<a class="tag" href="http://neocities.org">Anime</a>
|
||||
</div>
|
||||
|
||||
<div class="site-suggestion">
|
||||
<div class="site-portrait">
|
||||
<a href="http://dragonquest.neocities.org">
|
||||
<img src="http://neocities.org/site_screenshots/dragonquest.jpg" alt="">
|
||||
<span class="caption">dragonquest</span>
|
||||
</a>
|
||||
</div>
|
||||
<a class="tag" href="http://neocities.org">Games</a>
|
||||
</div>
|
||||
<% end %>
|
||||
<!-- --------------------------------------------------------------------------------------------------------------------------- -->
|
||||
|
||||
<!-- need to add a class of "first" to the first news-item element -->
|
||||
|
||||
<div class="news-item comment">
|
||||
<div class="title">
|
||||
<div class="icon"></div>
|
||||
<a href="" class="user">Foo</a> commented on <a href="" class="user">Derp's</a> website: <a href="" class="comment">I really like your site, your graphics are awesome and...</a>
|
||||
<span class="date">30m</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news-item tags">
|
||||
<div class="title">
|
||||
<div class="icon"></div>
|
||||
New sites in <a href="" class="tag">games</a><span class="date">3h</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="site-suggestion">
|
||||
<div class="site-portrait">
|
||||
<a href="http://dragonquest.neocities.org">
|
||||
<img src="http://neocities.org/site_screenshots/dragonquest.jpg">
|
||||
<span class="caption">dragonquest</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="site-suggestion">
|
||||
<div class="site-portrait">
|
||||
<a href="http://dragonquest.neocities.org">
|
||||
<img src="http://neocities.org/site_screenshots/dragonquest.jpg">
|
||||
<span class="caption">dragonquest</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="site-suggestion">
|
||||
<div class="site-portrait">
|
||||
<a href="http://dragonquest.neocities.org">
|
||||
<img src="http://neocities.org/site_screenshots/dragonquest.jpg">
|
||||
<span class="caption">dragonquest</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="site-suggestion">
|
||||
<div class="site-portrait">
|
||||
<a href="http://dragonquest.neocities.org">
|
||||
<img src="http://neocities.org/site_screenshots/dragonquest.jpg">
|
||||
<span class="caption">dragonquest</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="news-item follow">
|
||||
<div class="title">
|
||||
<div class="icon"></div>
|
||||
<a href="" class="user">Foo</a> followed <a href="" class="user">Derp's</a> website<span class="date">7h</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="news-item tip">
|
||||
<div class="title">
|
||||
<div class="icon"></div>
|
||||
You tipped <a href="" class="user">Derp's</a> website: <a href="" class="comment">Wow, great work here! Please keep updating :)</a><span class="date">Apr 23</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="news-item comment">
|
||||
<div class="title">
|
||||
<div class="icon"></div>
|
||||
<a href="" class="user">Foo</a> commented on <a href="" class="user">Derp's</a> website: <a href="" class="comment">I had a question - how did you make it so that the...</a>
|
||||
<span class="date">Apr 20</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="news-item follow">
|
||||
<div class="title">
|
||||
<div class="icon"></div>
|
||||
You followed <a href="" class="user">Derp's</a> website<span class="date">Apr 7</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="news-item update">
|
||||
<div class="title">
|
||||
<div class="icon"></div>
|
||||
<a href="" class="user">Derp</a> made an update <span class="date">Apr 7</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="files">
|
||||
<div class="file">
|
||||
<div class="html-thumbnail misc"><a href=""><span class="misc-icon">css</span><span class="title">styles.css</span></a></div>
|
||||
</div>
|
||||
<div class="file">
|
||||
<div class="html-thumbnail html"><a href=""><img src="http://neocities.org/site_screenshots/codeventurer.jpg"><span class="title">styles.css</span></a></div>
|
||||
</div>
|
||||
<div class="file">
|
||||
<div class="html-thumbnail misc"><a href=""><span class="misc-icon">js</span><span class="title">styles.css</span></a></div>
|
||||
</div>
|
||||
<div class="file">
|
||||
<div class="html-thumbnail image"><a href=""><img src="/site_thumbnails/victoria/constructioncat2.png.105x63.png"><span class="title">cat.jpg</span></a></div>
|
||||
</div>
|
||||
<div class="file">
|
||||
<div class="html-thumbnail misc"><a href=""><span class="misc-icon">js</span><span class="title">styles.css</span></a></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="actions"><a href="">Like (1)</a> <a href="">Reply</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="news-item comment for-me">
|
||||
<div class="title">
|
||||
<div class="icon" style="background-image:url(https://neocities.org/site_screenshots/codeventurer.jpg);"></div>
|
||||
<a href="" class="user">Derpie</a>
|
||||
<span class="date">Apr 7</span>
|
||||
<div class="comment">Your site is amazing. Very helpful information. Would love to see more updates if you have time. Your site is amazing. Very helpful information. Would love to see more updates if you have time. </div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="actions"><a href="">Like (1)</a> <a href="">Reply</a></div>
|
||||
<div class="comments">
|
||||
<div class="comment">
|
||||
<img class="avatar" src="https://neocities.org/site_screenshots/victoria.jpg">
|
||||
<a href="" class="user">victoria</a> Indeed, it's great!<span class="date">Apr 7</span>
|
||||
<div class="actions"><a href="">Like (1)</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="news-item comment">
|
||||
<div class="title">
|
||||
<div class="icon"></div>
|
||||
<a href="" class="user">Foo</a> commented on <a href="" class="user">Derp's</a> website: <a href="" class="comment">I had a question - how did you make it so that the...</a>
|
||||
<span class="date">Apr 7</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="news-item follow">
|
||||
<div class="title">
|
||||
<div class="icon"></div>
|
||||
You followed <a href="" class="user">Derp's</a> website<span class="date">Apr 7</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="news-item tip for-me">
|
||||
<div class="title">
|
||||
<div class="icon" style="background-image:url(https://neocities.org/site_screenshots/victoria.jpg);"></div>
|
||||
<a href="" class="user">victoria</a> tipped you .01 BTC
|
||||
<span class="date">Apr 7</span>
|
||||
<div class="comment">Hey, this looks great!</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="actions"><a href="">Like (1)</a> <a href="">Reply</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col col-33">
|
||||
<p class="site-url"><a href="http://<%= current_site.username %>.neocities.org" target="_blank">http://<%= current_site.username %>.neocities.org</a></p>
|
||||
<div class="stats">
|
||||
<div class="col col-50">Last updated<br><strong><%= current_site.updated_at ? current_site.updated_at.ago : '' %></strong></div>
|
||||
<div class="col col-50">
|
||||
<div><strong><%= current_site.hits.to_s.reverse.gsub(/...(?=.)/,'\&,').reverse %></strong> hits</div>
|
||||
<div><strong>24</strong> followers</div>
|
||||
<div><strong>3</strong> tips ($13.55)</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/codeventurer.jpg" style="width:340px" class="large-portrait"></a>
|
||||
|
||||
<h3>Following</h3>
|
||||
<div class="following">
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/dragonquest.jpg" class="avatar"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/dragonquest.jpg" class="avatar"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/dragonquest.jpg" class="avatar"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/dragonquest.jpg" class="avatar"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/dragonquest.jpg" class="avatar"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/dragonquest.jpg" class="avatar"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/dragonquest.jpg" class="avatar"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/dragonquest.jpg" class="avatar"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/dragonquest.jpg" class="avatar"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/dragonquest.jpg" class="avatar"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/dragonquest.jpg" class="avatar"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/dragonquest.jpg" class="avatar"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/dragonquest.jpg" class="avatar"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/dragonquest.jpg" class="avatar"></a>
|
||||
</div>
|
||||
|
||||
<h3>Tags</h3>
|
||||
<a class="tag" href="http://neocities.org">Games</a>
|
||||
<a class="tag" href="http://neocities.org">Anime</a>
|
||||
<a class="tag" href="http://neocities.org">Art</a>
|
||||
<a class="tag" href="http://neocities.org">Cooking</a>
|
||||
<a class="tag" href="http://neocities.org">Games</a>
|
||||
<a class="tag" href="http://neocities.org">Anime</a>
|
||||
<a class="tag" href="http://neocities.org">Art</a>
|
||||
<a class="tag" href="http://neocities.org">Cooking</a>
|
||||
</div>
|
||||
</div></div>
|
||||
</div>
|
|
@ -228,21 +228,21 @@
|
|||
<i class="fa fa-eye-slash"></i>Zero advertising
|
||||
</h3>
|
||||
<p>
|
||||
Neocities will never sell your personal data or embed advertising on your site. Instead, we are funded directly by our community through <a href="/plan">supporter plans</a> and <a href="/donate">donations</a>. This allows us to base all our decisions on making the best possible web building experience for you, rather than on appeasing ad companies.
|
||||
Neocities will never sell your personal data or embed advertising on your site. Instead, we are funded directly by our community through <a href="/supporter">supporters</a> and <a href="/donate">donations</a>. This allows us to base all our decisions on making the best possible web building experience for you, rather than on appeasing ad companies.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col col-50">
|
||||
<h3><i class="fa fa-tachometer"></i>More space, speed, and security</h3>
|
||||
<p>Neocities now uses distributed, globally-cached web servers in datacenters all over the world to serve your site. Whether it’s your personal home page or a busy professional site, your site loads fast. And if you need more space, <a href="/plan">we've got you covered</a>. We also provide Snowden-grade SSL cryptography on all sites, preventing snoops from seeing what you browse.</p>
|
||||
<p>Neocities now uses distributed, globally-cached web servers in datacenters all over the world to serve your site. Whether it’s your personal home page or a busy professional site, your site loads fast. And if you need more space, <a href="/supporter">we've got you covered</a>. We also provide Snowden-grade SSL cryptography on all sites, preventing snoops from seeing what you browse.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col col-50">
|
||||
<h3><i class="fa fa-wrench"></i>Developer tools</h3>
|
||||
<p>Our fast static hosting comes with a great in-browser HTML editor, easy file uploading, RSS feeds for every site, <a href="/api">powerful APIs</a> for building developer applications, and much more! Upgrade to a <a href="/plan">supporter plan</a> to get support for custom domains and WebDAV publishing.</p>
|
||||
<p>Our fast static hosting comes with a great in-browser HTML editor, easy file uploading, RSS feeds for every site, <a href="/api">powerful APIs</a> for building developer applications, and much more! Upgrade to a <a href="/supporter">supporter plan</a> to get support for custom domains and WebDAV publishing.</p>
|
||||
</div>
|
||||
|
||||
<div class="col col-50">
|
||||
|
@ -296,7 +296,7 @@
|
|||
<span class="footer-icon"></span>
|
||||
<h2 class="delta">Support Us</h2>
|
||||
<p class="tiny">
|
||||
Neocities is funded by <a href="/plan">supporters</a> and <a href="/donate">donations</a>. If you’d like to contribute, you can help us pay our server costs using credit card, Bitcoin, or PayPal.
|
||||
Neocities is funded by <a href="/supporter">supporters</a> and <a href="/donate">donations</a>. If you’d like to contribute, you can help us pay our server costs using credit card, Bitcoin, or PayPal.
|
||||
</p>
|
||||
<a href="/donate" title="Donate to Neocities" class="action-Link">Donate Today</a>
|
||||
</div>
|
||||
|
|
|
@ -1,230 +0,0 @@
|
|||
<section class="section plans">
|
||||
<% if request.path.match /\/welcome/ %>
|
||||
<div class="txt-Center"><img src="/img/heartcat.png"></div>
|
||||
<% end %>
|
||||
<h2>
|
||||
<% if request.path == '/' %>
|
||||
Need more space? We’ve got you covered.
|
||||
<br>
|
||||
Upgrading gives you more space, bandwidth, features, <strong>and helps us stay independent and keep the free sites free.</strong>
|
||||
<% elsif request.path.match /\/welcome/ %>
|
||||
Welcome to Neocities!
|
||||
<% else %>
|
||||
Support Us
|
||||
<% end %>
|
||||
</h2>
|
||||
|
||||
<% if request.path.match /\/plan/ %>
|
||||
<div class="row" style="margin-top: 0px">
|
||||
<div class="col-75" style="margin-left: auto; margin-right: auto;">
|
||||
<h3 class="subtitle">
|
||||
The Neocities Supporter Plan is a way to help sustain the site. When you become a supporter, you are directly helping our quest to bring back the creative, independent web, and to continue to improve Neocities for everyone.
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<% elsif request.path.match /\/welcome/ %>
|
||||
<div class="row" style="margin-top: 0px">
|
||||
<div class="col-75" style="margin-left: auto; margin-right: auto;">
|
||||
<h3 class="subtitle">
|
||||
Welcome, and thanks for signing up! We can't wait to see your web site!
|
||||
<br>
|
||||
Neocities does not put advertising on your site, <strong>and we never will</strong>.
|
||||
<br>
|
||||
Instead, Neocities is powered by supporters like you. If you'd like to help us out, we'd love your support. Thank you!
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="plan-overview">
|
||||
<div class="header">
|
||||
<div class="col col-50 personal">
|
||||
Free
|
||||
</div>
|
||||
<div class="col col-50 professional">
|
||||
Supporter
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="body">
|
||||
<div class="col col-25 free">
|
||||
<div class="plan-image free">
|
||||
</div>
|
||||
<h3>Free</h3>
|
||||
<div class="price">$<%= Site::PLAN_FEATURES[:free][:price] %></div>
|
||||
<div class="interval">per month</div>
|
||||
<%== plan_pricing_button :free %>
|
||||
<ul>
|
||||
<li><strong><%= Site::PLAN_FEATURES[:free][:space].to_space_pretty %></strong> storage</li>
|
||||
<li><strong><%= Site::PLAN_FEATURES[:free][:bandwidth].to_space_pretty %></strong> bandwidth</li>
|
||||
</ul>
|
||||
<ul>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col col-25 supporter">
|
||||
<div class="plan-image" data-original-title="Meow!"></div>
|
||||
<h3>Supporter</h3>
|
||||
<% if parent_site && parent_site.legacy_supporter? %>
|
||||
<div class="price">$<%= Site::LEGACY_SUPPORTER_PRICES[parent_site[:plan_type].to_sym] %></div>
|
||||
<div class="interval">per month, billed annually</div>
|
||||
<% else %>
|
||||
<div class="price">$<%= Site::PLAN_FEATURES[:supporter][:price] %></div>
|
||||
<div class="interval">per month</div>
|
||||
<% end %>
|
||||
|
||||
<% if parent_site && parent_site.legacy_supporter? %>
|
||||
<div class="current-plan">Current Plan</div>
|
||||
<% else %>
|
||||
<%== plan_pricing_button :supporter %>
|
||||
<% end %>
|
||||
<ul>
|
||||
<li><strong><%= Site::PLAN_FEATURES[:supporter][:space].to_space_pretty %></strong> storage</li>
|
||||
<li><strong><%= Site::PLAN_FEATURES[:supporter][:bandwidth].to_space_pretty %></strong> bandwidth</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>Lots of Web Space</li>
|
||||
<li>No File Upload Type Restrictions</li>
|
||||
<li>Multiple Site Creation</li>
|
||||
<li>Custom Domains (yoursite.com)</li>
|
||||
<li>SSL Certs Included</li>
|
||||
<li>Remote Filesystem Support</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%== erb :'plan/_compare', layout: false %>
|
||||
|
||||
<% if request.path.match /\/plan/ %>
|
||||
<div class="row" style="margin-top: 50px; margin-bottom: 0px;">
|
||||
<div class="col-50" style="margin-left: auto; margin-right: auto">
|
||||
<h2>Why become a Supporter?</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-60" style="margin-left: auto; margin-right: auto">
|
||||
<ul>
|
||||
<li>
|
||||
<strong>You get more space!</strong> Right now supporter plans get up to <strong><%= Site::PLAN_FEATURES[:supporter][:space].to_space_pretty %></strong>.
|
||||
</li>
|
||||
<li>
|
||||
<strong>It helps your site.</strong> Funding helps us make your site faster globally, and provide more features.
|
||||
</li>
|
||||
<li>
|
||||
<strong>It helps us build.</strong> It supports our goal to work on improving Neocities full-time, without worrying about bills.
|
||||
</li>
|
||||
<li>
|
||||
<strong>It helps the web.</strong> The web needs more independent, creative web sites.
|
||||
</li>
|
||||
<li>
|
||||
<strong>It's Open Source.</strong> Neocities is an <a href="http://www.opencompany.org">Open Company</a>, our site is <a href="https://github.com/neocities">completely open source</a>, and we share code with the community.
|
||||
</li>
|
||||
<li>
|
||||
<strong>No lock-in.</strong> Redirecting your site is easy, free site downloads, and support for custom domains.
|
||||
</li>
|
||||
<li><strong>No ads, ever.</strong> We'll never put ads or watermarks on sites, and we don't sell user data.</li>
|
||||
<li>
|
||||
<strong>It's safe.</strong> We use <a href="https://stripe.com" target="_blank">Stripe</a> for payments, and never store your credit card information directly.
|
||||
</li>
|
||||
<li>
|
||||
<strong>It's affordable.</strong> Only $<%= Site::PLAN_FEATURES[:supporter][:price] %> per month.
|
||||
</li>
|
||||
<li>
|
||||
<strong>You can cancel or change plans anytime.</strong> If you do, we'll refund or credit the amount you didn't use.
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('.plan-image').tooltip({
|
||||
placement: 'top'
|
||||
})
|
||||
})
|
||||
|
||||
$(".planPricingButton").on('click', function(obj) {
|
||||
$('#upgradePlanType').val($(obj.target).attr('data-plan_type'))
|
||||
$('#upgradeFormPlanName').text($(obj.target).attr('data-plan_name'))
|
||||
$('#upgradeFormPlanPrice').text($(obj.target).attr('data-plan_price'))
|
||||
$('#planSignup').modal()
|
||||
})
|
||||
</script>
|
||||
|
||||
<div class="modal hide fade" id="planSignup" tabindex="-1" role="dialog" aria-labelledby="planSignupLabel" aria-hidden="true">
|
||||
<form id="upgradeForm" method="POST" action="/plan/update">
|
||||
<input type="hidden" value="<%= csrf_token %>" name="csrf_token">
|
||||
<input type="hidden" value="" name="plan_type" id="upgradePlanType">
|
||||
<div class="modal-header">
|
||||
<button class="close" type="button" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times"></i></button>
|
||||
<h3 id="planSignupLabel">
|
||||
<% if parent_site && parent_site.plan_type == 'free' %>
|
||||
Upgrade
|
||||
<% else %>
|
||||
Change
|
||||
<% end %>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div>
|
||||
You are <% if current_site && parent_site.plan_type == 'free' %>upgrading<%else%>changing<%end%> to the <strong><span id="upgradeFormPlanName"></span> Plan</strong>. You will be charged <span id="upgradeFormPlanPrice"></span>. <% if current_site && parent_site.plan_type != 'free' %>We'll credit or refund the remaining amount you didn't use on your previous plan.<% end %>
|
||||
<% unless current_site && parent_site.stripe_customer_id %>
|
||||
Please enter your Credit Card number:
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<input id="stripe_token" name="stripe_token" type="hidden" value="<%= params[:stripe_token] %>">
|
||||
|
||||
<div style="margin-top: 30px">
|
||||
<div id="plan_error" class="alert alert-block alert-error" style="display:none"></div>
|
||||
|
||||
<% unless params[:stripe_token] || (current_site && parent_site.stripe_customer_id) %>
|
||||
<div class="credit-card-input no-js" id="skeuocard" style="margin-left: auto; margin-right: auto; margin-bottom: 20px">
|
||||
<p class="no-support-warning"></p>
|
||||
<label for="cc_type">Card Type</label>
|
||||
<select name="cc_type">
|
||||
<option value="">...</option>
|
||||
<option value="visa">Visa</option>
|
||||
<option value="discover">Discover</option>
|
||||
<option value="mastercard">MasterCard</option>
|
||||
<option value="maestro">Maestro</option>
|
||||
<option value="jcb">JCB</option>
|
||||
<option value="unionpay">China UnionPay</option>
|
||||
<option value="amex">American Express</option>
|
||||
<option value="dinersclubintl">Diners Club</option>
|
||||
</select>
|
||||
<label for="cc_number">Card Number</label>
|
||||
<input type="text" name="cc_number" id="cc_number" placeholder="XXXX XXXX XXXX XXXX" maxlength="19" size="19">
|
||||
<label for="cc_exp_month">Expiration Month</label>
|
||||
<input type="text" name="cc_exp_month" id="cc_exp_month" placeholder="00">
|
||||
<label for="cc_exp_year">Expiration Year</label>
|
||||
<input type="text" name="cc_exp_year" id="cc_exp_year" placeholder="00">
|
||||
<label for="cc_name">Cardholder's Name</label>
|
||||
<input type="text" name="cc_name" id="cc_name" placeholder="John Doe">
|
||||
<label for="cc_cvc">Card Validation Code</label>
|
||||
<input type="text" name="cc_cvc" id="cc_cvc" placeholder="123" maxlength="3" size="3">
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% unless params[:stripe_token] || (current_site && parent_site.stripe_customer_id) %>
|
||||
<p>
|
||||
<strong>Don't have a Credit/Debit Card?</strong> We also support <a href="/plan/paypal">Paypal</a> and <a href="/plan/bitcoin">Bitcoin</a>.
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn cancel" data-dismiss="modal" aria-hidden="true">Cancel</button>
|
||||
<button type="submit" class="btn-Action">Upgrade</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<% if current_site %>
|
||||
<%== erb :'plan/_signupcode', layout: false %>
|
||||
<% end %>
|
|
@ -1,31 +0,0 @@
|
|||
<div class="header-Outro">
|
||||
<div class="row content single-Col">
|
||||
<h1>Thank You!</h1>
|
||||
<h3 class="subtitle">Your support means a lot to us.</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content single-Col misc-page">
|
||||
<article>
|
||||
<div class="txt-Center"><img src="/img/heartcat.png"></div>
|
||||
|
||||
<h1 class="txt-Center">You signed up for the Supporter Plan.<br>Thank you for your support!</h1>
|
||||
|
||||
<p>
|
||||
Your support allows Neocities to continue our project to bring back the creative web. We will do our best to ensure that the site remains a great place for people to express themselves - one web page at a time.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you need anything, please don't hesitate to <a href="/contact">contact us</a>!
|
||||
</p>
|
||||
|
||||
<p>
|
||||
On behalf of Penelope (the Neocities' cat) and everyone else at Neocities, thank you.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/">Get Started</a>
|
||||
</p>
|
||||
</article>
|
||||
<%== erb :'_team', layout: false %>
|
||||
</div>
|
|
@ -1,192 +0,0 @@
|
|||
<div class="header-Outro with-site-image">
|
||||
<div class="row content">
|
||||
<div class="col col-50 signup-Area large">
|
||||
<div class="signup-Form">
|
||||
<fieldset class="content">
|
||||
<img class="screenshot" src="http://neocities.org/site_screenshots/codeventurer.jpg" style="width: 358px;height: 215px;">
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col col-50">
|
||||
<h2 class="eps title-with-badge"><span>Derp's Website</span><a href="/plan" class="supporter-badge" title="Neocities Supporter"></a></h2>
|
||||
<p class="site-url" style="margin-top: -9px;"><a href="http://<%= site.username %>.neocities.org" target="_blank">http://<%= site.username %>.neocities.org</a></p>
|
||||
<div class="stats">
|
||||
<div class="stat"><strong>23.5K</strong> <span>visitors</span></div>
|
||||
<div class="stat"><strong>342</strong> <span>followers</span></div>
|
||||
<div class="stat tips"><strong>7</strong> <span>tips</span></div>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<a href="" class="btn-Action follow"><span>Follow</span></a>
|
||||
<a href="" class="btn-Action tip"><span>Tip</span></a>
|
||||
<a href="" class="btn-Action share"><span>Share</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="content misc-page columns right-col"><div class="col-left">
|
||||
<div class="col col-66">
|
||||
|
||||
<div class="post-comment">
|
||||
<input class="" type="text" placeholder="Post on Derp's profile...">
|
||||
<a href="" class="btn-Action">Post</a>
|
||||
</div>
|
||||
|
||||
<div class="news-item follow">
|
||||
<div class="title">
|
||||
<div class="icon"></div>
|
||||
<a href="" class="user">Derp</a> followed <a href="" class="user">Foo's</a> website<span class="date">7h</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="news-item tip">
|
||||
<div class="title">
|
||||
<div class="icon"></div>
|
||||
<a href="" class="user">Derp</a> tipped <a href="" class="user">Foo's</a> website: <a href="" class="comment">Wow, great work here! Please keep updating :)</a><span class="date">Apr 23</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="news-item comment">
|
||||
<div class="title">
|
||||
<div class="icon"></div>
|
||||
<a href="" class="user">Derp</a> commented on <a href="" class="user">victoria's</a> website: <a href="" class="comment">I had a question - how did you make it so that the...</a>
|
||||
<span class="date">Apr 20</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="news-item follow">
|
||||
<div class="title">
|
||||
<div class="icon"></div>
|
||||
<a href="" class="user">Derp</a> followed <a href="" class="user">victoria's</a> website<span class="date">Apr 7</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="news-item update">
|
||||
<div class="title">
|
||||
<div class="icon"></div>
|
||||
<a href="" class="user">Derp</a> made an update <span class="date">Apr 7</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="files">
|
||||
<div class="file">
|
||||
<div class="html-thumbnail misc"><a href=""><span class="misc-icon">css</span><span class="title">styles.css</span></a></div>
|
||||
</div>
|
||||
<div class="file">
|
||||
<div class="html-thumbnail html"><a href=""><img src="http://neocities.org/site_screenshots/codeventurer.jpg"><span class="title">styles.css</span></a></div>
|
||||
</div>
|
||||
<div class="file">
|
||||
<div class="html-thumbnail misc"><a href=""><span class="misc-icon">js</span><span class="title">styles.css</span></a></div>
|
||||
</div>
|
||||
<div class="file">
|
||||
<div class="html-thumbnail image"><a href=""><img src="/site_thumbnails/victoria/constructioncat2.png.105x63.png"><span class="title">cat.jpg</span></a></div>
|
||||
</div>
|
||||
<div class="file">
|
||||
<div class="html-thumbnail misc"><a href=""><span class="misc-icon">js</span><span class="title">styles.css</span></a></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="actions"><a href="">Like (1)</a> <a href="">Reply</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="news-item comment for-me">
|
||||
<div class="title">
|
||||
<div class="icon" style="background-image:url(https://neocities.org/site_screenshots/codeventurer.jpg);"></div>
|
||||
<a href="" class="user">Foo</a>
|
||||
<span class="date">Apr 7</span>
|
||||
<div class="comment">Your site is amazing. Very helpful information. Would love to see more updates if you have time. Your site is amazing. Very helpful information. Would love to see more updates if you have time. </div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="actions"><a href="">Like (1)</a> <a href="">Reply</a></div>
|
||||
<div class="comments">
|
||||
<div class="comment">
|
||||
<img class="avatar" src="https://neocities.org/site_screenshots/victoria.jpg">
|
||||
<a href="" class="user">victoria</a> Indeed, it's great!<span class="date">Apr 7</span>
|
||||
<div class="actions"><a href="">Like (1)</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="news-item comment">
|
||||
<div class="title">
|
||||
<div class="icon"></div>
|
||||
<a href="" class="user">Derp</a> commented on <a href="" class="user">Foo's</a> website: <a href="" class="comment">I had a question - how did you make it so that the...</a>
|
||||
<span class="date">Apr 7</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="news-item tip for-me">
|
||||
<div class="title">
|
||||
<div class="icon" style="background-image:url(https://neocities.org/site_screenshots/victoria.jpg);"></div>
|
||||
<a href="" class="user">victoria</a> tipped .01 BTC
|
||||
<span class="date">Apr 7</span>
|
||||
<div class="comment">Hey, this looks great!</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="actions"><a href="">Like (1)</a> <a href="">Reply</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col col-33">
|
||||
<h3>Website Stats</h3>
|
||||
<div class="stats">
|
||||
<div class="stat">
|
||||
<span>Last updated</span>
|
||||
<strong>
|
||||
<% if site.updated_at.nil? %>
|
||||
Just Created
|
||||
<% else %>
|
||||
<%= site.updated_at.ago.downcase %>
|
||||
<% end %>
|
||||
</strong>
|
||||
</div>
|
||||
<div class="stat"><span>Total updates</span><strong><%= site.changed_count %></strong></div>
|
||||
<div class="stat"><span>Created</span><strong><%= site.created_at.strftime('%B %-d, %Y') %></strong></div>
|
||||
</div>
|
||||
|
||||
<h3>Archives</h3>
|
||||
<div class="archives">
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/codeventurer.jpg"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/codeventurer.jpg"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/codeventurer.jpg"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/codeventurer.jpg"></a>
|
||||
<a href="" class="more">See all versions</a>
|
||||
</div>
|
||||
|
||||
<h3>Following</h3>
|
||||
<div class="following">
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/dragonquest.jpg" class="avatar"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/dragonquest.jpg" class="avatar"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/dragonquest.jpg" class="avatar"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/dragonquest.jpg" class="avatar"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/dragonquest.jpg" class="avatar"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/dragonquest.jpg" class="avatar"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/dragonquest.jpg" class="avatar"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/dragonquest.jpg" class="avatar"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/dragonquest.jpg" class="avatar"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/dragonquest.jpg" class="avatar"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/dragonquest.jpg" class="avatar"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/dragonquest.jpg" class="avatar"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/dragonquest.jpg" class="avatar"></a>
|
||||
<a href=""><img src="http://neocities.org/site_screenshots/dragonquest.jpg" class="avatar"></a>
|
||||
</div>
|
||||
|
||||
<h3>Tags</h3>
|
||||
<a class="tag" href="http://neocities.org">Games</a>
|
||||
<a class="tag" href="http://neocities.org">Anime</a>
|
||||
<a class="tag" href="http://neocities.org">Art</a>
|
||||
<a class="tag" href="http://neocities.org">Cooking</a>
|
||||
<a class="tag" href="http://neocities.org">Games</a>
|
||||
<a class="tag" href="http://neocities.org">Anime</a>
|
||||
<a class="tag" href="http://neocities.org">Art</a>
|
||||
<a class="tag" href="http://neocities.org">Cooking</a>
|
||||
|
||||
<div class="report">
|
||||
<a href="">Report</a> | <a href="">Block</a>
|
||||
</div>
|
||||
</div>
|
||||
</div></div>
|
||||
</div>
|
|
@ -23,21 +23,22 @@
|
|||
</div>
|
||||
<div class="tabbable" style="margin-top: 20px"> <!-- Only required for left/right tabs -->
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#plan" data-toggle="tab">Plan</a></li>
|
||||
<li><a href="#sites" data-toggle="tab">Sites</a></li>
|
||||
<li><a href="#password" data-toggle="tab">Password</a></li>
|
||||
<li><a href="#email" data-toggle="tab">Email</a></li>
|
||||
|
||||
<li class="active"><a href="#sites" data-toggle="tab">Manage Sites</a></li>
|
||||
<li><a href="#supporter" data-toggle="tab">Supporter Info</a></li>
|
||||
<li><a href="#password" data-toggle="tab">Change Password</a></li>
|
||||
<li><a href="#email" data-toggle="tab">Change Email</a></li>
|
||||
<% if current_site.stripe_paying_supporter? %>
|
||||
<li><a href="#billing" data-toggle="tab">Billing</a></li>
|
||||
<li><a href="#billing" data-toggle="tab">Change Card</a></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="plan">
|
||||
<%== erb :'settings/account/plan' %>
|
||||
</div>
|
||||
<div class="tab-pane" id="sites">
|
||||
<div class="tab-pane active" id="sites">
|
||||
<%== erb :'settings/account/sites' %>
|
||||
</div>
|
||||
<div class="tab-pane" id="supporter">
|
||||
<%== erb :'settings/account/supporter' %>
|
||||
</div>
|
||||
<div class="tab-pane" id="password">
|
||||
<%== erb :'settings/account/password' %>
|
||||
</div>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<a href="/" class="btn-Action" onclick="$('#upgradeForm').submit(); return false">Update Card</a>
|
||||
</div>
|
||||
|
||||
<%== erb :'plan/_signupcode', layout: false %>
|
||||
<%== erb :'supporter/_signupcode', layout: false %>
|
||||
|
||||
<script>
|
||||
card = new Skeuocard($('#skeuocard'))
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
<h2>Neocities Plan</h2>
|
||||
<% if current_site.supporter? && !current_site.plan_ended %>
|
||||
<p class="tiny">You currently have the <strong>Supporter Plan (<%= current_site.maximum_space.to_space_pretty %>)</strong>. Thank you! We love you.
|
||||
</p>
|
||||
<a class="btn-Action" href="/plan">Manage Plan</a>
|
||||
<% else %>
|
||||
<p class="tiny">
|
||||
You currently have the <strong>Free Plan (<%= current_site.maximum_space.to_space_pretty %>)</strong>.<br>Want to get more space and help Neocities? Become a supporter!
|
||||
</p>
|
||||
<a class="btn-Action" href="/plan">Supporter Info</a>
|
||||
<% end %>
|
|
@ -1,15 +1,15 @@
|
|||
<h2>Your Sites</h2>
|
||||
|
||||
<table class="table">
|
||||
<% current_site.account_sites_dataset.each do |site| %>
|
||||
<% current_site.account_sites_dataset.each_with_index do |site,i| %>
|
||||
<tr>
|
||||
<td>
|
||||
<td <% if i == 0 %>style="border-top: 0px"<% end %>>
|
||||
<a href="//<%= site.host %>" target="_blank"><%= site.username %></a>
|
||||
<% if site.parent? %>
|
||||
<strong>(parent account)</strong>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<td <% if i == 0 %>style="border-top: 0px"<% end %>>
|
||||
<a href="/settings/<%= site.username %>">Settings</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -32,5 +32,5 @@
|
|||
</div>
|
||||
</form>
|
||||
<% else %>
|
||||
<p>Multiple site creation is only available for supporter accounts. <a href="/plan">Upgrade now</a>!</p>
|
||||
<p>Multiple site creation is only available for supporter accounts. <a href="/supporter">Upgrade now</a>!</p>
|
||||
<% end %>
|
34
views/settings/account/supporter.erb
Normal file
34
views/settings/account/supporter.erb
Normal file
|
@ -0,0 +1,34 @@
|
|||
<h2>Neocities Supporter</h2>
|
||||
<% if current_site.supporter? && !current_site.plan_ended %>
|
||||
<p class="tiny">You currently have the <strong>Supporter Plan (<%= current_site.maximum_space.to_space_pretty %>)</strong>. Thank you! We love you.
|
||||
</p>
|
||||
|
||||
<% if parent_site.paying_supporter? %>
|
||||
<a class="btn-Action" href="/supporter" style="margin-bottom: 20px">Supporter Info</a>
|
||||
<small><a href="#" onclick="$('#endSupporterConfirm').modal()" style="font-size: 8pt">End Supporter Membership</a></small>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<p class="tiny">
|
||||
You currently have the <strong>Free Plan (<%= current_site.maximum_space.to_space_pretty %>)</strong>.<br>Want to get more space and help Neocities? Become a supporter!
|
||||
</p>
|
||||
<a class="btn-Action" href="/supporter">Supporter Info</a>
|
||||
<% end %>
|
||||
|
||||
<div class="modal hide fade" id="endSupporterConfirm" tabindex="-1" role="dialog" aria-labelledby="endSupporterConfirmLabel" aria-hidden="true">
|
||||
<form method="POST" action="/supporter/end">
|
||||
<%== csrf_token_input_html %>
|
||||
<input type="hidden" value="<%= csrf_token %>" name="csrf_token">
|
||||
<input type="hidden" value=" free" name="plan_type">
|
||||
<div class="modal-header">
|
||||
<h3 id="endSupporterConfirmLabel">End Supporter Membership</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<font style="color: red; font-weight: bold">Warning:</font><br>If you do this, it will end your supporter membership. You will no longer be billed. Your account will revert to a "free" account, and supporter features will no longer be available. Are you sure you want to do this?<br><br>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn cancel" data-dismiss="modal" aria-hidden="true">No, cancel</button>
|
||||
|
||||
<button type="submit" class="btn-Action">Yes, end supporter membership</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
|
@ -20,18 +20,20 @@
|
|||
First, you need to add an "A record" to point your root domain (sometimes shown with an @ symbol) (catsknitting.com) to the following IP address:
|
||||
</p>
|
||||
|
||||
<p><code>54.68.34.66</code></p>
|
||||
<p><code>198.51.233.1</code></p>
|
||||
|
||||
<h3>Step 2</h3>
|
||||
<h3>Step 2 (optional)</h3>
|
||||
|
||||
<p>
|
||||
Next, you need to add a CNAME record which points <strong>www.catsknitting.com</strong> to <strong>proxy.neocitiesops.net</strong>.
|
||||
Now you need to add an "AAAA record" that also points to your root domain. This is for IPv6 support. Use this address for the AAAA record:
|
||||
</p>
|
||||
|
||||
<p><code>2620:2:6000::bad:dab:cafe</code></p>
|
||||
|
||||
<h3>Step 3</h3>
|
||||
|
||||
<p>
|
||||
Add the domain name to the box below (just the <strong>catsknitting.com</strong>, don't add any subdomains), and your domain should come online within 5 minutes:
|
||||
Add the domain name to the box below (just the <strong>catsknitting.com</strong>, don't add any subdomains), and your domain should come online within 5 minutes!
|
||||
</p>
|
||||
|
||||
<form method="POST" action="/settings/<%= @site.username %>/custom_domain">
|
||||
|
@ -41,44 +43,5 @@
|
|||
<input class="btn-Action" type="submit" value="Update Domain">
|
||||
</form>
|
||||
<% else %>
|
||||
<strong>Custom domains require a Supporter account. <a href="/plan">Upgrade now</a>.</strong>
|
||||
<strong>Custom domains require a Supporter account. <a href="/supporter">Upgrade now</a>.</strong>
|
||||
<% end %>
|
||||
|
||||
<h2>Add SSL Certificate</h2>
|
||||
<p>
|
||||
This allows you to add an SSL key and certificate for your domain, enabling encryption for your site (https). It can take up to 5-30 minutes for the changes to go live, so please be patient. All files must be in PEM format. If your certificate is not bundled with the root and intermediate certificates, ask your certificate provider for help on how to do that.
|
||||
</p>
|
||||
|
||||
<p><strong>We're wrapping up the finishing touches on SSL certs, it's not quite ready yet. Check back shortly!</strong></p>
|
||||
|
||||
<!--
|
||||
|
||||
<% if @site.domain.nil? || @site.domain.empty? %>
|
||||
<p><strong>Cannot upload SSL certificate until domain is added.</strong></p>
|
||||
<% else %>
|
||||
|
||||
<form method="POST" action="/settings/<%= @site.username %>/ssl" enctype="multipart/form-data">
|
||||
<%== csrf_token_input_html %>
|
||||
|
||||
<p>
|
||||
<strong>
|
||||
Status: <%= @site.ssl_installed? ? 'Installed' : 'Inactive' %>
|
||||
</strong>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
SSL Key (yourdomain.com.key):
|
||||
<input name="key" type="file">
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Bundled Certificates (yourdomain.com-bundle.crt):
|
||||
<input name="cert" type="file">
|
||||
</p>
|
||||
|
||||
<input class="btn-Action" type="submit" value="Upload SSL Key and Certificate">
|
||||
|
||||
</form>
|
||||
<% end %>
|
||||
|
||||
-->
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
<% if parent_site.supporter? %>
|
||||
<a href="/domain/new">Register your domain name now</a>
|
||||
<% else %>
|
||||
<strong>Getting a domain name requires a Supporter account. <a href="/plan">Upgrade now</a>.</strong>
|
||||
<strong>Getting a domain name requires a Supporter account. <a href="/supporter">Upgrade now</a>.</strong>
|
||||
<% end %>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="col col-50 profile-info">
|
||||
<h2 class="eps title-with-badge"><span><%= site.title %></span> <% if site.supporter? %><a href="/plan" class="supporter-badge" title="Neocities Supporter"></a> <% end %></h2>
|
||||
<h2 class="eps title-with-badge"><span><%= site.title %></span> <% if site.supporter? %><a href="/supporter" class="supporter-badge" title="Neocities Supporter"></a> <% end %></h2>
|
||||
<p class="site-url"><a href="<%= site.uri %>"><%= site.host %></a></p>
|
||||
<!--
|
||||
<% if site.latest_archive %>
|
||||
|
|
|
@ -148,7 +148,7 @@
|
|||
<li><a href="?days=sincethebigbang">All time</a></li>
|
||||
</ul>
|
||||
<% else %>
|
||||
<p>(<a href="/plan">Upgrade</a> to see up to see stats for all time)</p>
|
||||
<p>(<a href="/supporter">Upgrade</a> to see up to see stats for all time)</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
|
||||
<h2>Is there a way to remove the whitelist?</h2>
|
||||
<p>
|
||||
<strong>Yes!</strong> If you <a href="/plan">become a supporter</a>, we will remove the whitelist for your file uploads, and you can upload anything you want (except illegal/copyrighted content, of course)! Becoming a supporter reduces the "file dump" risk, which makes it a lot safer for us to allow file uploads of any kind.
|
||||
<strong>Yes!</strong> If you <a href="/supporter">become a supporter</a>, we will remove the whitelist for your file uploads, and you can upload anything you want (except illegal/copyrighted content, of course)! Becoming a supporter reduces the "file dump" risk, which makes it a lot safer for us to allow file uploads of any kind.
|
||||
</p>
|
||||
<p>
|
||||
Keep in mind that it's still better to host things like videos on Youtube. They've spent a lot of time and invested a lot of money into building a platform for sharing high-bandwidth video very efficiently all over the world. And they don't charge you for bandwith, even if your video becomes very popular (infact, you can make money by sharing their advertising revenue with them).
|
||||
|
|
|
@ -30,6 +30,6 @@
|
|||
|
||||
<h2>Is there a way to remove the hotlinking restriction?</h2>
|
||||
<p>
|
||||
The hotlinking policy currently applies to all sites. You can remove the hotlinking policy by upgrading to the <a href="https://neocities.org/plan">Neocities Supporter Plan</a>.
|
||||
The hotlinking policy currently applies to all sites. You can remove the hotlinking policy by upgrading to the <a href="/supporter">Neocities Supporter Plan</a>.
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</p>
|
||||
<% elsif !current_site.supporter? %>
|
||||
<p>
|
||||
This feature requires a supporter account. <a href="/plan">Click here</a> to become a supporter.
|
||||
This feature requires a supporter account. <a href="/supporter">Click here</a> to become a supporter.
|
||||
</p>
|
||||
<% else %>
|
||||
<h2>Instructions for Windows 7</h2>
|
||||
|
|
|
@ -1,342 +0,0 @@
|
|||
|
||||
|
||||
<div class="header-Outro with-columns">
|
||||
<div class="row content">
|
||||
<div class="col col-66">
|
||||
<h3>Your Stats</h3>
|
||||
<div class="feed-filter">
|
||||
<% if !@events.empty? && (site.followings_dataset.count > 0) %>
|
||||
<a href="/" <% if params[:activity].nil? %>class="selected"<% end %>>All</a>
|
||||
<a href="/?activity=mine" <% if params[:activity] == 'mine' %>class="selected"<% end %>>Profile Activity</a>
|
||||
<% end %>
|
||||
<a href="/activity">Global Activity</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col col-32">
|
||||
<h3>Your Site</h3>
|
||||
<a href="/dashboard" class="btn-Action edit"><i class="fa fa-edit" title="Edit"></i>Edit Site</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container news-feed">
|
||||
<div class="content misc-page columns right-col">
|
||||
<div class="col-left">
|
||||
<div class="col col-66">
|
||||
<div class="row">
|
||||
|
||||
<div class="col col-50 globe">
|
||||
<h2>Latest Visitors</h2>
|
||||
<div id="earth_div"></div>
|
||||
</div>
|
||||
<div class="col col-50" style="padding-right: 0;">
|
||||
<table class="table table-striped" id="latest-visitors">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="location">San Francisco, CA</span>
|
||||
<a class="referrer" href=""><i class="fa fa-link"></i> neocities.org</a>
|
||||
</td>
|
||||
<td>
|
||||
<span class="time">7:11PM</span>
|
||||
<span class="paths"><a href="">/index</a>, <a href="">/links</a>, <a href="">/art</a></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="location">Portland, OR</span>
|
||||
<a class="referrer" href=""><i class="fa fa-search"></i> Google search</a>
|
||||
</td>
|
||||
<td>
|
||||
<span class="time">7:11PM</span>
|
||||
<span class="paths"><a href="">/index</a></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="location">London, UK</span>
|
||||
<a class="referrer" href=""><i class="fa fa-link"></i> Twitter URL</a>
|
||||
</td>
|
||||
<td>
|
||||
<span class="time">7:11PM</span>
|
||||
<span class="paths"><a href="">/index</a>, <a href="">/about</a></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="location">Hong Kong, China</span>
|
||||
<a class="referrer" href=""><i class="fa fa-search"></i> Google search</a>
|
||||
</td>
|
||||
<td>
|
||||
<span class="time">7:11PM</span>
|
||||
<span class="paths"><a href="">/index</a>, <a href="">/links</a>, <a href="">/art</a>, <a href="">/music</a></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="location">San Francisco, CA</span>
|
||||
<a class="referrer" href=""><i class="fa fa-link"></i> Facebook URL</a>
|
||||
</td>
|
||||
<td>
|
||||
<span class="time">7:11PM - 4/27/15</span>
|
||||
<span class="paths"><a href="">/index</a></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="location">San Francisco, CA</span>
|
||||
<a class="referrer" href=""><i class="fa fa-link"></i> neocities.org</a>
|
||||
</td>
|
||||
<td>
|
||||
<span class="time">7:11PM - 4/27/15</span>
|
||||
<span class="paths"><a href="">/index</a>, <a href="">/links</a>, <a href="">/art</a>, <a href="">/music</a>, <a href="">/about</a></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="location">Portland, OR</span>
|
||||
<a class="referrer" href=""><i class="fa fa-search"></i> Google search</a>
|
||||
</td>
|
||||
<td>
|
||||
<span class="time">7:11PM - 4/27/15</span>
|
||||
<span class="paths"><a href="">/index</a></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="location">London, UK</span>
|
||||
<a class="referrer" href=""><i class="fa fa-link"></i> Twitter URL</a>
|
||||
</td>
|
||||
<td>
|
||||
<span class="time">7:11PM - 4/27/15</span>
|
||||
<span class="paths"><a href="">/index</a>, <a href="">/about</a></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="location">Hong Kong, China</span>
|
||||
<a class="referrer" href=""><i class="fa fa-search"></i> Google search</a>
|
||||
</td>
|
||||
<td>
|
||||
<span class="time">7:11PM - 4/27/15</span>
|
||||
<span class="paths"><a href="">/index</a>, <a href="">/links</a>, <a href="">/art</a>, <a href="">/music</a>, <a href="">/tech</a>, <a href="">/about</a></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="location">Hong Kong, China</span>
|
||||
<a class="referrer" href=""><i class="fa fa-search"></i> Google search</a>
|
||||
</td>
|
||||
<td>
|
||||
<span class="time">7:11PM - 4/27/15</span>
|
||||
<span class="paths"><a href="">/index</a>, <a href="">/links</a>, <a href="">/art</a>, <a href="">/music</a></span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Last 7 Days</h2>
|
||||
<p>(<a href="/plan">Upgrade</a> to see up to see stats for all time)</p>
|
||||
<ul class="nav h-Nav">
|
||||
<li><a href="">Month</a></li>
|
||||
<li><a href="">3 months</a></li>
|
||||
<li><a href="">1 Year</a></li>
|
||||
<li><a href="">All time</a></li>
|
||||
</ul>
|
||||
|
||||
<canvas id="myChart" style="width:100%;height:300px;display:block"></canvas>
|
||||
|
||||
<div class="row">
|
||||
<div class="col col-50">
|
||||
<h2>Top Paths</h2>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Path</th>
|
||||
<th>Visits</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>/</td>
|
||||
<td>130</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>/contact</td>
|
||||
<td>110</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>/art</td>
|
||||
<td>101</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>/about</td>
|
||||
<td>99</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>/links</td>
|
||||
<td>33</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h2>Top Locations</h2>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>City</th>
|
||||
<th>Visits</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Portland, OR, USA</td>
|
||||
<td>22</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Portland, OR, USA</td>
|
||||
<td>22</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Portland, OR, USA</td>
|
||||
<td>22</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Portland, OR, USA</td>
|
||||
<td>22</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Portland, OR, USA</td>
|
||||
<td>22</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col col-50">
|
||||
|
||||
<h2>Top Referrers</h2>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Referrer</th>
|
||||
<th>Visits</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Google search</td>
|
||||
<td>22</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Google search</td>
|
||||
<td>22</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Google search</td>
|
||||
<td>22</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Google search</td>
|
||||
<td>22</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Google search</td>
|
||||
<td>22</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col col-33">
|
||||
<div class="news-site-info">
|
||||
<p class="site-url"><a href="<%= current_site.uri %>" target="_blank"><%= site.title %></a></p>
|
||||
<div class="stats">
|
||||
<div class="col col-50">
|
||||
<% if site.updated_at %>
|
||||
Last updated<br><strong><%= site.updated_at.ago %></strong>
|
||||
<% else %>
|
||||
Your new website!<br><strong><a href="/dashboard"><i class="fa fa-edit" title="Edit"></i> Start Building</a></strong>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="col col-50">
|
||||
<div><strong><%= site.views.format_large_number %></strong> views</div>
|
||||
<% follows_count = site.follows_dataset.count %>
|
||||
<div><strong><%= follows_count.format_large_number %></strong> follower<%= follows_count == 1 ? '' : 's' %></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="<%= site.uri %>" class="large-portrait" style="background-image:url(<%= site.screenshot_url('index.html', '540x405') %>);"></a>
|
||||
|
||||
<div class="news-profile-button">
|
||||
<a href="/site/<%= site.username %>" class="btn-Action"><i class="fa fa-user"></i> Profile</a>
|
||||
<a href="#" id="shareButton" class="btn-Action" data-container="body" data-toggle="popover" data-placement="bottom" data-content='<%== erb :'_share', layout: false, locals: {site: current_site} %>'><i class="fa fa-share-alt"></i> Share</a>
|
||||
</div>
|
||||
|
||||
<%== erb :'_follows', layout: false, locals: {site: site, is_current_site: site == current_site} %>
|
||||
|
||||
<%== erb :'_tags', layout: false, locals: {site: site, is_current_site: site == current_site} %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="http://www.webglearth.com/v2/api.js"></script>
|
||||
<script src="/js/Chart.min.js"></script>
|
||||
<script>
|
||||
//OpenGL globe
|
||||
$(document).ready(function() {
|
||||
var earth = new WE.map('earth_div');
|
||||
earth.setView([20, -100], 2.07);
|
||||
WE.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',{
|
||||
attribution: '© OpenStreetMap'
|
||||
}).addTo(earth);
|
||||
|
||||
// Start a simple rotation animation
|
||||
var before = null;
|
||||
requestAnimationFrame(function animate(now) {
|
||||
var c = earth.getPosition();
|
||||
var elapsed = before? now - before: 0;
|
||||
before = now;
|
||||
earth.setCenter([c[0], c[1] + 0.1*(elapsed/30)]);
|
||||
requestAnimationFrame(animate);
|
||||
});
|
||||
|
||||
//chart.js
|
||||
var data = {
|
||||
labels: ["May 1", "May 2", "May 3", "May 4", "May 5", "May 6", "May7"],
|
||||
datasets: [
|
||||
{
|
||||
label: "Hits",
|
||||
fillColor: "rgba(220,220,220,0.2)",
|
||||
strokeColor: "rgba(220,220,220,1)",
|
||||
pointColor: "rgba(220,220,220,1)",
|
||||
pointStrokeColor: "#fff",
|
||||
pointHighlightFill: "#fff",
|
||||
pointHighlightStroke: "rgba(220,220,220,1)",
|
||||
data: [65, 59, 80, 81, 56, 55, 65]
|
||||
},
|
||||
{
|
||||
label: "Visits",
|
||||
fillColor: "rgba(151,187,205,0.2)",
|
||||
strokeColor: "rgba(151,187,205,1)",
|
||||
pointColor: "rgba(151,187,205,1)",
|
||||
pointStrokeColor: "#fff",
|
||||
pointHighlightFill: "#fff",
|
||||
pointHighlightStroke: "rgba(151,187,205,1)",
|
||||
data: [28, 48, 40, 66, 33, 27, 45]
|
||||
}
|
||||
]
|
||||
};
|
||||
// Get context with jQuery - using jQuery's .get() method.
|
||||
var ctx = $("#myChart").get(0).getContext("2d");
|
||||
// This will get the first returned node in the jQuery collection.
|
||||
//var myNewChart = new Chart(ctx);
|
||||
var myLineChart = new Chart(ctx).Line(data, {bezierCurve: false});
|
||||
})
|
||||
</script>
|
|
@ -4,22 +4,9 @@
|
|||
<th class="feature-column"></th>
|
||||
<th>
|
||||
<h3>Free</h3>
|
||||
<% if request.path != '/welcome' %>
|
||||
<p>$<%= Site::PLAN_FEATURES[:free][:price] %>/mo</p>
|
||||
<%== plan_pricing_button :free %>
|
||||
<% end %>
|
||||
</th>
|
||||
<th class="professional">
|
||||
<h3>Supporter</h3>
|
||||
<% if request.path != '/welcome' %>
|
||||
<% if parent_site && parent_site.legacy_supporter? %>
|
||||
<p>$<%= Site::LEGACY_SUPPORTER_PRICES[parent_site.values[:plan_type].to_sym] %>/mo</p>
|
||||
<div class="current-plan">Current Plan</div>
|
||||
<% else %>
|
||||
<p>$<%= Site::PLAN_FEATURES[:supporter][:price] %>/mo</p>
|
||||
<%== plan_pricing_button :supporter %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
|
@ -15,7 +15,7 @@
|
|||
<h2>The Bitcoin Lifer Plan</h2>
|
||||
|
||||
<p>
|
||||
We don't have a good way to charge recurring with Bitcoin (that adheres to Bitcoin's decentralized principles). So instead, we've put together a special <strong>Bitcoin Lifer Plan</strong>. Basically, if you send us <strong>$100</strong> worth of BTC at current market price, we'll never charge you again for the supporter upgrade, and you'll basically get it forever!
|
||||
We don't have a good way to charge recurring with Bitcoin (that adheres to Bitcoin's distributed principles). So instead, we've put together a special <strong>Bitcoin Lifer Plan</strong>. Basically, if you send us <strong>$100</strong> worth of BTC at current market price, we'll never charge you again for the supporter upgrade, and you'll basically get it forever!
|
||||
</p>
|
||||
<p>Be sure to <a href="/contact">contact us</a> after sending with the transaction ID so we can confirm and upgrade your account.</p>
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
<article>
|
||||
<div class="txt-Center"><img src="/img/heartcat.png"></div>
|
||||
|
||||
<h1 class="txt-Center">You now have the <%= Site::PLAN_FEATURES[parent_site.plan_type.to_sym][:name] %> plan.<br>Thank you for your support!</h1>
|
||||
<h1 class="txt-Center">You have become a Neocities Supporter.<br>Thank you for your support!</h1>
|
||||
|
||||
<p>
|
||||
Your support allows Neocities to continue our project to bring back the web. We will do our best to ensure that the site remains a great place for people to express themselves - one web page at a time.
|
|
@ -1,8 +1,6 @@
|
|||
Hi there!
|
||||
|
||||
A Neocities administrator has upgraded your account to supporter! You can see some of the new features you can use by visiting our supporter page at https://neocities.org/plan
|
||||
|
||||
We're looking forward to seeing the awesome things you will do with it.
|
||||
A Neocities administrator has upgraded your account to supporter! We're looking forward to seeing the awesome things you will do with it.
|
||||
|
||||
Thank you very, very much for supporting Neocities. It means a lot to us. We'll try our hardest to keep improving the site and stick to our core values (NO MARKETING OR ADVERTISING, EVER).
|
||||
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
<section class="section tutorial">
|
||||
<div class="row">
|
||||
<div class="col col-60 lesson">
|
||||
<h1>Chapter 1</h1>
|
||||
<h2 class="subtitle">Page 2/10</h2>
|
||||
<div class="comic" style="height: 500px">
|
||||
<div class="dialogue">
|
||||
All you need to build your first site is a computer language called HTML.
|
||||
</div>
|
||||
<div class="dialogue">
|
||||
And here's some HTML, right in this box! Let's make a change. Replace Hello World with Victoria's Website, and click save!
|
||||
</div>
|
||||
<div class="dialogue">
|
||||
You'll see the results of your site here.
|
||||
</div>
|
||||
<div class="dialogue">
|
||||
Make sure to check the green boxes below for important bonus info!
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="welcome">
|
||||
<h4>Opening and Closing Tags</h4>
|
||||
<p>HTML is just a bunch of tags. There's usually an opening tag and a closing tag, with content between them like this:</p>
|
||||
|
||||
<pre>tag Content visible on your site /tag</pre>
|
||||
|
||||
<p>Don't worry if this seems confusing - you'll get the hang of it after a few more examples! If you ever get stuck, click the <strong>Help</strong> link below.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col col-40 interact">
|
||||
<input class="btn btn-action" type="submit" value="Save">
|
||||
<h3>HTML</h3>
|
||||
<textarea class="editor">
|
||||
<html>
|
||||
<body>
|
||||
|
||||
Hello World!
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</textarea>
|
||||
|
||||
<h3>Site Preview</h3>
|
||||
<div class="preview">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
|
@ -1,10 +1,29 @@
|
|||
<section class="section plans welcome">
|
||||
<% if flash.keys.length > 0 %>
|
||||
<div class="alert alert-block txt-Center">
|
||||
<% flash.keys.each do |key| %>
|
||||
<%== flash[key] %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if request.path == '/welcome' %>
|
||||
<h2>Welcome to Neocities, <%= current_site.username %>!</h2>
|
||||
<% elsif parent_site.supporter? %>
|
||||
<div class="txt-Center" style="margin-bottom: 20px"><img src="/img/heartcat.png"></div>
|
||||
<h2>Thank you for being a supporter!</h2>
|
||||
<% else %>
|
||||
<h2>Become a Supporter</h2>
|
||||
<% end %>
|
||||
<h3 class="subtitle">
|
||||
<strong>Neocities will never put advertising on your site.</strong> Instead, Neocities is powered by <strong>you</strong>.
|
||||
Help us bring back creative personal websites by becoming a supporter.
|
||||
<strong>Neocities will never put advertising on your site.</strong> Instead, Neocities is powered by <strong>you</strong>.<br>
|
||||
<% if !parent_site.supporter? %>
|
||||
Help us bring back creative web sites by becoming a supporter.
|
||||
<% end %>
|
||||
</h3>
|
||||
|
||||
<% if !parent_site.supporter? %>
|
||||
|
||||
<div class="plan-overview">
|
||||
<div class="col free">
|
||||
<div class="row content">
|
||||
|
@ -22,7 +41,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="row content txt-Center">
|
||||
<% if request.path == '/welcome' %>
|
||||
<a href="/tutorial" class="btn-Action">Continue</a>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -57,8 +78,8 @@
|
|||
<p class="instructions">Just enter your card info, and you're done:</p>
|
||||
<div>
|
||||
<div id="plan_error" class="alert alert-block alert-error" style="display:none"></div>
|
||||
<form id="upgradeForm" method="POST" action="/plan/update">
|
||||
<input type="hidden" value="<%= csrf_token %>" name="csrf_token">
|
||||
<form id="upgradeForm" method="POST" action="/supporter/update">
|
||||
<%== csrf_token_input_html %>
|
||||
<input type="hidden" value="supporter" name="plan_type">
|
||||
<input id="stripe_token" name="stripe_token" type="hidden" value="<%= params[:stripe_token] %>">
|
||||
|
||||
|
@ -93,14 +114,16 @@
|
|||
</div>
|
||||
|
||||
<div class="row content txt-Center">
|
||||
<a href="/" class="btn-Action" onclick="$('#upgradeForm').submit(); return false">
|
||||
<a id="upgradeLink" href="/" class="btn-Action" onclick="$('#upgradeForm').submit(); return false">
|
||||
Upgrade for $<%= Site::PLAN_FEATURES[:supporter][:price] %>/mo
|
||||
</a>
|
||||
or pay with <a href="/plan/paypal">PayPal</a> or <a href="/plan/bitcoin">Bitcoin</a>
|
||||
or pay with <a href="/supporter/paypal">PayPal</a> or <a href="/supporter/bitcoin">Bitcoin</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
<div class="row">
|
||||
<div class="col col-50">
|
||||
<h3><i class="fa fa-users"></i> Powered by supporters like you</h3>
|
||||
|
@ -110,9 +133,7 @@
|
|||
|
||||
<div class="col col-50">
|
||||
<h3><i class="fa fa-lock"></i> Risk-free and secure</h3>
|
||||
<p>You can downgrade back to a free account at any time on the Support Us page. If you do, we’ll refund the amount you didn’t use.</p>
|
||||
|
||||
<p>We use Stripe and PayPal for payments, and never store your credit card information directly. </p>
|
||||
<p>You can downgrade back to a free account at any time. If you do, we’ll refund the amount you didn’t use. We use Stripe and PayPal for payments, and never store your credit card information directly.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -120,25 +141,25 @@
|
|||
<div class="col col-50">
|
||||
<h3><i class="fa fa-globe"></i> Making a better web</h3>
|
||||
<p>
|
||||
When you become a supporter, you are directly helping our quest to bring back the creative, independent web. With your help we’ll be able to work on Neocities full-time to continue improving the site and adding more features.
|
||||
When you become a supporter, you are directly helping our quest to bring back the creative, independent web. With your help, we'll be able to continue improving the site and adding more features.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="col col-50">
|
||||
<h3><i class="fa fa-university"></i> Giving back</h3>
|
||||
<p>
|
||||
Neocities is used by educators all over the world to teach thousands of students how to program. And as an <a href="http://www.opencompany.org">Open Company</a>, our site is <a href="https://github.com/neocities">completely open source</a> and we share all our code with the community.
|
||||
Neocities is used by educators all over the world to teach thousands of students how to program and create web sites.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section" style="padding-top: 0;">
|
||||
<%== erb :'plan/_compare', layout: false %>
|
||||
<%== erb :'supporter/_compare', layout: false %>
|
||||
</section>
|
||||
|
||||
|
||||
<%== erb :'plan/_signupcode', layout: false %>
|
||||
<%== erb :'supporter/_signupcode', layout: false %>
|
||||
<script>
|
||||
$(function() {
|
||||
$('ul span').tooltip({
|
||||
|
|
|
@ -1,101 +0,0 @@
|
|||
<section class="section plans welcome">
|
||||
<h2>Welcome to Neocities, <%= current_site.username %>!</h2>
|
||||
<h3 class="subtitle">Free accounts will always be free and ad-free.
|
||||
You can support our quest to bring back the creative, independent web by upgrading to the Supporter Plan.</h3>
|
||||
|
||||
<div class="plan-overview">
|
||||
<div class="col free">
|
||||
<div class="row content">
|
||||
<div class="col col-100">
|
||||
<h3>Free Plan</h3>
|
||||
<div class="plan-image free">
|
||||
</div>
|
||||
<div class="price">$<%= Site::PLAN_FEATURES[:free][:price] %></div>
|
||||
<div class="interval">per month</div>
|
||||
|
||||
<ul class="main-features">
|
||||
<li><strong><%= Site::PLAN_FEATURES[:free][:space].to_space_pretty %></strong> <span data-original-title="How much disk space you can use for your site. More space means you can upload more files.">storage</span></li>
|
||||
<li><strong><%= Site::PLAN_FEATURES[:free][:bandwidth].to_space_pretty %></strong> <span data-original-title="How much content you can serve in one month. Don’t worry—these are soft limits. Temporary surges are fine, we won't take your site down automatically, and we're very flexible.">bandwidth</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row content txt-Center">
|
||||
<a href="/" class="btn-Action">Continue</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col supporter">
|
||||
<div class="row content">
|
||||
<div class="col col-33">
|
||||
<h3>Supporter Plan</h3>
|
||||
<div class="plan-image supporter">
|
||||
</div>
|
||||
<% if parent_site && parent_site.legacy_supporter? %>
|
||||
<div class="price">$<%= Site::LEGACY_SUPPORTER_PRICES[parent_site[:plan_type].to_sym] %></div>
|
||||
<div class="interval">per month, billed annually</div>
|
||||
<% else %>
|
||||
<div class="price">$<%= Site::PLAN_FEATURES[:supporter][:price] %></div>
|
||||
<div class="interval">per month</div>
|
||||
<% end %>
|
||||
|
||||
<ul class="main-features">
|
||||
<li><strong><%= Site::PLAN_FEATURES[:supporter][:space].to_space_pretty %></strong> <span data-original-title="How much disk space you can use for your site. More space means you can upload more files.">storage</span></li>
|
||||
<li><strong>1000 GB</strong> <span data-original-title="How much content you can serve in one month. Don’t worry—these are soft limits. Temporary surges are fine, we won't take your site down automatically, and we're very flexible.">bandwidth</span></li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li><span data-original-title="No whitelists—you can upload anything you want (no copyrighted content, trojans, or w4r3z, please).">No File Upload Type Restrictions</span></li>
|
||||
<li><span data-original-title="Make as many sites as you want with one account, and easily switch between them.">Unlimited Site Creation</span></li>
|
||||
<li><span data-original-title="Add your domain name (yoursite.com) to your site!">Custom Domain Support</span></li>
|
||||
<li><span data-original-title="With WebDAV, you can mount your Neocities site to your computer as a hard drive, making it easy to update with your favorite HTML editor.">Remote Filesystem Support</span></li>
|
||||
<li><span data-original-title="Upload your SSL certificate for your custom domain name, preventing snoops from seeing your user’s traffic.">Custom SSL Certs (coming soon)</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col col-66">
|
||||
<p>To upgrade, enter your credit card info below:</p>
|
||||
<div><img src="/img/skeuocard.png" style="max-width:377px"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row content txt-Center">
|
||||
<a href="/" class="btn-Action">Upgrade for
|
||||
<% if parent_site && parent_site.legacy_supporter? %>
|
||||
$<%= Site::LEGACY_SUPPORTER_PRICES[parent_site[:plan_type].to_sym] %>
|
||||
<% else %>
|
||||
$<%= Site::PLAN_FEATURES[:supporter][:price] %>
|
||||
<% end %>/mo
|
||||
</a>
|
||||
or pay with <a href="/plan/alternate/">PayPal</a> or <a href="/plan/alternate/">Bitcoin</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col col-50">
|
||||
<h3><i class="fa fa-users"></i> Powered by supporters like you</h3>
|
||||
<p>Neocities will never sell your personal data or embed advertising on member sites. Instead, we are funded directly by our community through supporter plans and donations. This allows us to base all our decisions on making the best possible web building experience for you, rather than on appeasing ad companies.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col col-50">
|
||||
<h3><i class="fa fa-lock"></i> Risk-free and secure</h3>
|
||||
<p>You can downgrade back to a free account at any time on the plan page. If you do, we’ll refund the amount you didn’t use.</p>
|
||||
|
||||
<p>We use Stripe and PayPal for payments, and never store your credit card information directly. </p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col col-50">
|
||||
<h3><i class="fa fa-globe"></i> Making a better web</h3>
|
||||
<p>Maybe something about our goals to 1. bring back the creative web and 2. give a diverse group of people a welcoming place to learn coding skills...</p>
|
||||
</div>
|
||||
|
||||
<div class="col col-50">
|
||||
<h3><i class="fa fa-github"></i> Giving back</h3>
|
||||
<p>Maybe something about open source...</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
Loading…
Add table
Reference in a new issue