2017-11-08 00:54:42 +01:00
|
|
|
const html = require('choo/html');
|
2018-02-13 20:32:59 +01:00
|
|
|
const assets = require('../../../common/assets');
|
2017-11-08 00:54:42 +01:00
|
|
|
|
|
|
|
module.exports = function(state, emit) {
|
2018-02-13 20:32:59 +01:00
|
|
|
let classes = 'fxPromo';
|
2018-01-31 20:46:29 +01:00
|
|
|
switch (state.promo) {
|
|
|
|
case 'blue':
|
2018-02-13 20:32:59 +01:00
|
|
|
classes = 'fxPromo fxPromo--blue';
|
2018-01-31 20:46:29 +01:00
|
|
|
break;
|
|
|
|
case 'pink':
|
2018-02-13 20:32:59 +01:00
|
|
|
classes = 'fxPromo fxPromo--pink';
|
2018-01-31 20:46:29 +01:00
|
|
|
break;
|
|
|
|
}
|
2017-12-05 23:06:40 +01:00
|
|
|
|
2017-11-08 00:54:42 +01:00
|
|
|
return html`
|
2017-12-05 23:06:40 +01:00
|
|
|
<div class="${classes}">
|
2017-11-08 00:54:42 +01:00
|
|
|
<div>
|
|
|
|
<img
|
|
|
|
src="${assets.get('firefox_logo-only.svg')}"
|
2018-02-13 20:32:59 +01:00
|
|
|
class="fxPromo__logo"
|
2017-11-08 00:54:42 +01:00
|
|
|
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>`;
|
2018-02-16 21:56:53 +01:00
|
|
|
|
|
|
|
function clicked() {
|
|
|
|
emit('experiment', { cd3: 'promo' });
|
|
|
|
}
|
2017-11-08 00:54:42 +01:00
|
|
|
};
|