diff --git a/r2/r2/public/static/css/goldinfo.less b/r2/r2/public/static/css/goldinfo.less index 83b1f3e1c..cdd86707d 100644 --- a/r2/r2/public/static/css/goldinfo.less +++ b/r2/r2/public/static/css/goldinfo.less @@ -309,13 +309,18 @@ section#about-gold, section#about-gold-partners { line-height: @section-height; margin: 0 45px; padding: 30px 25px; - border-bottom: 1px solid rgba(255,255,255,.65); - &.last { - border-bottom: none; + border-top: 1px solid rgba(255,255,255,.65); + &.first { + border-top: none; + } + + &.ups { + border-bottom: 1px solid; + border-color: rgba(90, 63, 26, 0.7); } h1 { - font-size: 24px; + font-size: 2.2em; font-weight: normal; margin: 0; margin-bottom: .25em; diff --git a/r2/r2/public/static/gold/partner-ups.png b/r2/r2/public/static/gold/partner-ups.png new file mode 100644 index 000000000..e417e228f Binary files /dev/null and b/r2/r2/public/static/gold/partner-ups.png differ diff --git a/r2/r2/public/static/js/gold.js b/r2/r2/public/static/js/gold.js index 7961a6ae8..ffaa56b86 100644 --- a/r2/r2/public/static/js/gold.js +++ b/r2/r2/public/static/js/gold.js @@ -188,7 +188,7 @@ r.gold = { return false }, - claim_gold_partner_deal_code: function (elem, name) { + claim_gold_partner_deal_code: function (elem, name, redirect_url) { $.ajax({ type: 'POST', dataType: 'json', @@ -199,9 +199,13 @@ r.gold = { var $newelem = $('').text(data['explanation']) $(elem).replaceWith($newelem) } else { - var $newelem = $('').attr('value', data['code']) - $(elem).replaceWith($newelem) - $newelem.select() + if (redirect_url) { + window.location.href = redirect_url.replace('{{code}}', data['code']) + } else { + var $newelem = $('').attr('value', data['code']) + $(elem).replaceWith($newelem) + $newelem.select() + } } } }) diff --git a/r2/r2/templates/goldinfopage.html b/r2/r2/templates/goldinfopage.html index a2b040676..304ddbdee 100644 --- a/r2/r2/templates/goldinfopage.html +++ b/r2/r2/templates/goldinfopage.html @@ -102,7 +102,7 @@ _( '# New comment highlighting.\n' "What's new? Highlight which comments are new since the last time you viewed a thread." - ))} + ), "first")} ${feature_item('username-notifications', static('gold/sample-butler.png'), _( @@ -126,6 +126,7 @@
  • ${partner_item('ifixit', 'technological rectifications')}
  • ${partner_item('rover', 'canine accomodation')}
  • ${partner_item('solrepublic', 'acoustic accoutrements')}
  • +
  • ${partner_item('ups', 'logistics provider and gold supporter')}
  • ${feature_item('filter-all', @@ -161,7 +162,7 @@ '# Friends with benefits.\n' 'Add notes to keep track of them all.' ))} -
    +

    Last, but not least:

    • ${_('The Lounge.')} ${_('Access to a super-secret members-only community that may or may not exist.')}
    • diff --git a/r2/r2/templates/goldpartnerspage.html b/r2/r2/templates/goldpartnerspage.html index 6862f22f6..92022f32d 100644 --- a/r2/r2/templates/goldpartnerspage.html +++ b/r2/r2/templates/goldpartnerspage.html @@ -42,7 +42,7 @@ ${less_stylesheet('goldinfo.less')} -<%def name="partner_item(name, how_to_use, img_src, img_url=None, description_md='', extra_class='', button_dest=None, button_label=None)"> +<%def name="partner_item(name, how_to_use, img_src, img_url=None, description_md='', extra_class='', button_dest=None, button_label=None, claim_dest='')"> <%call expr="feature_item(name, img_src, description_md, extra_class, img_url)"> %if c.user.gold:
      @@ -51,9 +51,13 @@ %endif %if button_dest == 'claim': %if name in thing.existing_codes: - + %if not claim_dest: + + %else: + ${button_label or _('claim code')} + %endif %elif c.user.gold: - ${button_label or _('claim code')} + ${button_label or _('claim code')} %endif %elif button_dest: %if c.user.gold: @@ -75,7 +79,8 @@ img_url='http://backblaze.com', description_md='# Backblaze Online Backup\n' '3 months of free service (new accounts only).', - button_dest='claim')} + button_dest='claim', + extra_class='first')} ${partner_item('bartsbakery', "Claim your code below, then enter it as a Coupon code in your cart at http://bartsbakery.com to get 20% off any product.", @@ -176,7 +181,17 @@ 'Creative & elegant gardening solutions. $10 off purchases of $50 or more.', button_dest='claim')} -
      + ${partner_item('ups', + "Claim your code below.", + static('gold/partner-ups.png'), + img_url='https://wwwapps.ups.com/mcdp?loc=en_US&WT.ac=UPS_HS_MyChoiceTab_notice_Mrktg_PX_U1_en_us&WT.mc_id=UPS_HS_MyChoiceTab_notice&WT.svl=BnrMsg', + description_md='# UPS® Logistics Provider and Gold Supporter\n' + '3 months of free premium [UPS My Choice®](https://wwwapps.ups.com/mcdp?loc=en_US&WT.ac=UPS_HS_MyChoiceTab_notice_Mrktg_PX_U1_en_us&WT.mc_id=UPS_HS_MyChoiceTab_notice&WT.svl=BnrMsg) service to make home delivery quick and easy.', + extra_class='ups new', + button_dest='claim', + claim_dest='https://www.ups.com/pea/register?inc={{code}}')} + +
      View official rules for "Golden Tikkit" giveaways

      REDDIT