diff --git a/_includes/sidebar.html b/_includes/sidebar.html index 88ffa02d..3bf203d0 100644 --- a/_includes/sidebar.html +++ b/_includes/sidebar.html @@ -6,17 +6,26 @@ Liquid {% endif %} - {% assign sections = "basics, tags, filters" | split: ", " %} - {% for section in sections %} - {{ section | capitalize }} + {%- assign sections = "basics, tags, filters" | split: ", " -%} - - {% for item in site.pages %}{% if item.url contains section/ %}{% unless item.path contains "index" %} - {{ item.title }} - {% endunless %}{% endif %}{% endfor %} - - {% endfor %} + + + {%- for section in sections -%} + {{ section | capitalize }} + + {%- for item in site.pages -%} + {%- if item.url contains section/ -%} + {%- unless item.path contains "index" -%} + + {{ item.title }} + + {%- endunless -%} + {%- endif -%} + {%- endfor -%} + + {%- endfor -%} + - + \ No newline at end of file diff --git a/_sass/modules/_layout.scss b/_sass/modules/_layout.scss index 165dc224..2ac50c7c 100644 --- a/_sass/modules/_layout.scss +++ b/_sass/modules/_layout.scss @@ -1,4 +1,3 @@ - $sidebar-width: 250px; $logo-height: 130px; $wrapper-width: 800px; @@ -95,34 +94,16 @@ body { } .sidebar__nav { - padding: $spacing-unit $spacing-unit ($spacing-unit + $logo-height); // Add a bit more padding at the bottom for consistency. + font-weight: bold; max-height: 100%; - overflow-y: scroll; - - li { - list-style: none; - - a { - color: $color-white; - - &:hover { - text-decoration: none; - } - } - } + overflow-y: auto; } -.section { - margin: 0px; - - > li { - margin-bottom: $spacing-unit / 2; - - &:last-child { - margin-bottom: $spacing-unit; - } - } +.sidebar__nav-interior { + height: 100%; + // Add a bit more padding at the bottom for consistency. + padding: $spacing-unit $spacing-unit ($spacing-unit + $logo-height); } .section__header { @@ -131,13 +112,22 @@ body { color: $color-white; margin-top: 0; margin-bottom: $spacing-unit / 4; + + .section__links + & { + margin-top: $spacing-unit; + } } .section__links { - margin-left: $spacing-unit / 2; - margin-bottom: $spacing-unit; - font-weight: normal; font-size: 0.9em; + font-weight: normal; + + list-style: none; + margin-left: $spacing-unit / 2; +} + +.section__item { + list-style: none; } .section__link { @@ -145,13 +135,26 @@ body { margin-top: $spacing-unit/4; opacity: 0.75; text-decoration: none; + color: $color-white; &:hover { opacity: 1; + text-decoration: none; + } + + &:empty { + // there is an error in the liquid logic that spits out a + // empty last-child + display: none; + } + + &:visited { + color: $color-white; } } .section__link--is-active { font-weight: bold; opacity: 1; + color: $color-white; }