Remove promo banner
This commit is contained in:
parent
47cf99140a
commit
ce04f162a4
@ -1,29 +1,15 @@
|
|||||||
const html = require('choo/html');
|
const html = require('choo/html');
|
||||||
const Promo = require('./promo');
|
|
||||||
const Header = require('./header');
|
const Header = require('./header');
|
||||||
const Footer = require('./footer');
|
const Footer = require('./footer');
|
||||||
|
|
||||||
function banner(state) {
|
|
||||||
if (state.layout) {
|
|
||||||
return; // server side
|
|
||||||
}
|
|
||||||
const show =
|
|
||||||
!state.capabilities.standalone &&
|
|
||||||
!state.route.startsWith('/unsupported/') &&
|
|
||||||
state.locale === 'en-US';
|
|
||||||
if (show) {
|
|
||||||
return state.cache(Promo, 'promo').render();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = function body(main) {
|
module.exports = function body(main) {
|
||||||
return function(state, emit) {
|
return function(state, emit) {
|
||||||
const b = html`
|
const b = html`
|
||||||
<body
|
<body
|
||||||
class="flex flex-col items-center font-sans md:h-screen md:bg-grey-10 dark:bg-black"
|
class="flex flex-col items-center font-sans md:h-screen md:bg-grey-10 dark:bg-black"
|
||||||
>
|
>
|
||||||
${banner(state, emit)} ${state.cache(Header, 'header').render()}
|
${state.cache(Header, 'header').render()} ${main(state, emit)}
|
||||||
${main(state, emit)} ${state.cache(Footer, 'footer').render()}
|
${state.cache(Footer, 'footer').render()}
|
||||||
</body>
|
</body>
|
||||||
`;
|
`;
|
||||||
if (state.layout) {
|
if (state.layout) {
|
||||||
|
@ -1,40 +0,0 @@
|
|||||||
const html = require('choo/html');
|
|
||||||
const Component = require('choo/component');
|
|
||||||
const assets = require('../../common/assets');
|
|
||||||
|
|
||||||
class Promo extends Component {
|
|
||||||
constructor(name, state) {
|
|
||||||
super(name);
|
|
||||||
this.state = state;
|
|
||||||
}
|
|
||||||
|
|
||||||
update() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
createElement() {
|
|
||||||
return html`
|
|
||||||
<send-promo
|
|
||||||
class="w-full flex-row items-center content-center justify-center bg-white text-grey-80 px-4 py-3 flex border-b border-grey-banner leading-normal dark:bg-grey-90 dark:text-grey-20 dark:border-grey-80"
|
|
||||||
>
|
|
||||||
<div class="flex items-center mx-auto">
|
|
||||||
<img
|
|
||||||
src="${assets.get('master-logo.svg')}"
|
|
||||||
class="w-6 h-6"
|
|
||||||
alt="Firefox"
|
|
||||||
/>
|
|
||||||
<span class="ml-2 sm:ml-4 text-xs sm:text-base">
|
|
||||||
${`Like Firefox Send? You'll love our new full-device VPN. `}
|
|
||||||
<a
|
|
||||||
class="underline link-blue"
|
|
||||||
href="https://vpn.mozilla.org/?utm_source=send.firefox.com&utm_medium=referral&utm_content=Try+Firefox+Private+Network&utm_campaign=top-bar"
|
|
||||||
>${`Get it today`}</a
|
|
||||||
>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</send-promo>
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = Promo;
|
|
Loading…
Reference in New Issue
Block a user