Commit 9746cd345f014701f5911b233fe5aec3e3c52edb
sidebar
Joran committed on 12/18/2016, 1:13:21 AMParent: c1a44a1e45c1d9025cd6a94287b4d01a93c37d64
Files changed
modules_basic/avatar-edit.js | changed |
modules_basic/avatar-profile.js | changed |
modules_basic/thread.js | changed |
modules_core/app.js | changed |
modules_core/message-confirm.js | changed |
modules_core/tabs.js | changed |
style.css | changed |
modules_basic/avatar-edit.js | ||
---|---|---|
@@ -49,9 +49,9 @@ | ||
49 | 49 … | exports.create = function (api) { |
50 | 50 … | return function (id) { |
51 | 51 … | |
52 | 52 … | var img = visualize(new Buffer(id.substring(1), 'base64'), 256) |
53 | - img.classList.add('avatar--large') | |
53 … | + img.classList.add('avatar') | |
54 | 54 … | |
55 | 55 … | var lb = hyperlightbox() |
56 | 56 … | var name_input = h('input', {placeholder: 'rename'}) |
57 | 57 … | var name = api.avatar_name(id) |
@@ -83,9 +83,9 @@ | ||
83 | 83 … | ev.preventDefault() |
84 | 84 … | selected = image |
85 | 85 … | img.src = api.blob_url(image.link || image) |
86 | 86 … | }}, |
87 | - h('img.avatar--thumbnail', {src: api.blob_url(image)}) | |
87 … | + h('img.avatar', {src: api.blob_url(image)}) | |
88 | 88 … | ) |
89 | 89 … | ) |
90 | 90 … | }) |
91 | 91 … | ) |
modules_basic/avatar-profile.js | ||
---|---|---|
@@ -31,9 +31,9 @@ | ||
31 | 31 … | |
32 | 32 … | exports.create = function (api) { |
33 | 33 … | |
34 | 34 … | function image_link (id) { |
35 | - return api.avatar_image_link(id, 'thumbnail') | |
35 … | + return api.avatar_image_link(id, 'avatar') | |
36 | 36 … | } |
37 | 37 … | |
38 | 38 … | return function (id) { |
39 | 39 … | |
@@ -84,5 +84,4 @@ | ||
84 | 84 … | ) |
85 | 85 … | } |
86 | 86 … | |
87 | 87 … | } |
88 | - |
modules_basic/thread.js | ||
---|---|---|
@@ -73,9 +73,9 @@ | ||
73 | 73 … | root: id, |
74 | 74 … | branch: id //mutated when thread is loaded. |
75 | 75 … | } |
76 | 76 … | |
77 | - var content = h('div.column.scroller__content') | |
77 … | + var content = h('div.scroller__content') | |
78 | 78 … | var div = h('div.column.scroller', |
79 | 79 … | {style: {'overflow-y': 'auto'}}, |
80 | 80 … | h('div.scroller__wrapper', |
81 | 81 … | content, |
modules_core/app.js | |||
---|---|---|---|
@@ -8,8 +8,10 @@ | |||
8 | 8 … | return function () { | |
9 | 9 … | ||
10 | 10 … | document.head.appendChild(h('link', {rel: "stylesheet", href:"dev-style.css"})) | |
11 | 11 … | ||
12 … | + document.head.appendChild(h('link', {rel: "stylesheet", href:"https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"})) | ||
13 … | + | ||
12 | 14 … | document.head.appendChild(h('script', {src: "https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"})) | |
13 | 15 … | document.head.appendChild(h('script', {src: "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"})) | |
14 | 16 … | ||
15 | 17 … | document.head.appendChild(h('style', require('../style.css.json'))) | |
@@ -27,18 +29,36 @@ | |||
27 | 29 … | ||
28 | 30 … | console.log(hash() || 'tabs') | |
29 | 31 … | var view = api.screen_view(hash() || 'tabs') | |
30 | 32 … | ||
31 | - var screen = h('div.screen.column', view) | ||
33 … | + var sidebar = h("div#sidebar.column.col-sm-2.col-xs-1.sidebar-offcanvas", | ||
34 … | + [ h("ul.nav", [ | ||
35 … | + h("li", [ h("a.visible-xs.text-center", {"attributes":{"href":"#"},"dataset":{"toggle":"offcanvas"}}, [ h("i.glyphicon.glyphicon-chevron-right") ]) ]) ]), | ||
36 … | + h("ul#lg-menu.nav.hidden-xs", [ | ||
37 … | + h("li.active", [ h("a", {"attributes":{"href":"#featured"}}, [ h("i.glyphicon.glyphicon-list-alt"), " Featured" ]) ]), | ||
38 … | + h("li", [ h("a", {"attributes":{"href":"#stories"}}, [ h("i.glyphicon.glyphicon-list"), " Stories" ]) ]), | ||
39 … | + h("li", [ h("a", {"attributes":{"href":"#"}}, [ h("i.glyphicon.glyphicon-paperclip"), " Saved" ]) ]), | ||
40 … | + h("li", [ h("a", {"attributes":{"href":"#"}}, [ h("i.glyphicon.glyphicon-refresh"), " Refresh" ]) ]) ]), | ||
41 … | + h("ul#sidebar-footer.list-unstyled.hidden-xs", | ||
42 … | + [ h("li", [ h("a", {"attributes":{"href":"http://ssbc.github.io"}}, [ h("h3", [ "SSBC Patchbay" ]), " "]) ]) ]), | ||
32 | 43 … | ||
44 … | + h("ul#xs-menu.nav.visible-xs", [ "\t", | ||
45 … | + h("li", [ h("a.text-center", {"attributes":{"href":"#featured"}}, [ h("i.glyphicon.glyphicon-list-alt") ]) ]), | ||
46 … | + h("li", [ h("a.text-center", {"attributes":{"href":"#stories"}}, [ h("i.glyphicon.glyphicon-list") ]) ]), "\t", | ||
47 … | + h("li", [ h("a.text-center", {"attributes":{"href":"#"}}, [ h("i.glyphicon.glyphicon-paperclip") ]) ]), | ||
48 … | + h("li", [ h("a.text-center", {"attributes":{"href":"#"}}, [ h("i.glyphicon.glyphicon-refresh") ]) ]) ]) ]) | ||
49 … | + | ||
50 … | + var screen = h('div.screen.column.col-sm-10.col-xs-11', view) | ||
51 … | + | ||
33 | 52 … | window.onhashchange = function (ev) { | |
34 | 53 … | var _view = view | |
35 | 54 … | view = api.screen_view(hash() || 'tabs') | |
36 | 55 … | ||
37 | 56 … | if(_view) screen.replaceChild(view, _view) | |
38 | 57 … | else document.body.appendChild(view) | |
39 | 58 … | } | |
40 | 59 … | ||
60 … | + document.body.appendChild(sidebar) | ||
41 | 61 … | document.body.appendChild(screen) | |
42 | 62 … | ||
43 | 63 … | return screen | |
44 | 64 … | } |
modules_core/message-confirm.js | ||
---|---|---|
@@ -36,9 +36,9 @@ | ||
36 | 36 … | content: content |
37 | 37 … | } |
38 | 38 … | } |
39 | 39 … | |
40 | - var okay = h('button.btn.btn-primary', 'okay', {onclick: function () { | |
40 … | + var okay = h('button.btn.btn-primary', 'Send', {onclick: function () { | |
41 | 41 … | lb.remove() |
42 | 42 … | api.publish(content, cb) |
43 | 43 … | }}) |
44 | 44 … | |
@@ -53,10 +53,10 @@ | ||
53 | 53 … | |
54 | 54 … | lb.show(h('div.column.message-confirm', |
55 | 55 … | h('div.panel.panel-default', |
56 | 56 … | h('div.panel-heading', |
57 | - h('div.avatar', api.avatar(msg.value.author, 'avatar')), | |
58 | - h('div.message_meta.row', api.message_meta(msg)) | |
57 … | + h('div.message_meta.pull-right', api.message_meta(msg)), | |
58 … | + h('div.avatar', api.avatar(msg.value.author, 'avatar')) | |
59 | 59 … | ), |
60 | 60 … | h('div.panel-body', api.message_content(msg) |
61 | 61 … | || h('pre', JSON.stringify(msg, null, 2))) |
62 | 62 … | ), |
modules_core/tabs.js | ||
---|---|---|
@@ -57,9 +57,9 @@ | ||
57 | 57 … | }) |
58 | 58 … | |
59 | 59 … | //reposition hypertabs menu to inside a container... |
60 | 60 … | tabs.insertBefore( |
61 | - h('nav.navbar.navbar-default', | |
61 … | + h('nav.navbar.navbar-blue.navbar-static-top', | |
62 | 62 … | h('div.container-fluid', tabs.firstChild, //tabs |
63 | 63 … | search, api.menu()) |
64 | 64 … | ), tabs.firstChild) |
65 | 65 … | // tabs.insertBefore(search, tabs.firstChild.nextSibling) |
style.css | ||
---|---|---|
The diff is too large to show. Use a local git client to view these changes. Old file size: 129175 bytes New file size: 129607 bytes |
Built with git-ssb-web