-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy path_sidebar.haml
More file actions
executable file
·27 lines (23 loc) · 1.36 KB
/
_sidebar.haml
File metadata and controls
executable file
·27 lines (23 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
%aside.sidebar
%header.header
.bucket.bucket--flag
.bucket-media
= image_tag 'logo.svg', alt: 'MVCSS', class: 'header-logo', width: '100', height: '110'
.bucket-content
%p.h1.header-title= link_to data.leo.title, '/index.html'
%p.header-version Version 4.1.1
= link_to 'View on GitHub', 'http://github.com/mvcss/mvcss', class: 'sidebar-btn'
%nav.sidebar-nav
- get_pages.each do |page|
- unless is_excluded_page(page)
= link_to page.data.title, "/#{page.path}", class: (is_page_active(page.url) ? 'sidebar-link is-active' : 'sidebar-link')
- else
- if page.data.children?
= link_to page.data.title, "/#{page.path}", class: (is_page_active(page.url) ? 'sidebar-link sidebar-link--parent is-active' : 'sidebar-link')
.sidebar-nav-sub{ class: ('is-active' if is_parent_page_active(page.url))}
- get_nested_pages(page.data.title).each do |nested_page|
= link_to nested_page.data.title, "/#{nested_page.path}", class: (is_page_active(nested_page.url) ? 'sidebar-link sidebar-link--sub is-active' : 'sidebar-link sidebar-link--sub')
.sidebar-nav-secondary
%h3.sidebar-label.mtl Meta
- get_secondary_pages().each do |page|
= link_to page.data.title, "/#{page.path}", class: (is_page_active(page.url) ? 'sidebar-link is-active' : 'sidebar-link')