-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
167 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
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,33 @@ | ||
const hotsauceKey = 'hotsauce2020_redirected' | ||
document.addEventListener('turbolinks:load', function() { | ||
if (localStorage.getItem(hotsauceKey) === '1') { | ||
return | ||
} | ||
|
||
const now = new Date() | ||
if ((now.getMonth() === 2 && now.getDay() === 31) || (now.getMonth() === 3 && now.getDay() <= 7)) { | ||
localStorage.setItem(hotsauceKey, '1') | ||
window.location = '/hot#sauce' | ||
} | ||
}) | ||
|
||
document.addEventListener('click', async function(event) { | ||
const hotsauceButton = event.target.closest('.hotsauce-buy') | ||
if (hotsauceButton === null) { | ||
return | ||
} | ||
|
||
event.preventDefault() | ||
|
||
const stripe = Stripe(process.env.STRIPE_PUBLISHABLE_KEY) | ||
stripe.redirectToCheckout({ | ||
items: [{sku: hotsauceButton.dataset.sku, quantity: 1}], | ||
successUrl: 'https://splits.io/hot?ordered=1#sauce', | ||
cancelUrl: 'https://splits.io/hot?ordered=0#sauce', | ||
clientReferenceId: gon.user && gon.user.id, | ||
customerEmail: gon.user && gon.user.email, | ||
shippingAddressCollection: { | ||
allowedCountries: ['US'], | ||
}, | ||
}) | ||
}) |
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
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,126 @@ | ||
- content_for(:title, 'Hot sauce') | ||
- content_for(:header) | ||
ol.breadcrumb.shadow | ||
li.breadcrumb-item = link_to(site_title, root_path) | ||
li.breadcrumb-item = link_to('Hot Sauce', brand_path) | ||
|
||
div.bg-dark style="width: 100%; height: 100%" | ||
div class="overflow-hidden p-3 p-md-5 text-center bg-white text-dark" style='width: 100%' | ||
a name="sauce" | ||
br | ||
- if params['ordered'] == '1' | ||
.alert.alert-success | ||
' Your hot sauce has been ordered and a receipt has been emailed to you. | ||
- if params['ordered'] == '0' | ||
.alert.alert-warning | ||
' Your hot sauce has not been ordered. Click Buy to proceed. | ||
div class="col-md-8 col-lg-5 p-lg-5 mx-auto my-5" | ||
h1 class="display-4 font-weight-normal" We've done it. | ||
p class="lead font-weight-normal" | ||
' Thanks for helping us on our journey to be the #1 destination for speedrunning analytics. | ||
p class="lead font-weight-normal" | ||
' It's time for us to call it quits, because we've developed and released a singular tool which will supersede all | ||
' our previous efforts. | ||
p class="lead font-weight-normal" | ||
' Introducing | ||
i Race to the Bottom | ||
' : | ||
p class="lead font-weight-normal" | ||
' The Splits.io hot sauce. | ||
p class="lead font-weight-normal" | ||
' Starting at just $15 with free shipping. | ||
button.btn.btn-primary.hotsauce-buy data={sku: ENV['STRIPE_HOTSAUCE_SKU']} Buy now | ||
|
||
.text-secondary.m-5 style='font-size: 3em' = icon('fas', 'arrow-circle-down') | ||
br | ||
br | ||
br | ||
br | ||
br | ||
br | ||
br | ||
br | ||
img.rounded-circle src=asset_path('hotsauce/day.jpg') width=400 | ||
|
||
div class="d-md-flex flex-md-equal w-100 my-md-3 pl-md-3 card-group" | ||
div class="bg-dark mr-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center text-white overflow-hidden card" | ||
div class="my-3 py-3" | ||
h2 class="display-5" It's hot. | ||
p class="lead" Cayenne. Habanero. Chipotle. The big three. | ||
div class="bg-light box-shadow mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0; background: url(#{asset_path('hotsauce/bg.png')})" | ||
|
||
div class="bg-light mr-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center text-dark overflow-hidden card" | ||
div class="my-3 p-3" | ||
h2 class="display-5" It's sauce. | ||
p class="lead" It's made of liquid, so you can pour it on things. | ||
div class="bg-dark box-shadow mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0; background: url(#{asset_path('hotsauce/bg.png')})" | ||
|
||
div class="d-md-flex flex-md-equal w-100 my-md-3 pl-md-3 card-group" | ||
div class="bg-secondary text-dark mr-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center overflow-hidden card" | ||
div class="my-3 p-3" | ||
h2 class="display-5" | ||
' "I force myself to eat this if I don't PB. Now I PB every time!" | ||
br | ||
p class="lead" | ||
i — Glacials | ||
div class="bg-white box-shadow mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0; background: url(#{asset_path('hotsauce/bg.png')})" | ||
|
||
div class="bg-warning text-dark mr-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center overflow-hidden card" | ||
div class="my-3 py-3" | ||
h2 class="display-5" | ||
' "I never thought negative reinforcement could be so cheap!" | ||
br | ||
p class="lead" | ||
i — My brother, as yelled through the bathroom door | ||
div class="bg-white box-shadow mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0; background: url(#{asset_path('hotsauce/bg.png')})" | ||
|
||
div class="d-md-flex flex-md-equal w-100 my-md-3 pl-md-3 card-group" | ||
div class="bg-danger mr-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center overflow-hidden card" | ||
div class="my-3 p-3" | ||
h2 class="display-5" "I used this sauce to force myself to pick up Half-Life: Alyx, but then I delocated my wrist doing an OOB. You'll be hearing from my lawyer." | ||
p class="lead" | ||
i — Former VR speedrunner | ||
div class="bg-white box-shadow mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0; background: url(#{asset_path('hotsauce/bg.png')})" | ||
|
||
div class="bg-light text-dark mr-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center overflow-hidden card" | ||
div class="my-3 py-3" | ||
h2 class="display-5" | ||
' "Yeah it's alright I guess." | ||
br | ||
br | ||
br | ||
p class="lead" | ||
i — Some bozo | ||
div class="bg-white box-shadow mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0; background: url(#{asset_path('hotsauce/bg.png')})" | ||
|
||
div class="d-md-flex flex-md-equal w-100 my-md-3 pl-md-3 card-group" | ||
div class="bg-light mr-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center text-dark overflow-hidden card" | ||
div class="my-3 p-3" | ||
h2 class="display-5" "This is a hot sauce alright, and you can quote me on that." | ||
p class="lead" | ||
i — I forgot this guy's name | ||
div class="bg-white box-shadow mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0; background: url(#{asset_path('hotsauce/bg.png')})" | ||
|
||
div class="bg-dark text-light mr-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center text-dark overflow-hidden card" | ||
div class="my-3 py-3 text-light" | ||
h2 class="display-5" "That guy's name was Jerry." | ||
p class="lead" | ||
i — Wise-ass | ||
div class="bg-white box-shadow mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0; background: url(#{asset_path('hotsauce/bg.png')})" | ||
|
||
.card.text-center.my-5 | ||
img.border.p-2.mx-auto src=asset_path('hotsauce/cloth.jpg') width=400 | ||
.card-body | ||
button.btn.btn-primary.hotsauce-buy data={sku: ENV['STRIPE_HOTSAUCE_SKU']} Buy now | ||
br | ||
a.btn.btn-link href=asset_path('hotsauce/nutrition.jpg') Nutritional facts | ||
br | ||
br | ||
br | ||
br | ||
br | ||
br | ||
br | ||
br | ||
br | ||
br |
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
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