diff --git a/server/boot/randomAPIs.js b/server/boot/randomAPIs.js index eeb01d084ab..8daa663b3a2 100644 --- a/server/boot/randomAPIs.js +++ b/server/boot/randomAPIs.js @@ -33,6 +33,8 @@ module.exports = function(app) { router.get('/labs', showLabs); router.get('/stories', showTestimonials); router.get('/shop', showShop); + router.get('/shop/cancel-stickers', cancelStickers); + router.get('/shop/confirm-stickers', confirmStickers); router.get('/all-stories', showAllTestimonials); router.get('/terms', terms); router.get('/privacy', privacy); @@ -224,6 +226,17 @@ module.exports = function(app) { }); } + function confirmStickers(req, res) { + req.flash('success', { msg: 'Thank you for supporting our community! You should receive your stickers in the ' + + 'mail soon!'}); + res.redirect('/shop'); + } + + function cancelStickers(req, res) { + req.flash('info', { msg: 'You\'ve cancelled your purchase of our stickers. You can ' + + 'support our community any time by buying some.'}); + res.redirect('/shop'); + } function submitCatPhoto(req, res) { res.send('Submitted!'); } diff --git a/server/views/resources/shop.jade b/server/views/resources/shop.jade index 7245fe19837..947063b89e6 100644 --- a/server/views/resources/shop.jade +++ b/server/views/resources/shop.jade @@ -3,14 +3,15 @@ block content h1.text-center Shop hr .row - .col-xs-12.col-sm-10.col-sm-offset-1 - .row - .col-xs-12.text-center - a(href='https://teespring.com/free-code-camp-feb' target='_blank') - img.img-responsive.img-center(src='http://i.imgur.com/e50zjNy.jpg') - h3 Free Code Camp "function call" logo t-shirt - h4 100% Cotton. Unisex. $20 shipped. - h4 Only available until February 15. - h5 Are you outside the US? Ships from the EU   - a(href='https://teespring.com/free-code-camp-t-shirt-eu-shop' target='_blank') here - | . \ No newline at end of file + .col-xs-12.col-sm-8.col-sm-offset-2.col-md-6.col-md-offset-3.text-center + img.img-responsive.img-center(src='http://i.imgur.com/MH1CvwY.jpg') + h3 Free Code Camp laptop stickers are here! + h4 Get two for only $5, with free shipping anywhere! + p These durable 2" (5 cm) stickers sport a matte finish, and look great anywhere - especially on your laptop. + html. +
+ + + + +