Skip to content

Commit

Permalink
adding upton 404 page
Browse files Browse the repository at this point in the history
  • Loading branch information
monaddle committed Oct 23, 2014
1 parent ee14d30 commit d2392cf
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
6 changes: 6 additions & 0 deletions backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,11 @@ def get(self, url_nonce):
template = templates.GetTemplate('upton-update.html')
self.response.write(template.render(template_vars))

class UptonUpdateNoNonceHandler(webapp2.RequestHandler):
def get(self):
template = templates.GetTemplate('upton-update-no-nonce.html')
self.response.write(template.render(template_vars))

class RootRedirectHandler(webapp2.RequestHandler):
def get(self):
self.redirect('/pledge')
Expand All @@ -241,6 +246,7 @@ def get(self):
('/total', GetTotalHandler),
(r'/donation-update/(\w+)', DonationTypeUpdateHandler),
(r'/upton-update/(\w+)', UptonUpdateHandler),
(r'/upton-update/', UptonUpdateNoNonceHandler),
(r'/user-update/(\w+)', UserUpdateHandler),
(r'/user-info/(\w+)', UserInfoHandler),
('/campaigns/may-one/?', EmbedHandler),
Expand Down
30 changes: 30 additions & 0 deletions markup/upton-update-no-nonce.jade.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
doctype html
html
head
include includes/upton-head
script(type='text/javascript')
function SetTweet(){
var tweets = ["I%20support%20ending%20@RepFredUpton's%20corruption%20in%20DC%20with%20my%20%24{{amount_donations}}%20for%20@MAYDAYUS.%20Uncover%20the%20%23MI06%20scandal%20@HPMatuszak%20@HeraldPalladium",
".@runkdavi%20cover%20the%20corruption!%20Political%20bullying%20has%20got%20to%20go%20-%20I’m%20earmarking%20my%20%24{{amount_donations}}%20for%20@MAYDAYUS%20to%20beat%20Upton%20in%20%23MI06",
"Stop%20@RepFredUpton’s%20intimidation%20-%20I%20support%20@MAYDAYUS%20using%20my%20%24{{amount_donations}}%20in%20%23MI06%20to%20end%20corruption.%20check%20out%20the%20story%20@DarrenGoode",
"I’m%20a%20@MAYDAYUS%20donor%20too%20@RepFredUpton%20and%20my%20%24{{amount_donations}}%20is%20going%20to%20%23MI06%20uncover%20the%20intimidation%20tactics%20@Kzoo_Gazette"]
var tweet = tweets[Math.random()*tweets.length|0]
document.getElementsByClassName('twitter')[0].href = "https://twitter.com/home?status=" + tweet;
}

body(id="donation_update", onload="SetTweet()")
.container
.page-header
br
h1 Thanks – just one more step for fighting corruption
.row
.col-md-12
p We're sorry, but we're unable to find your previous donation. The most important thing is to
b help us stir up some buzz by Tweeting your support at Michigan reporters and let's make Fred Upton feel the heat in the media.
p Click on the button below to Tweet your support. We've written one for you (you can change it, of course!) that tags specific reporters and papers in Michigan so they'll cover the story.
.spacing
.row
.col-md-12
div(class="social-icons")
a(class="twitter", style="font-weight:700;font-size:30px;font-family:'Roboto', 'Questrial',sans;", href='https://twitter.com/home?status=My%20${{amount_donations}}%20pledged%20to%20%23MAYDAY.US%20can%20be%20used%20to%20take%20down%20corrupt%20congressman%20Upton') Tweet This!
include includes/footer

0 comments on commit d2392cf

Please sign in to comment.