enable sidebar on mobile移动设备上开启侧栏#1717
Conversation
|
Wow, good addition. See on your blog from mobile in Mist scheme. Sidebar and b2t is work fine, but there is 1 thing: when you click on sidebar - he's slide frm right. Ok. Now, if i click on emty space (in left) - side bar is slideout. Ok. And if i click on "X" button - sidebar is slideout too. But if i want to make slideout sidebar by slide my finger from left to right, there is no effect. U understand what i meaning? Like on Android, for example. Sideout bu slide your finger from any place in sidebar radius. How i think about this option? Also, a later will test it on Pisces scheme. |
|
@ivan-nginx It might be a a little complicate to achieve the material-like sidebar, do you have any idea to make it work? |
|
@flashlab i think about it, Need some time. |
|
@ivan-nginx Any other problem? hope it'll be merged ASAP. |
|
Ok, but need to strongly test it on all schemes to see on bugs. |
|
@ivan-nginx Works fine with Muse and Mist, while pisces has no sidebar. Should be zero-bug if the sidebar keep on the right side. |
|
#1757 implement simple swipable sidebar on touch devices. @ivan-nginx |
ivan-nginx
left a comment
There was a problem hiding this comment.
Need to add some switches.
| </div> | ||
|
|
||
| <aside id="sidebar" class="sidebar"> | ||
| <div id="sidebar-dimmer"></div> |
There was a problem hiding this comment.
Need to add conditional import there:
{% if theme.onmobile %}
<div id="sidebar-dimmer"></div>
{% endif %}
There was a problem hiding this comment.
no need for one line I think.
| @import "sidebar-nav"; | ||
| @import "sidebar-toc"; | ||
|
|
||
| @import "sidebar-dimmer"; |
There was a problem hiding this comment.
Need to add conditional import there:
@import "sidebar-dimmer" if hexo-config('onmobile');
There was a problem hiding this comment.
not necessary consist with the context
|
|
||
| var sidebarToggleMotion = { | ||
| toggleEl: $('.sidebar-toggle'), | ||
| dimmerEl: $('#sidebar-dimmer'), |
There was a problem hiding this comment.
Need to add conditional import there:
if (CONFIG.sidebar.onmobile) {
...
}
There was a problem hiding this comment.
no harmful I think
| isSidebarVisible: false, | ||
| init: function () { | ||
| this.toggleEl.on('click', this.clickHandler.bind(this)); | ||
| this.dimmerEl.on('click', this.clickHandler.bind(this)); |
There was a problem hiding this comment.
Need to add conditional import there:
if (CONFIG.sidebar.onmobile) {
...
}
|
@flashlab and what about Pisces scheme? Looks like sidebar always show at the left side. |
|
@ivan-nginx Pisces has no sidebar, so this'll not work with it. |
|
@flashlab Pisces has sidebar too, but this sidebar not same as on Mist and Muse theme. |
enable sidebar on mobile移动设备上开启侧栏
add a switch
onmobileforsidebarin config.If set, sidebar toggle will display on mobile and tablet view.