Skip to content

Commit

Permalink
Remove promo banner
Browse files Browse the repository at this point in the history
  • Loading branch information
timvisee committed Oct 15, 2020
1 parent 47cf991 commit ce04f16
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 56 deletions.
18 changes: 2 additions & 16 deletions app/ui/body.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,15 @@
const html = require('choo/html');
const Promo = require('./promo');
const Header = require('./header');
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) {
return function(state, emit) {
const b = html`
<body
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()}
${main(state, emit)} ${state.cache(Footer, 'footer').render()}
${state.cache(Header, 'header').render()} ${main(state, emit)}
${state.cache(Footer, 'footer').render()}
</body>
`;
if (state.layout) {
Expand Down
40 changes: 0 additions & 40 deletions app/ui/promo.js

This file was deleted.

0 comments on commit ce04f16

Please sign in to comment.