git ssb

2+

mixmix / ticktack



Commit 1239690dc41098bef2ddfd0f321e54dc0ab27fd7

sneak blog filter in above scroller content with insertBefore

mix irving committed on 6/2/2018, 12:33:07 PM
Parent: 0d85d682b95d0df9f77c9c798d1070cca80470e3

Files changed

app/html/scroller.jschanged
app/html/scroller.mcsschanged
app/page/blogIndex.jschanged
app/page/blogIndex.mcsschanged
package-lock.jsonchanged
package.jsonchanged
app/html/scroller.jsView
@@ -28,9 +28,15 @@
2828 next(stream, { live: false, reverse: true, limit: 100, property: indexProperty }),
2929 filter()
3030 )
3131
32- return Scroller(Object.assign({}, opts, { streamToTop, streamToBottom }))
32+ const _opts = Object.assign(
33+ { overflowY: 'auto' }, // TODO check across app what makes better default
34+ opts,
35+ { streamToTop, streamToBottom }
36+ )
37+
38+ return Scroller(_opts)
3339 // valid Scroller opts : see github.com/mixmix/mutant-scroll
3440 // classList = [],
3541 // prepend = [],
3642 // append = [],
@@ -40,6 +46,7 @@
4046 // updateTop = updateTopDefault,
4147 // updateBottom = updateBottomDefault,
4248 // store = MutantArray(),
4349 // cb = (err) => { if (err) throw err }
50+ // overflowY = 'scroll'
4451 }
4552 }
app/html/scroller.mcssView
@@ -1,6 +1,6 @@
11 Scroller {
2- overflow: auto
2+ overflow-y: scroll
33 width: 100%
44 /* height: 100% */
55 min-height: 0px
66
app/page/blogIndex.jsView
@@ -38,9 +38,9 @@
3838 var blogs = Scroller({
3939 classList: ['content'],
4040 prepend: [
4141 api.app.html.topNav(location),
42- Filters()
42+ // Filters()
4343 ],
4444 streamToTop: Source({ reverse: false, live: true, old: false, limit: 20 }, api, filter),
4545 streamToBottom: Source({ reverse: true, live: false, limit: 20 }, api, filter),
4646 updateTop: update,
@@ -48,8 +48,11 @@
4848 store: blogsCache,
4949 render
5050 })
5151
52+ // HACK
53+ blogs.insertBefore(Filters(), blogs.querySelector('.content'))
54+
5255 function Filters () {
5356 const goTo = (loc) => () => api.history.sync.push(loc)
5457 return h('Filters', [
5558 h('span -filter', {
app/page/blogIndex.mcssView
@@ -25,16 +25,16 @@
2525 }
2626 }
2727
2828 Filters {
29- background-color: #f1f1f1
29+ $maxWidth
30+ padding: 0 2rem
31+ margin: .8rem auto
3032
3133 font-size: .8rem
3234 text-transform: uppercase
3335 letter-spacing: 1.4px
3436
35- padding: .5rem 0 .5rem .5rem
36-
3737 display: grid
3838 grid-template-columns: 4rem 0rem 10rem 0rem 7rem
3939 justify-items: center
4040
package-lock.jsonView
The diff is too large to show. Use a local git client to view these changes.
Old file size: 284705 bytes
New file size: 282870 bytes
package.jsonView
@@ -40,9 +40,9 @@
4040 "medium-editor-markdown": "^2.6.0",
4141 "micro-css": "^2.0.1",
4242 "morphdom": "^2.3.3",
4343 "mutant": "^3.22.1",
44- "mutant-scroll": "0.0.5",
44+ "mutant-scroll": "0.0.6",
4545 "open-external": "^0.1.1",
4646 "patch-drafts": "0.0.6",
4747 "patch-history": "^1.0.0",
4848 "patch-profile": "^1.0.4",

Built with git-ssb-web