Akron | 2d01d29 | 2018-11-23 11:17:35 +0100 | [diff] [blame] | 1 | % my $side_bar = content_block 'sidebar'; |
| 2 | |
Akron | 1d09b53 | 2021-06-15 18:18:25 +0200 | [diff] [blame] | 3 | % 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 | |
Akron | b01cccc | 2024-09-30 15:32:43 +0200 | [diff] [blame^] | 12 | % if (length($side_bar) == 0 || stash('sidebar_off')) { |
Akron | 1d09b53 | 2021-06-15 18:18:25 +0200 | [diff] [blame] | 13 | % $classes .= ' off'; |
| 14 | % } elsif (stash('sidebar_active')) { |
| 15 | % $classes .= ' active'; |
Akron | dc0b3ab | 2021-06-18 11:52:43 +0200 | [diff] [blame] | 16 | % } elsif (stash('login_active') && !$classes) { |
| 17 | % $classes .= ' active'; |
Akron | 1d09b53 | 2021-06-15 18:18:25 +0200 | [diff] [blame] | 18 | % }; |
| 19 | |
| 20 | |
| 21 | <aside tabindex="0" class="<%= $classes %>"> |
Akron | e496844 | 2018-05-22 15:32:07 +0200 | [diff] [blame] | 22 | <div> |
Akron | 2d01d29 | 2018-11-23 11:17:35 +0100 | [diff] [blame] | 23 | %= $side_bar |
Akron | e496844 | 2018-05-22 15:32:07 +0200 | [diff] [blame] | 24 | </div> |
| 25 | </aside> |