git ssb

2+

mixmix / ticktack



Tree: e2fb4d766af3a45d510a0558e410b04dd3366e13

Files: e2fb4d766af3a45d510a0558e410b04dd3366e13 / app / page / splash.js

1000 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 svg = assetPath('splash.svg')
20 console.log(svg)
21
22 const style = {
23 'background': require('../../assets/splash-svg.js'),
24 'background-repeat': 'no-repeat',
25 'background-size': 'contain'
26 }
27
28 return h('Splash', [
29 h('div.top', [
30 h('img.logoName', { src: assetPath('logo_and_name.png') })
31 ]),
32 h('div.bottom', { style }, [
33 h('div.about', strings.splash.about),
34 h('pre.slogan', strings.splash.slogan),
35 ])
36 ])
37 }
38}
39
40function assetPath (name) {
41 return path.join(__dirname, '../../assets', name)
42}
43

Built with git-ssb-web