% my $side_bar = content_block 'sidebar'; | |
% my $classes = ''; | |
% | |
% if (length($side_bar) == 0) { | |
% if (my $nav = navigation('settings')) { | |
% $side_bar = b('<nav>' . $nav . '</nav>'); | |
% $classes = 'settings '; | |
% }; | |
% } | |
% if (length($side_bar) == 0 || stash('sidebar_off')) { | |
% $classes .= ' off'; | |
% } elsif (stash('sidebar_active')) { | |
% $classes .= ' active'; | |
% } elsif (stash('login_active') && !$classes) { | |
% $classes .= ' active'; | |
% }; | |
<aside tabindex="0" class="<%= $classes %>"> | |
<div> | |
%= $side_bar | |
</div> | |
</aside> |