Permalink
Browse files

Bug 1110966 - remove EOY fundraiser homepage takeover

  • Loading branch information...
craigcook committed Jan 3, 2015
1 parent 5388cc6 commit 74d6b4d57d03693a79da5bc0e30aee939a032e68
@@ -334,34 +334,6 @@ <h2>{{ _('Need help?') }}</h2>
<button id="scroll-prompt">{{ _('Discover more') }}</button>
</main>
{% if waffle.switch('fundraiser-home-takeover') and LANG.startswith('en-') %}
<article id="fundraiser-splash">
<div class="container">
<h2 class="main-title">Your Gift Helps</h2>
<h3 class="sub-title">People everywhere are helping us build the Internet the world needs — an Internet where the public good comes first.</h3>
<form id="fundraiser-form" method="get" action="#">
<fieldset>
<p>
<label for="donate35">
<input type="radio" value="35" id="donate35" name="amount" tabindex="1" checked> $35
</label>
<label for="donate25">
<input type="radio" value="25" id="donate25" name="amount" tabindex="1"> $25
</label>
<label for="donate15">
<input type="radio" value="15" id="donate15" name="amount" tabindex="1"> $15
</label>
</p>
<p><a href="{{ donate_url('mozillaorg_takeover') }}#amount-35" id="donate-link" class="submit" tabindex="2">Donate Now</a></p>
</fieldset>
</form>
</div>
<button class="close" type="button">Continue to mozilla.org</button>
</article>
<div id="page-overlay"></div>
{% endif %}
{% endblock %}
{% block email_form %}{% endblock %}
@@ -1157,164 +1157,6 @@ html[lang|="en"] {
}
/****************************************************************************/
// 2014 End of Year Fundraiser takeover
#fundraiser-splash {
display: none;
background: #ffcd02 url('/media/img/home/voices/promos/donate/bg-crowd.png') center bottom no-repeat;
background: url('/media/img/home/voices/promos/donate/bg-crowd.png') center bottom no-repeat,
#ffcd02 -webkit-radial-gradient(#ffe882, #ffcd02);
background: url('/media/img/home/voices/promos/donate/bg-crowd.png') center bottom no-repeat,
#ffcd02 radial-gradient(#ffe882, #ffcd02);
box-shadow: 0 2px 20px rgba(0, 0, 0, .75);
color: @textColorSecondary;
padding-top: 10em;
padding-bottom: 220px;
text-shadow: 0 1px 0 rgba(0, 40, 65, .25);
text-align: center;
width: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 8;
.container {
width: @widthTablet - (@gridGutterWidth * 2);
.clearfix();
margin-left: auto;
margin-right: auto;
padding: 0;
position: relative;
}
.main-title {
color: #e63d2f;
.font-size(72px);
}
.sub-title {
color: @textColorSecondary;
.font-size(28px);
margin-bottom: 1em;
}
label {
display: inline-block;
background: #fff;
padding: 5px 20px;
margin: 0 5px;
border-radius: 6px;
border: 2px solid #fff;
box-shadow: 0 1px 0 rgba(0, 0, 0, .1);
cursor: pointer;
.font-size(32px);
.transition(all .1s ease);
input {
.visually-hidden();
}
&.selected {
border-color: @linkBlue;
color: @linkBlue;
box-shadow: inset 0 0 1px 2px rgba(0, 150, 220, .25),
0 1px 0 rgba(0, 0, 0, .1);
}
}
.submit {
.open-sans;
color: #fff;
background: #e63d2f;
display: inline-block;
border: 0;
border-radius: .5em;
padding: 15px 30px;
min-width: 220px;
text-transform: uppercase;
text-shadow: none;
font-weight: bold;
.font-size(@largeFontSize);
cursor: pointer;
.transition(all .15s ease-in-out);
&:before {
font-family: 'FA-Icons-Home';
content: '\f06b'; // gift
margin-right: 10px;
}
&:hover,
&:focus,
&:active {
color: #fff;
background-color: darken(#e63d2f, 5%);
text-decoration: none;
}
}
.close {
.open-sans;
background: #fff;
background: rgba(255, 255, 255, .92);
border: 0;
color: @linkBlue;
cursor: pointer;
.font-size(@largeFontSize);
font-weight: bold;
text-align: center;
text-transform: uppercase;
padding: 10px 0;
position: absolute;
left: 0;
top: 0;
z-index: 9;
width: 100%;
.transition(all .2s ease);
&:after {
content: '\00BB'; /* raquo */
white-space: nowrap;
border: 1px solid;
border-radius: 50%;
width: 25px;
height: 25px;
display: inline-block;
text-align: center;
margin-left: 10px;
.font-size(20px);
line-height: 1;
}
&:hover,
&:focus {
color: darken(@linkBlue, 10%);
background: #fff;
}
}
}
#page-overlay {
display: none;
background: #666;
background: rgba(0, 0, 0, .7);
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
}
// Tighter spacing for shorter viewports
@media screen and (max-height: 600px) {
#fundraiser-splash {
padding-top: 6em;
padding-bottom: 120px;
}
}
/****************************************************************************/
// @Widescreen styles
@@ -1594,24 +1436,6 @@ html[lang|="en"] {
margin-left: -(@widthSquareGrid_6 - (@gridGutterWidth * 2)) / 2;
}
#fundraiser-splash {
padding-top: 8em;
padding-bottom: 120px;
background-size: 780px 134px, auto auto;
.container {
width: @widthMobileLandscape - (@gridGutterWidth * 2);
}
.main-title {
.font-size(48px);
}
.sub-title {
.font-size(24px);
}
}
}
@media only screen and (min-width: (@widthSquareGrid_4)) {
@@ -1729,28 +1553,6 @@ html[lang|="en"] {
display: none;
}
#fundraiser-splash {
padding-top: 6em;
padding-bottom: 90px;
background-size: 640px 110px, auto auto;
.container {
width: @widthMobile - (@gridGutterWidth * 2);
}
.main-title {
.font-size(36px);
}
.sub-title {
.font-size(20px);
}
label {
.font-size(20px);
}
}
}
/*
Binary file not shown.
@@ -209,75 +209,4 @@ $(function () {
initPromoHover();
}
// End of year fundraising takeover
var $document = $(document);
var $splash = $('#fundraiser-splash');
var splash_height = $splash.height();
var $splash_close = $splash.find('.close');
var $splash_overlay = $('#page-overlay');
if ($splash.length > 0) {
try {
if (sessionStorage.getItem('takeover') !== 'closed') {
$splash.show();
$splash_overlay.show();
}
} catch (ex) {}
$splash_close.on('click', closeSplash);
$splash_overlay.on('click', closeSplash);
// close with escape key
$document.bind('keyup.splash', function(e) {
if (e.which === 27 && $splash.is(':visible')) {
closeSplash();
}
});
}
var $options = $('#fundraiser-form input[name=amount]');
var $donatelink = $('#donate-link');
var donateurl = $donatelink.attr('href');
// Do stuff when an option is selected
var select_option = function(option) {
// Style the selected option (reset all of them first to unstyle previous selection)
$options.parents('label').removeClass('selected');
option.parents('label').addClass('selected');
donateurl = donateurl.split('#')[0] + '#amount-' + option.val();
$donatelink.attr('href', donateurl);
};
$options.on('change', function() {
var $this = $(this);
select_option($this);
});
$options.on('focus', function() {
var $this = $(this);
$options.parents('label').removeClass('selected');
$this.parents('label').addClass('selected');
});
// If an option is checked at pageload, do the selection stuff
var $option_checked = $('#fundraiser-form input[name=amount]:checked');
if ($option_checked.length > 0) {
select_option($option_checked);
}
function closeSplash() {
$splash.animate({
top: '-' + (splash_height + 600)
}, 750, function() {
$splash_overlay.fadeOut().remove();
$splash.remove();
$document.unbind('keyup.splash');
});
try {
sessionStorage.setItem('takeover', 'closed');
} catch (ex) {}
gaTrack(['_trackEvent', 'Homepage Interactions', 'link click', 'Continue to mozilla.org']);
}
});

0 comments on commit 74d6b4d

Please sign in to comment.