git ssb

2+

mixmix / ticktack



Tree: 26ec4bc385c250f6b9b1d0eb534ceaff0f876083

Files: 26ec4bc385c250f6b9b1d0eb534ceaff0f876083 / app / page / splash.js

999 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