git ssb

2+

mixmix / ticktack



Commit f4097436ca51813b562fc191008b76f8bcb6c71b

sidebar tweaks

mix irving committed on 1/30/2018, 4:49:38 AM
Parent: f8a1584b10d1efe0f61f8a5aa9c5ac472da2dd42

Files changed

app/html/sideNav/sideNavDiscovery.jschanged
app/page/blogShow.jschanged
app/page/blogShow.mcsschanged
app/html/sideNav/sideNavDiscovery.jsView
@@ -17,8 +17,9 @@
1717 'about.obs.name': 'first',
1818 'feed.pull.private': 'first',
1919 'keys.sync.id': 'first',
2020 'history.sync.push': 'first',
21+ 'history.obs.store': 'first',
2122 'message.html.subject': 'first',
2223 'sbot.obs.localPeers': 'first',
2324 'translations.sync.strings': 'first',
2425 'unread.sync.isUnread': 'first'
@@ -39,9 +40,23 @@
3940 },
4041 'app.html.sideNav': sideNav,
4142 })
4243
44+ function isMatch (location) {
45+ if (location.page) {
46+ if (location.page.match(/^blog/)) return true
47+ if (location.page.match(/^thread/)) return true
48+ if (location.page.match(/^user/)) return true
49+ }
50+ if (location.key) {
51+ return true
52+ }
53+ return false
54+ }
55+
4356 function sideNav (location) {
57+ if (!isMatch(location)) return
58+
4459 const strings = api.translations.sync.strings()
4560 const myKey = api.keys.sync.id()
4661
4762 var nearby = api.sbot.obs.localPeers()
app/page/blogShow.jsView
@@ -39,9 +39,9 @@
3939
4040 const { timeago, channel, markdown, compose } = api.message.html
4141
4242 return h('Page -blogShow', [
43- api.app.html.sideNav({ page: 'discover' }), // HACK to highlight discover
43+ api.app.html.sideNav({ page: 'blogShow' }), // HACK to highlight discover
4444 h('Scroller.content', [
4545 h('section.top', [
4646 api.app.html.topNav(location)
4747 ]),
app/page/blogShow.mcssView
@@ -82,8 +82,9 @@
8282 }
8383 }
8484
8585 section.blog {
86+ flex-basis: 100%
8687 $backgroundPrimaryText
8788 padding: 1.5rem
8889
8990 margin-bottom: 1.5rem

Built with git-ssb-web