git ssb

16+

Dominic / patchbay



Tree: f90124ba5ae5f6479370cba8fc7df6744422db23

Files: f90124ba5ae5f6479370cba8fc7df6744422db23 / modules_basic / scroller.js

607 bytesRaw
1const fs = require('fs')
2const h = require('../h')
3
4exports.gives = {
5 build_scroller: true,
6 mcss: true
7}
8
9exports.create = function (api) {
10 return {
11 build_scroller,
12 mcss: () => fs.readFileSync(__filename.replace(/js$/, 'mcss'), 'utf8')
13 }
14
15 function build_scroller ({ prepend = [], append = [] } = {}) {
16 const content = h('section.content')
17
18 const container = h('Scroller', { style: { overflow: 'auto' } }, [
19 h('div.wrapper', [
20 h('header', prepend),
21 content,
22 h('footer', append)
23 ])
24 ])
25
26 return {
27 content,
28 container
29 }
30 }
31}
32
33

Built with git-ssb-web