mirror of https://github.com/istio/istio.io.git
292 mobile left nav (#303)
* added links for expandable headings for each of clicking on ipads (touch events try to jump to the nearest <a> tag, so trying to click the expand section would often trigger clicking the first link under it) * fixed jumping back and forth of left nav when initial pageload has short width
This commit is contained in:
parent
07eab3de86
commit
b8b7cba8bc
|
@ -101,4 +101,11 @@
|
|||
.tree-toggle {
|
||||
cursor: pointer;
|
||||
margin-left: -1em;
|
||||
|
||||
.tree-toggle-link{
|
||||
&, &:focus, &:hover{
|
||||
color:#535f61 !important;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -101,11 +101,13 @@ function outputNavBarTree(items) {
|
|||
document.writeln("<li class='doc-side-nav-list-item'>");
|
||||
document.writeln("<label class='tree-toggle'>");
|
||||
document.writeln("<i class='fa fa-lg fa-caret-down'></i>");
|
||||
document.writeln("<a class='tree-toggle-link' href='javascript:void 0;'>");
|
||||
if (item.doc == null) {
|
||||
document.writeln(item.name);
|
||||
} else {
|
||||
document.writeln(item.doc.title);
|
||||
}
|
||||
document.writeln("</a>");
|
||||
document.writeln("</label>");
|
||||
|
||||
if (item.doc.order == 9999) {
|
||||
|
|
|
@ -12,9 +12,10 @@
|
|||
// sidebar.height($('footer').position().top + 50);
|
||||
|
||||
// 992 is the default breakpoint set in Bootstrap 3 for col-md
|
||||
var width = $(document).width();
|
||||
if (width < 992) {
|
||||
sidebar.toggle();
|
||||
sidebarOpen = !sidebarOpen;
|
||||
sidebar.hide();
|
||||
sidebarOpen = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue