added background image

This commit is contained in:
Danny Coates 2018-06-19 12:58:42 -07:00
parent fdef37287d
commit 211b1a8576
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
8 changed files with 47 additions and 8 deletions

View file

@ -0,0 +1,10 @@
const html = require('choo/html');
const assets = require('../../../common/assets');
module.exports = function() {
const backgrounds = assets.match(/background/);
const src = backgrounds[Math.floor(Math.random() * backgrounds.length)];
return html`<div class="background">
<img src="${src}">
</div>`;
};