blob: c64e27535e5b1db274d7a84d2e5aab59bc59aefe [file] [log] [blame]
Akron2d01d292018-11-23 11:17:35 +01001% my $side_bar = content_block 'sidebar';
2
Akron1d09b532021-06-15 18:18:25 +02003% my $classes = '';
4%
5% if (length($side_bar) == 0) {
6% if (my $nav = navigation('settings')) {
7% $side_bar = b('<nav>' . $nav . '</nav>');
8% $classes = 'settings ';
9% };
10% }
11
Akronb01cccc2024-09-30 15:32:43 +020012% if (length($side_bar) == 0 || stash('sidebar_off')) {
Akron1d09b532021-06-15 18:18:25 +020013% $classes .= ' off';
14% } elsif (stash('sidebar_active')) {
15% $classes .= ' active';
Akrondc0b3ab2021-06-18 11:52:43 +020016% } elsif (stash('login_active') && !$classes) {
17% $classes .= ' active';
Akron1d09b532021-06-15 18:18:25 +020018% };
19
20
21<aside tabindex="0" class="<%= $classes %>">
Akrone4968442018-05-22 15:32:07 +020022 <div>
Akron2d01d292018-11-23 11:17:35 +010023 %= $side_bar
Akrone4968442018-05-22 15:32:07 +020024 </div>
25</aside>