git ssb

2+

mixmix / ticktack



Tree: d57157b39f34790d26703746a8e99670a52ca85b

Files: d57157b39f34790d26703746a8e99670a52ca85b / app / page / splash.js

1039 bytesRaw
1const nest = require('depnest')
2const { h } = require('mutant')
3const path = require('path')
4
5exports.gives = nest('app.page.splash')
6
7exports.needs = nest({
8 'translations.sync.strings': 'first'
9})
10
11exports.create = (api) => {
12 return nest('app.page.splash', splash)
13
14 function splash (location) {
15 // location is an object { feed, page: 'splash', callback }
16
17 const strings = api.translations.sync.strings()
18
19 const style = {
20 'background-image': assetUrl('splash.svg')
21 }
22
23 return h('Splash', [
24 // h('div.top'),
25 h('div.top', [
26 // h('div.logoName', { style: { 'background-image': assetUrl('logo_and_name.png')} } )
27 h('img.logoName', { src: assetPath('logo_and_name.png') })
28 ]),
29 h('div.bottom', { style }, [
30 h('div.about', strings.splash.about),
31 h('pre.slogan', strings.splash.slogan),
32 ])
33 ])
34 }
35}
36
37function assetPath (name) {
38 return path.join(__dirname, '../../assets', name)
39}
40
41function assetUrl (name) {
42 return `url(${assetPath(name)})`
43}
44

Built with git-ssb-web