Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add stripe! Also add compass/sass to toolchain.
- Loading branch information
1 parent
e31a4ba
commit 6b6da99
Showing
10 changed files
with
392 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
*~ | ||
.sass-cache* | ||
aws-setup.scm | ||
ktr-db | ||
nohup.out | ||
*# | ||
send-grid-key | ||
send-grid-user | ||
stripe-username.scm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Require any additional compass plugins here. | ||
|
||
# Set this to the root of your project when deployed: | ||
http_path = "/" | ||
css_dir = "css" | ||
sass_dir = "scss" | ||
images_dir = "images" | ||
javascripts_dir = "js" | ||
|
||
# You can select your preferred output style here (can be overridden via the command line): | ||
# output_style = :expanded or :nested or :compact or :compressed | ||
|
||
# To enable relative paths to assets via compass helper functions. Uncomment: | ||
# relative_assets = true | ||
|
||
# To disable debugging comments that display the original location of your selectors. Uncomment: | ||
# line_comments = false | ||
|
||
|
||
# If you prefer the indented syntax, you might want to regenerate this | ||
# project again passing --syntax sass, or you can uncomment this: | ||
# preferred_syntax = :sass | ||
# and then run: | ||
# sass-convert -R --from scss --to sass scss scss && rm -rf sass && mv scss sass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,139 @@ | ||
/* line 3, ../scss/_common.scss */ | ||
.button { | ||
border: 1px solid grey; | ||
margin-left: 20px; | ||
width: 304px; | ||
color: white; | ||
line-height: 14px; | ||
font-size: 14px; | ||
height: 44px; | ||
-webkit-font-smoothing: antialiased; | ||
font-weight: bold; | ||
font-family: HelveticaNeue, Helvetica, Arial, sans-serif; | ||
cursor: pointer; | ||
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.53); | ||
-webkit-border-radius: 4px 4px; | ||
-moz-border-radius: 4px / 4px; | ||
border-radius: 4px / 4px; | ||
} | ||
|
||
/* line 18, ../scss/_common.scss */ | ||
.button-blue { | ||
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #77b7ff), color-stop(100%, #017aff)); | ||
background-image: -webkit-linear-gradient(#77b7ff, #017aff); | ||
background-image: -moz-linear-gradient(#77b7ff, #017aff); | ||
background-image: -o-linear-gradient(#77b7ff, #017aff); | ||
background-image: linear-gradient(#77b7ff, #017aff); | ||
} | ||
/* line 20, ../scss/_common.scss */ | ||
.button-blue:active { | ||
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #017aff), color-stop(100%, #77b7ff)); | ||
background-image: -webkit-linear-gradient(#017aff, #77b7ff); | ||
background-image: -moz-linear-gradient(#017aff, #77b7ff); | ||
background-image: -o-linear-gradient(#017aff, #77b7ff); | ||
background-image: linear-gradient(#017aff, #77b7ff); | ||
} | ||
|
||
/* line 23, ../scss/_common.scss */ | ||
.button-green { | ||
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #9fc164), color-stop(100%, #146600)); | ||
background-image: -webkit-linear-gradient(#9fc164, #146600); | ||
background-image: -moz-linear-gradient(#9fc164, #146600); | ||
background-image: -o-linear-gradient(#9fc164, #146600); | ||
background-image: linear-gradient(#9fc164, #146600); | ||
} | ||
/* line 25, ../scss/_common.scss */ | ||
.button-green:active { | ||
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #146600), color-stop(100%, #9fc164)); | ||
background-image: -webkit-linear-gradient(#146600, #9fc164); | ||
background-image: -moz-linear-gradient(#146600, #9fc164); | ||
background-image: -o-linear-gradient(#146600, #9fc164); | ||
background-image: linear-gradient(#146600, #9fc164); | ||
} | ||
|
||
/* line 28, ../scss/_common.scss */ | ||
.column-header-grey { | ||
background-color: grey; | ||
} | ||
|
||
/* line 4, ../scss/club-register.scss */ | ||
.action { | ||
margin-bottom: 10px; | ||
margin-top: 10px; | ||
font-family: "Vollkorn"; | ||
font-size: 36px; } | ||
margin-bottom: 10px; | ||
margin-top: 10px; | ||
font-family: "Vollkorn"; | ||
font-size: 36px; | ||
} | ||
|
||
/* line 10, ../scss/club-register.scss */ | ||
.form-context { | ||
margin-bottom: 5px; | ||
margin-left: 20px; | ||
font-style: italic; | ||
color: grey; | ||
font-size: 16px; } | ||
margin-bottom: 5px; | ||
margin-left: 20px; | ||
font-style: italic; | ||
color: grey; | ||
font-size: 16px; | ||
} | ||
|
||
/* line 17, ../scss/club-register.scss */ | ||
.text { | ||
padding: 2px; | ||
line-height: 32px; | ||
margin-left: 20px; | ||
margin-top: 5px; | ||
margin-bottom: 5px; | ||
background-color: #ededed; | ||
width: 300px; | ||
font-size: 24px; | ||
font-family: 'Neucha', arial, serif; | ||
outline: none; | ||
border: 2px solid #ededed; | ||
border-bottom: 2px solid black; } | ||
|
||
font-family: 'Helvetica', serif; | ||
padding: 2px; | ||
line-height: 24px; | ||
margin-left: 20px; | ||
margin-top: 5px; | ||
margin-bottom: 5px; | ||
-webkit-border-radius: 4px 4px; | ||
-moz-border-radius: 4px / 4px; | ||
border-radius: 4px / 4px; | ||
width: 300px; | ||
font-size: 16px; | ||
outline: none; | ||
background: white url(/images/input-bg.jpg) repeat-x; | ||
border: 1px solid #DDD; | ||
} | ||
/* line 30, ../scss/club-register.scss */ | ||
.text:focus { | ||
-webkit-box-shadow: 0px 0px 10px blue; | ||
border: 2px solid black; | ||
border-radius: 6px; | ||
background-color: white; } | ||
|
||
.text:hover { | ||
-webkit-box-shadow: 0px 0px 5px blue; | ||
border: 2px solid white; | ||
border-radius: 6px; | ||
background-color: #eeeeee; } | ||
|
||
.create { | ||
width: 330px; | ||
font-size: 24px; | ||
margin-top: 20px; | ||
color: white; | ||
background-color: green; | ||
font-family: Verdana, sans; | ||
border: 1px solid grey; | ||
border-radius: 20px; | ||
-webkit-box-shadow: 0px 0px 10px grey; } | ||
|
||
.create:hover { | ||
cursor: pointer; | ||
-webkit-box-shadow: 0px 0px 25px blue; } | ||
|
||
.create:focus { | ||
-webkit-box-shadow: 0px 0px 25px blue; | ||
border-radius: 20px; | ||
background-color: green; | ||
border: 1px solid grey; } | ||
border: 1px solid #72b6e6; | ||
-webkit-box-shadow: 0px 0px 10px #72b6e6; | ||
-moz-box-shadow: 0px 0px 10px #72b6e6; | ||
box-shadow: 0px 0px 10px #72b6e6; | ||
} | ||
|
||
/* line 34, ../scss/club-register.scss */ | ||
.menu-frame { | ||
display: none; } | ||
display: none; | ||
} | ||
|
||
/* line 37, ../scss/club-register.scss */ | ||
.plan-features { | ||
font-size: 20px; | ||
line-height: 40px; | ||
} | ||
|
||
/* line 42, ../scss/club-register.scss */ | ||
.plan-features ul li { | ||
font-family: 'Helvetica', serif; | ||
border-top: solid 1px whiteSmoke; | ||
border-bottom: solid 1px #D2D2D2; | ||
} | ||
|
||
/* line 47, ../scss/club-register.scss */ | ||
.plan-features ul li:first-child { | ||
border-top-color: transparent; | ||
} | ||
|
||
/* line 50, ../scss/club-register.scss */ | ||
.plan-features ul li:last-child { | ||
border-bottom-color: transparent; | ||
} | ||
|
||
/* line 53, ../scss/club-register.scss */ | ||
.plan-aside { | ||
color: grey; | ||
font-style: italic; | ||
} | ||
|
||
/* line 57, ../scss/club-register.scss */ | ||
.payment-errors { | ||
color: red; | ||
font-weight: bold; | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
function stripeResponseHandler(status, response) { | ||
if (response.error) { | ||
// re-enable the submit button | ||
$('.submit-button').removeAttr("disabled"); | ||
// show the errors on the form | ||
$(".payment-errors").html(response.error.message); | ||
} else { | ||
var form$ = $("#payment-form"); | ||
// token contains id, last4, and card type | ||
var token = response['id']; | ||
// insert the token into the form so it gets submitted to the server | ||
form$.append("<input type='hidden' name='stripeToken' value='" + token + "' />"); | ||
// and submit | ||
form$.get(0).submit(); | ||
} | ||
}; | ||
|
||
$(document).ready(function() { | ||
$("#payment-form").submit(function(event) { | ||
// disable the submit button to prevent repeated clicks | ||
$('.submit-button').attr("disabled", "disabled"); | ||
|
||
Stripe.createToken({ | ||
name: $('.card-name').val(), | ||
number: $('.card-number').val(), | ||
cvc: $('.card-cvc').val(), | ||
exp_month: $('.card-expiry-month').val(), | ||
exp_year: $('.card-expiry-year').val() | ||
}, stripeResponseHandler); | ||
|
||
// prevent the form from submitting with the default action | ||
return false; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.