2017-11-07 23:54:42 +00:00
|
|
|
const html = require('choo/html');
|
|
|
|
const assets = require('../../common/assets');
|
|
|
|
|
|
|
|
module.exports = function(state, emit) {
|
2018-01-19 23:07:05 +00:00
|
|
|
function clicked() {
|
|
|
|
emit('experiment', { cd3: 'promo' });
|
2017-11-07 23:54:42 +00:00
|
|
|
}
|
2018-01-31 19:46:29 +00:00
|
|
|
let classes = 'banner';
|
|
|
|
switch (state.promo) {
|
|
|
|
case 'blue':
|
|
|
|
classes = 'banner banner-blue';
|
|
|
|
break;
|
|
|
|
case 'pink':
|
|
|
|
classes = 'banner banner-pink';
|
|
|
|
break;
|
|
|
|
}
|
2017-12-05 22:06:40 +00:00
|
|
|
|
2017-11-07 23:54:42 +00:00
|
|
|
return html`
|
2017-12-05 22:06:40 +00:00
|
|
|
<div class="${classes}">
|
2017-11-07 23:54:42 +00:00
|
|
|
<div>
|
|
|
|
<img
|
|
|
|
src="${assets.get('firefox_logo-only.svg')}"
|
|
|
|
class="firefox-logo-small"
|
|
|
|
alt="Firefox"/>
|
|
|
|
<span>Send is brought to you by the all-new Firefox.
|
|
|
|
<a
|
|
|
|
class="link"
|
|
|
|
href="https://www.mozilla.org/firefox/new/?utm_campaign=send-acquisition&utm_medium=referral&utm_source=send.firefox.com"
|
|
|
|
onclick=${clicked}
|
|
|
|
>Download Firefox now ≫</a></span>
|
|
|
|
</div>
|
|
|
|
</div>`;
|
|
|
|
};
|