mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 00:07:57 -05:00
Gold partners: add UPS
This commit is contained in:
committed by
Neil Williams
parent
83d03f17a1
commit
3e699d5253
@@ -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;
|
||||
|
||||
BIN
r2/r2/public/static/gold/partner-ups.png
Normal file
BIN
r2/r2/public/static/gold/partner-ups.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
@@ -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 = $('<span class="error">').text(data['explanation'])
|
||||
$(elem).replaceWith($newelem)
|
||||
} else {
|
||||
var $newelem = $('<input type="text" class="code" readonly="readonly">').attr('value', data['code'])
|
||||
$(elem).replaceWith($newelem)
|
||||
$newelem.select()
|
||||
if (redirect_url) {
|
||||
window.location.href = redirect_url.replace('{{code}}', data['code'])
|
||||
} else {
|
||||
var $newelem = $('<input type="text" class="code" readonly="readonly">').attr('value', data['code'])
|
||||
$(elem).replaceWith($newelem)
|
||||
$newelem.select()
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -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 @@
|
||||
<li>${partner_item('ifixit', 'technological rectifications')}</li>
|
||||
<li>${partner_item('rover', 'canine accomodation')}</li>
|
||||
<li>${partner_item('solrepublic', 'acoustic accoutrements')}</li>
|
||||
<li>${partner_item('ups', 'logistics provider and gold supporter')}</li>
|
||||
</ul>
|
||||
</section>
|
||||
${feature_item('filter-all',
|
||||
@@ -161,7 +162,7 @@
|
||||
'# Friends with benefits.\n'
|
||||
'Add notes to keep track of them all.'
|
||||
))}
|
||||
<section id="other-benefits" class="etc last">
|
||||
<section id="other-benefits" class="etc">
|
||||
<h1>Last, but not least:</h1>
|
||||
<ul>
|
||||
<li><strong>${_('The Lounge.')}</strong> ${_('Access to a super-secret members-only community that may or may not exist.')}</li>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
${less_stylesheet('goldinfo.less')}
|
||||
</%def>
|
||||
|
||||
<%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:
|
||||
<div class="how-to-use">
|
||||
@@ -51,9 +51,13 @@
|
||||
%endif
|
||||
%if button_dest == 'claim':
|
||||
%if name in thing.existing_codes:
|
||||
<input class="code" type="text" value="${thing.existing_codes[name]}" readonly="readonly">
|
||||
%if not claim_dest:
|
||||
<input class="code" type="text" value="${thing.existing_codes[name]}" readonly="readonly">
|
||||
%else:
|
||||
<a class="claim-code-button" href="${claim_dest.replace('{{code}}', thing.existing_codes[name])}">${button_label or _('claim code')}</a>
|
||||
%endif
|
||||
%elif c.user.gold:
|
||||
<a class="claim-code-button" onclick="r.gold.claim_gold_partner_deal_code(this, '${name}')">${button_label or _('claim code')}</a>
|
||||
<a class="claim-code-button" onclick="r.gold.claim_gold_partner_deal_code(this, '${name}', '${claim_dest}')">${button_label or _('claim code')}</a>
|
||||
%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')}
|
||||
|
||||
<section id="terms" class="etc last">
|
||||
${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}}')}
|
||||
|
||||
<section id="terms" class="etc" style="border-top: none">
|
||||
<a href="#terms" onclick="$('#giveaway-rules').toggle()">View official rules for "Golden Tikkit" giveaways</a>
|
||||
<div id="giveaway-rules">
|
||||
<h2>REDDIT</h2>
|
||||
|
||||
Reference in New Issue
Block a user