mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-09 08:15:11 +03:00
added striped box
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
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)];
|
||||
module.exports = function(state) {
|
||||
if (!state.backgroundUrl) {
|
||||
const backgrounds = assets.match(/background/);
|
||||
state.backgroundUrl =
|
||||
backgrounds[Math.floor(Math.random() * backgrounds.length)];
|
||||
}
|
||||
|
||||
return html`<div class="background">
|
||||
<img src="${src}">
|
||||
<img src="${state.backgroundUrl}">
|
||||
</div>`;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user