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 | |
| 12 | % unless (length($side_bar) > 1) { |
| 13 | % $classes .= ' off'; |
| 14 | % } elsif (stash('sidebar_active')) { |
| 15 | % $classes .= ' active'; |
| 16 | % }; |
| 17 | |
| 18 | |
| 19 | <aside tabindex="0" class="<%= $classes %>"> |
Akron | e496844 | 2018-05-22 15:32:07 +0200 | [diff] [blame] | 20 | <div> |
Akron | 2d01d29 | 2018-11-23 11:17:35 +0100 | [diff] [blame] | 21 | %= $side_bar |
Akron | e496844 | 2018-05-22 15:32:07 +0200 | [diff] [blame] | 22 | </div> |
| 23 | </aside> |