Commit 35e506868ea54929c5978b29572a923888e2518d
start of blogSearch
mix irving committed on 11/18/2017, 12:10:53 AMParent: b97fb441a1afa288d695acd468056c823a35bf00
Files changed
app/html/blogHeader.js | added |
app/index.js | changed |
app/html/blogHeader.js | ||
---|---|---|
@@ -1,0 +1,28 @@ | ||
1 | +const nest = require('depnest') | |
2 | +const { h, computed, when } = require('mutant') | |
3 | +const get = require('lodash/get') | |
4 | + | |
5 | +exports.gives = nest('app.html.blogHeader') | |
6 | + | |
7 | +exports.needs = nest({ | |
8 | + 'app.html.link': 'first', | |
9 | + 'translation.sync.strings': 'first', | |
10 | +}) | |
11 | + | |
12 | +exports.create = (api) => { | |
13 | + return nest('app.html.blogHeader', (location) => { | |
14 | + const strings = api.translation.sync.strings() | |
15 | + const Link = api.app.html.link | |
16 | + | |
17 | + if (location.page === 'blogShow') { | |
18 | + return h('div.left', Link()) | |
19 | + | |
20 | + | |
21 | + } | |
22 | + | |
23 | + return h('BlogHeader', [ | |
24 | + | |
25 | + ]) | |
26 | + }) | |
27 | +} | |
28 | + |
app/index.js | ||
---|---|---|
@@ -8,8 +8,9 @@ | ||
8 | 8 | header: require('./html/header'), |
9 | 9 | thread: require('./html/thread'), |
10 | 10 | link: require('./html/link'), |
11 | 11 | blogCard: require('./html/blog-card'), |
12 | + blogHeader: require('./html/blogHeader'), | |
12 | 13 | }, |
13 | 14 | page: { |
14 | 15 | blogIndex: require('./page/blogIndex'), |
15 | 16 | blogNew: require('./page/blogNew'), |
Built with git-ssb-web