Skip to content

Commit

Permalink
Merge fab2eaa into a03ada1
Browse files Browse the repository at this point in the history
  • Loading branch information
equivalentideas committed Aug 12, 2015
2 parents a03ada1 + fab2eaa commit 196f2ad
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 86 deletions.
84 changes: 7 additions & 77 deletions app/assets/stylesheets/partials/_payment_form.scss
Original file line number Diff line number Diff line change
@@ -1,48 +1,26 @@
.registration-page,
.registration-success-page {
padding-bottom: 2em;
text-align: center;
padding-bottom: 4em;

@include at-breakpoint(40em) {
padding-bottom: 4em;
padding-bottom: 8em;
}

@include at-breakpoint(60em) {
padding-bottom: 6em;
padding-bottom: 9em;
}
}

h1 {
font-size: 2em;
line-height: 1.2;

@include at-breakpoint(40em) {
font-size: 2.5em;
}
}
.registration-intro {
max-width: 42em;

p {
font-size: 1.1em;

@include at-breakpoint(40em) {
font-size: 1.3em;
font-size: 1.175em;
}
}
}

.registration-page {
@include at-breakpoint(40em) {
@include span-columns(10, 12);
margin: 2em auto 0;
float: none;
}

@include at-breakpoint(60em) {
@include span-columns(8, 12);
margin: 2em auto 0;
float: none;
}
}

.registration-success-page {
@include at-breakpoint(40em) {
@include span-columns(11, 12);
Expand All @@ -57,54 +35,6 @@
}
}

#button-pro-signup {
@include box-sizing(border-box);
margin: 0 auto 1em;
border: 0;
padding: 1em;
text-align: center;
font-size: 1.25em;
font-family: $blueprint-font-family;
-webkit-appearance: none;
background: darken($light, 8%);
text-shadow: 0 1px 0 $lightest;
border-radius: .2em;
display: block;

&:hover,
&:focus {
background: darken($light, 25%);
}

&:hover {
cursor: pointer;
}

strong {
display: block;
}

&[disabled] {
color: $font-color;
}

& + p {
font-size: 1em;
}
}

.registration-price-container {
margin-bottom: .5em;
}

.registration-price {
font-size: 2.5em;
}

.registration-price-per {
font-size: 1.25em;
}

p.form-processing {
margin: 0 auto 1em;
padding: 1em 0 .7em;
Expand Down
1 change: 1 addition & 0 deletions app/controllers/subscriptions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def new

if params[:email]
@email = params[:email]
@subscription = Subscription.find_by(email: @email)
end
end

Expand Down
21 changes: 12 additions & 9 deletions app/views/subscriptions/new.html.haml
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
- content_for :page_title, 'Get less email & more useful alerts'
- content_for :page_title, 'Subscribe here'

.registration-page
= form_tag subscriptions_path, id: 'subscription-payment-form', class: 'registration-intro' do
%h1 Sift through less email and get more useful alerts
%h1.page-title Subscribe here

%p You’ll get all your alerts in one email so you never have to sift through your inbox again.
%p
Subscribe here to get alerts of planning applications near several addresses.
Once you’re subscribed you can sign up for alerts from as many locations as you need
and use PlanningAlerts in your work.

%p Discover new opportunities by watching as many locations as you need.

%p Make sure your coverage is complete. You can easily add and edit addresses from your full list of alerts in one place.
- if @subscription && @subscription.trial?
%p
You have
= pluralize(@subscription.trial_days_remaining, 'day')
left on your trial subscription.

-# TODO: Move to head to block page until it loads
%script{src: "https://checkout.stripe.com/checkout.js"}

%input{type: 'hidden', name: 'stripeAmount', value: @amount}
%button{disabled: true, type: 'submit', id: "button-pro-signup", data: {key: Configuration::STRIPE_PUBLISHABLE_KEY, amount: @amount, email: (@email if @email)}}
%button{disabled: true, type: 'submit', class: "button-action", id: "button-pro-signup", data: {key: Configuration::STRIPE_PUBLISHABLE_KEY, amount: @amount, email: (@email if @email)}}
Subscribe now #{@display_amount}/month
%p No lock-in. Cancel anytime.

0 comments on commit 196f2ad

Please sign in to comment.