added background image
This commit is contained in:
parent
fdef37287d
commit
211b1a8576
8 changed files with 47 additions and 8 deletions
10
app/templates/activeBackground/index.js
Normal file
10
app/templates/activeBackground/index.js
Normal 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>`;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue