Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions static/canjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function init() {
function scrollToCurrentMenuItem(){
var currentPageLi = $('li.current');
if(currentPageLi.length){
$('.bottom-left').scrollTop(currentPageLi.offset().top - $('.bottom-left').offset().top);
$('.nav-menu').scrollTop(currentPageLi.offset().top - $('.nav-menu').offset().top);
}
}

Expand Down Expand Up @@ -227,11 +227,11 @@ function navigate(href) {
if (!$content.length) {
window.location.reload();
}
var $nav = $content.find(".bottom-left > ul"),
var $nav = $content.find(".bottom-left .scrollable-contents > ul"),
$article = $content.find("article"),
$breadcrumb = $content.find(".breadcrumb"),
homeLink = $content.find(".logo > a").attr('href'),
$navReplace = $(".bottom-left>ul"),
$navReplace = $(".bottom-left .scrollable-contents > ul"),

//root elements - use .filter; not .find
$pathPrefixDiv = $content.filter("[path-prefix]");
Expand Down
5 changes: 1 addition & 4 deletions static/layout.less
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,8 @@
}
.bottom-left {
flex-grow: 1;
overflow-y: auto;
overflow-x: hidden;
padding: @gutter*2;
padding-bottom: 0;
background: white;
height: inherit;
}
.bottom-right {
flex-grow: 1;
Expand Down
66 changes: 37 additions & 29 deletions static/sidebar.less
Original file line number Diff line number Diff line change
Expand Up @@ -79,40 +79,48 @@ img.social-icon-small{
color: darken(@link-color,10%);
}
// Highest parent level
> ul {
padding-left: 0;
> li {
list-style: none;
list-style-type: none;
padding: 0;
.border-bottom;
> a {
font-size: 110%;
padding-bottom: @gutter;
padding-top: @gutter;
}
&.expanded > a {
padding-bottom: @gutter/3;
}
// Second level
> ul {
.nav-menu {
height: inherit;
overflow-y: scroll;
& > .scrollable-contents {
padding: @gutter*2;
& > ul {
padding: 0;
height: inherit;
> li {
list-style: none;
list-style-type: none;
padding: 0;
.border-bottom;
> a {
padding-bottom: @gutter/3;
padding-top: @gutter/3;
font-size: 110%;
padding-bottom: @gutter;
padding-top: @gutter;
}
&.expanded {
> a {
padding-bottom: @gutter/2;
margin-left: -1px;
}
&.expanded > a {
padding-bottom: @gutter/3;
}
//Third level
// Second level
> ul {
border-left: 1px solid @border-color;
li {
ul {
margin-top: @gutter/3;
> li {
> a {
padding-bottom: @gutter/3;
padding-top: @gutter/3;
}
&.expanded {
> a {
padding-bottom: @gutter/2;
margin-left: -1px;
}
}
//Third level
> ul {
border-left: 1px solid @border-color;
li {
ul {
margin-top: @gutter/3;
}
}
}
}
}
Expand Down
16 changes: 10 additions & 6 deletions templates/content.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@
{{/with}}
</div>
<div class="bottom-left">
<div class="social-side-container">
{{>social.mustache}}
<div class="nav-menu">
<div class="scrollable-contents">
<div class="social-side-container">
{{>social.mustache}}
</div>
{{#with (getCurrentTree)}}
{{>menu.mustache}}
{{/with}}
</div>
</div>
{{#with (getCurrentTree)}}
{{>menu.mustache}}
{{/with}}
{{>search-results.mustache}}
{{>search-results.mustache}}
</div>
</div>
<div id="right" class="column">
Expand Down