Work on new promos for new account types.
parent
6873c0944e
commit
d93b564e0d
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -2081,44 +2081,6 @@ body.signup {
|
||||||
padding-top: 0 !important;
|
padding-top: 0 !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
div.info {
|
|
||||||
background: #415A63 url('../img/homepage-header-bg.jpg') top center no-repeat;
|
|
||||||
color: white;
|
|
||||||
font: bold 24px $Helvetica;
|
|
||||||
margin-bottom: 30px;
|
|
||||||
padding: 60px 0;
|
|
||||||
text-align: center;
|
|
||||||
@include multi-border-radius(5px, 5px, 0, 0);
|
|
||||||
|
|
||||||
span {
|
|
||||||
color: #28C548;
|
|
||||||
}
|
|
||||||
h4 {
|
|
||||||
margin-bottom: 0;
|
|
||||||
margin-top: 40px;
|
|
||||||
}
|
|
||||||
p.sub {
|
|
||||||
color: #F2F2F2;
|
|
||||||
font: normal 18px/24px $Helvetica;
|
|
||||||
margin-top: 40px;
|
|
||||||
padding: 0 60px;
|
|
||||||
text-shadow: 0 1px 0 #153A42;
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: white;
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
body.signup.pro {
|
|
||||||
div.info {
|
|
||||||
@include border-radius(0);
|
|
||||||
|
|
||||||
p.sub {
|
|
||||||
padding: 0 80px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
body.static {
|
body.static {
|
||||||
.static-box {
|
.static-box {
|
||||||
|
@ -2215,6 +2177,50 @@ body.static {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
div.info {
|
||||||
|
background: #415A63 url('../img/homepage-header-bg.jpg') top center no-repeat;
|
||||||
|
color: white;
|
||||||
|
font: bold 24px $Helvetica;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
padding: 60px 0;
|
||||||
|
text-align: center;
|
||||||
|
@include multi-border-radius(3px, 3px, 0, 0);
|
||||||
|
|
||||||
|
span {
|
||||||
|
color: #28C548;
|
||||||
|
}
|
||||||
|
h4 {
|
||||||
|
margin-bottom: 0;
|
||||||
|
margin-top: 40px;
|
||||||
|
}
|
||||||
|
p.sub {
|
||||||
|
color: #F2F2F2;
|
||||||
|
font: normal 18px/24px $Helvetica;
|
||||||
|
margin-bottom: 0;
|
||||||
|
margin-top: 40px;
|
||||||
|
padding: 0 60px;
|
||||||
|
text-shadow: 0 1px 0 #153A42;
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: white;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
body.pro-signup-complete {
|
||||||
|
div.info {
|
||||||
|
margin-bottom: 0;
|
||||||
|
@include border-radius(3px);
|
||||||
|
|
||||||
|
p.sub {
|
||||||
|
margin-top: 20px;
|
||||||
|
padding: 0 90px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
form.form-horizontal {
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
body.stats {
|
body.stats {
|
||||||
table {
|
table {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block page-title %}Sign up for Snipt Pro{% endblock %}
|
||||||
|
|
||||||
|
{% block body-class %}{{ block.super }} static pro signup pro-signup pro-signup-complete{% endblock %}
|
||||||
|
|
||||||
|
{% block breadcrumb %}
|
||||||
|
<li><a href="/pro/">Snipt Pro</a></li>
|
||||||
|
<li><span class="prompt">/</span> <a href="#">Complete</a></li>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<form class="form-horizontal static-box" id="pro-signup" method="post" action="/pro/complete/">
|
||||||
|
<fieldset>
|
||||||
|
<div class="info">
|
||||||
|
You rock.
|
||||||
|
<p class="sub">
|
||||||
|
You're now a Snipt Pro.<br /><br />
|
||||||
|
You should <a target="blank" href="http://twitter.com/intent/tweet?text=I'm now a @Snipt Pro. Are you? https://snipt.net/pro/">tell the world</a>.
|
||||||
|
If you ever need anything at all, <a href="mailto:nick@snipt.net">email Nick directly</a>, or use the support link in the bottom right.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
{% endblock %}
|
|
@ -1,22 +0,0 @@
|
||||||
{% extends "base.html" %}
|
|
||||||
|
|
||||||
{% block page-title %}Sign up for Snipt Pro{% endblock %}
|
|
||||||
|
|
||||||
{% block body-class %}{{ block.super }} static pro pro-signup{% endblock %}
|
|
||||||
|
|
||||||
{% block breadcrumb %}
|
|
||||||
<li><a href="/pro/">Snipt Pro</a></li>
|
|
||||||
<li><span class="prompt">/</span> <a href="/pro/signup/">Sign up</a></li>
|
|
||||||
<li><span class="prompt">/</span> <a href="#">Complete</a></li>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<div class="pro-hero">
|
|
||||||
snip<span>t</span> <span class="pro">Pro</span>
|
|
||||||
</div>
|
|
||||||
<div class="static-box">
|
|
||||||
<p><strong>Congratulations!</strong> You're now a Snipt Pro.</p>
|
|
||||||
<p>You should <a target="blank" href="http://twitter.com/intent/tweet?text=I'm now a @Snipt Pro. Are you? https://snipt.net/pro/">tell the world</a>. If you ever need anything at all, <a href="mailto:nick@snipt.net">email Nick</a> directly.</p>
|
|
||||||
<p>Also, you rock. :)</p>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
|
@ -1,109 +0,0 @@
|
||||||
{% extends "base.html" %}
|
|
||||||
|
|
||||||
{% block page-title %}Sign up for Snipt Pro{% endblock %}
|
|
||||||
|
|
||||||
{% block body-class %}{{ block.super }} static pro pro-signup{% endblock %}
|
|
||||||
|
|
||||||
{% block extra-scripts %}
|
|
||||||
<script type="text/javascript" src="https://js.stripe.com/v1/"></script>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block js %}
|
|
||||||
{{ block.super }}
|
|
||||||
{% if debug %}
|
|
||||||
Stripe.setPublishableKey('pk_test_cgknmaWRMQeJt2adEdvH3T9l');
|
|
||||||
{% else %}
|
|
||||||
Stripe.setPublishableKey('pk_live_gUO2nCl7dhx6j0posz6gnbhA');
|
|
||||||
{% endif %}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block breadcrumb %}
|
|
||||||
<li><a href="/pro/">Snipt Pro</a></li>
|
|
||||||
<li><span class="prompt">/</span> <a href="/pro/signup/">Sign up</a></li>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<div class="pro-hero">
|
|
||||||
snip<span>t</span> <span class="pro">Pro</span>
|
|
||||||
</div>
|
|
||||||
{% if request.GET.declined %}
|
|
||||||
<div class="alert alert-error" style="margin: 30px;">
|
|
||||||
<strong>Your card was declined.</strong> You have not been charged. Please try again.
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
<div class="static-box">
|
|
||||||
<form class="form-horizontal" id="pro-signup" method="post" action="/pro/signup/complete/">
|
|
||||||
<fieldset>
|
|
||||||
<div class="payment-loading"><span>Please wait…</span></div>
|
|
||||||
<legend>$5 USD will be charged to your card monthly. Also, you rock. Tell yourself that every month, too.</legend>
|
|
||||||
<div class="payment-errors alert alert-error"></div>
|
|
||||||
<div class="control-group">
|
|
||||||
<label class="control-label" for="name">Name on card:</label>
|
|
||||||
<div class="controls">
|
|
||||||
<input type="text" class="input-xlarge" id="name" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="control-group">
|
|
||||||
<label class="control-label" for="number">Card number:</label>
|
|
||||||
<div class="controls cards">
|
|
||||||
<input type="text" class="input-xlarge" id="number" />
|
|
||||||
<img src="/static/img/card-visa.png" alt="Visa" />
|
|
||||||
<img src="/static/img/card-mastercard.png" alt="MasterCard" />
|
|
||||||
<img src="/static/img/card-discover.png" alt="Discover" />
|
|
||||||
<img src="/static/img/card-american-express.png" alt="American Express" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="control-group">
|
|
||||||
<label class="control-label" for="exp-month">Expiration date:</label>
|
|
||||||
<div class="controls">
|
|
||||||
<select id="exp-month" class="span2 exp-month">
|
|
||||||
<option value="">----</option>
|
|
||||||
<option value="01">01 - January</option>
|
|
||||||
<option value="02">02 - February</option>
|
|
||||||
<option value="03">03 - March</option>
|
|
||||||
<option value="04">04 - April</option>
|
|
||||||
<option value="05">05 - May</option>
|
|
||||||
<option value="06">06 - June</option>
|
|
||||||
<option value="07">07 - July</option>
|
|
||||||
<option value="08">08 - August</option>
|
|
||||||
<option value="09">09 - September</option>
|
|
||||||
<option value="10">10 - October</option>
|
|
||||||
<option value="11">11 - November</option>
|
|
||||||
<option value="12">12 - December</option>
|
|
||||||
</select>
|
|
||||||
<select id="exp-year" class="span1">
|
|
||||||
<option value="">----</option>
|
|
||||||
<option value="2012">2012</option>
|
|
||||||
<option value="2013">2013</option>
|
|
||||||
<option value="2014">2014</option>
|
|
||||||
<option value="2015">2015</option>
|
|
||||||
<option value="2016">2016</option>
|
|
||||||
<option value="2017">2017</option>
|
|
||||||
<option value="2018">2018</option>
|
|
||||||
<option value="2019">2019</option>
|
|
||||||
<option value="2020">2020</option>
|
|
||||||
<option value="2021">2021</option>
|
|
||||||
<option value="2022">2022</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="control-group">
|
|
||||||
<label class="control-label" for="cvc">Security code (CVC):</label>
|
|
||||||
<div class="controls">
|
|
||||||
<input type="text" class="input-min span1" id="cvc">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-actions">
|
|
||||||
{% csrf_token %}
|
|
||||||
<button type="submit" class="btn btn-success">Sign up</button>
|
|
||||||
<div class="security">
|
|
||||||
<a href="https://stripe.com/help/security">Secure</a> by default. Every Snipt page is secure.
|
|
||||||
</div>
|
|
||||||
<div class="stripe">
|
|
||||||
Your credit card is stored securely with <a href="https://stripe.com">Stripe</a> and we use <a href="https://stripe.com/docs/stripe.js">Stripe.js</a> for maximum security.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
|
@ -1,25 +1,115 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block page-title %}Snipt Pro{% endblock %}
|
{% block page-title %}Sign up for Snipt Pro{% endblock %}
|
||||||
|
|
||||||
{% block body-class %}{{ block.super }} static pro signup{% endblock %}
|
{% block body-class %}{{ block.super }} static signup pro{% endblock %}
|
||||||
|
|
||||||
|
{% block extra-scripts %}
|
||||||
|
<script type="text/javascript" src="https://js.stripe.com/v1/"></script>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block js %}
|
||||||
|
{{ block.super }}
|
||||||
|
{% if debug %}
|
||||||
|
Stripe.setPublishableKey('pk_test_cgknmaWRMQeJt2adEdvH3T9l');
|
||||||
|
{% else %}
|
||||||
|
Stripe.setPublishableKey('pk_live_gUO2nCl7dhx6j0posz6gnbhA');
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block breadcrumb %}
|
{% block breadcrumb %}
|
||||||
<li><a href="/pro/">Snipt Pro</a></li>
|
<li><a href="/pro/">Snipt Pro</a></li>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
{% if request.GET.expired %}
|
||||||
|
<div class="alert alert-error" style="margin: 30px;">
|
||||||
|
<strong>Your trial has expired.</strong> You'll need to subscribe in order to create new snipts.
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if request.GET.declined %}
|
||||||
|
<div class="alert alert-error" style="margin: 30px;">
|
||||||
|
<strong>Your card was declined.</strong> You have not been charged. Please try again.
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<form class="form-horizontal static-box" id="pro-signup" method="post" action="/pro/complete/">
|
||||||
|
<fieldset>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
Subscribe for only <span>$5/month</span>.
|
Subscribe for just <span>$5/month</span> or <span>$49/year</span>.
|
||||||
<p class="sub">
|
<p class="sub">
|
||||||
We believe the best way to build a superior product is to charge for it.
|
We believe the best way to build a superior product is to charge for it.
|
||||||
As a paid Snipt member, you'll have unrestricted access to the app, <a href="/api/">API</a>,
|
As a paid Snipt member, you'll have unrestricted access to the app, <a href="/api/">API</a>,
|
||||||
instant chat support, and more.
|
instant chat support, and more.
|
||||||
</p>
|
</p>
|
||||||
{% if request.user.profile.is_pro %}
|
|
||||||
<h3>You're already a Pro.</h3>
|
|
||||||
{% else %}
|
|
||||||
<h4><a href="/pro/signup/" class="btn btn-large btn-success">Subscribe</a></h4>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="payment-loading"><span>Please wait…</span></div>
|
||||||
|
<div class="payment-errors alert alert-error"></div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="name">Name on card:</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" class="input-xlarge" id="name" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="number">Card number:</label>
|
||||||
|
<div class="controls cards">
|
||||||
|
<input type="text" class="input-xlarge" id="number" />
|
||||||
|
<img src="/static/img/card-visa.png" alt="Visa" />
|
||||||
|
<img src="/static/img/card-mastercard.png" alt="MasterCard" />
|
||||||
|
<img src="/static/img/card-discover.png" alt="Discover" />
|
||||||
|
<img src="/static/img/card-american-express.png" alt="American Express" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="exp-month">Expiration date:</label>
|
||||||
|
<div class="controls">
|
||||||
|
<select id="exp-month" class="span2 exp-month">
|
||||||
|
<option value="">----</option>
|
||||||
|
<option value="01">01 - January</option>
|
||||||
|
<option value="02">02 - February</option>
|
||||||
|
<option value="03">03 - March</option>
|
||||||
|
<option value="04">04 - April</option>
|
||||||
|
<option value="05">05 - May</option>
|
||||||
|
<option value="06">06 - June</option>
|
||||||
|
<option value="07">07 - July</option>
|
||||||
|
<option value="08">08 - August</option>
|
||||||
|
<option value="09">09 - September</option>
|
||||||
|
<option value="10">10 - October</option>
|
||||||
|
<option value="11">11 - November</option>
|
||||||
|
<option value="12">12 - December</option>
|
||||||
|
</select>
|
||||||
|
<select id="exp-year" class="span1">
|
||||||
|
<option value="">----</option>
|
||||||
|
<option value="2012">2012</option>
|
||||||
|
<option value="2013">2013</option>
|
||||||
|
<option value="2014">2014</option>
|
||||||
|
<option value="2015">2015</option>
|
||||||
|
<option value="2016">2016</option>
|
||||||
|
<option value="2017">2017</option>
|
||||||
|
<option value="2018">2018</option>
|
||||||
|
<option value="2019">2019</option>
|
||||||
|
<option value="2020">2020</option>
|
||||||
|
<option value="2021">2021</option>
|
||||||
|
<option value="2022">2022</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="cvc">Security code (CVC):</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" class="input-min span1" id="cvc">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-actions">
|
||||||
|
{% csrf_token %}
|
||||||
|
<button type="submit" class="btn btn-success">Subscribe</button>
|
||||||
|
<div class="security">
|
||||||
|
<a href="https://stripe.com/help/security">Secure</a> by default. Every Snipt page is secure.
|
||||||
|
</div>
|
||||||
|
<div class="stripe">
|
||||||
|
Your credit card is stored securely with <a href="https://stripe.com">Stripe</a> and we use <a href="https://stripe.com/docs/stripe.js">Stripe.js</a> for maximum security.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
Free for 7 days, then only <span>$5/month</span>.
|
Free for 7 days, then just <span>$5/month</span> or <span>$49/year</span>.
|
||||||
<p class="sub">
|
<p class="sub">
|
||||||
We believe the best way to build a superior product is to charge for it.
|
We believe the best way to build a superior product is to charge for it.
|
||||||
As a paid Snipt member, you'll have unrestricted access to the app, <a href="/api/">API</a>,
|
As a paid Snipt member, you'll have unrestricted access to the app, <a href="/api/">API</a>,
|
||||||
|
|
9
urls.py
9
urls.py
|
@ -12,8 +12,8 @@ from snipts.views import search
|
||||||
from tastypie.api import Api
|
from tastypie.api import Api
|
||||||
from utils.views import SniptRegistrationView
|
from utils.views import SniptRegistrationView
|
||||||
from jobs.views import jobs, jobs_json
|
from jobs.views import jobs, jobs_json
|
||||||
from views import (homepage, lexers, login_redirect, pro_signup, sitemap, tags,
|
from views import (homepage, lexers, login_redirect, pro, sitemap, tags,
|
||||||
pro_signup_complete, user_api_key)
|
pro_complete, user_api_key)
|
||||||
|
|
||||||
import admin as custom_admin
|
import admin as custom_admin
|
||||||
import os
|
import os
|
||||||
|
@ -48,9 +48,8 @@ urlpatterns = patterns('',
|
||||||
url(r'^sitemap.xml$', sitemap),
|
url(r'^sitemap.xml$', sitemap),
|
||||||
url(r'^tags/$', tags),
|
url(r'^tags/$', tags),
|
||||||
|
|
||||||
url(r'^pro/$', TemplateView.as_view(template_name='pro.html')),
|
url(r'^pro/$', pro),
|
||||||
url(r'^pro/signup/$', pro_signup),
|
url(r'^pro/complete/$', pro_complete),
|
||||||
url(r'^pro/signup/complete/$', pro_signup_complete),
|
|
||||||
|
|
||||||
url(r'^account/', include('accounts.urls')),
|
url(r'^account/', include('accounts.urls')),
|
||||||
|
|
||||||
|
|
10
views.py
10
views.py
|
@ -89,15 +89,15 @@ def login_redirect(request):
|
||||||
return HttpResponseRedirect('/')
|
return HttpResponseRedirect('/')
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
@render_to('pro-signup.html')
|
@render_to('pro.html')
|
||||||
def pro_signup(request):
|
def pro(request):
|
||||||
if request.user.profile.is_pro:
|
if request.user.profile.is_pro:
|
||||||
return HttpResponseRedirect('/' + request.user.username + '/')
|
return HttpResponseRedirect('/' + request.user.username + '/')
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
@render_to('pro-signup-complete.html')
|
@render_to('pro-complete.html')
|
||||||
def pro_signup_complete(request):
|
def pro_complete(request):
|
||||||
|
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ def pro_signup_complete(request):
|
||||||
plan=plan,
|
plan=plan,
|
||||||
email=request.user.email)
|
email=request.user.email)
|
||||||
except stripe.CardError:
|
except stripe.CardError:
|
||||||
return HttpResponseRedirect('/pro/signup/?declined=true')
|
return HttpResponseRedirect('/pro/?declined=true')
|
||||||
|
|
||||||
profile = request.user.profile
|
profile = request.user.profile
|
||||||
profile.is_pro = True
|
profile.is_pro = True
|
||||||
|
|
Loading…
Reference in New Issue