Skip to content

Commit

Permalink
Disable sidebar via stash
Browse files Browse the repository at this point in the history
Change-Id: I90a89bba41ebf8cdc7dd5b14bf4762784fb834fa
  • Loading branch information
Akron committed Oct 1, 2024
1 parent a9f6089 commit b01cccc
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Changes
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
0.57 2024-10-01
- Support VCs via URL without queries (diewald)
- Added translations for regexp and FCSQL (r-wilm)
- Introduce 'ui-ready' global event. (diewald)
- Introduce 'ui-ready' global event (diewald)
- Don't show random page option for single page
results (diewald)
- Move page to top after click on example queries (diewald)
- Disable sidebar via stash (diewald)

0.56 2024-09-23
- Improve slim test for plugin support
Expand Down
2 changes: 1 addition & 1 deletion dev/scss/footer/footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ footer {
background-image: url('#{$img-path}/ids-institute-for-the-german-language-white.svg');
}

aside.active ~ footer {
aside.active:not(.off) ~ footer {
padding-left: $logo-left-distance;
transition: all .3s ease-in-out;
}
2 changes: 1 addition & 1 deletion dev/scss/main/intro.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ div.intro {
}
}

aside.active ~ main div.intro {
aside.active:not(.off) ~ main div.intro {
margin-left: $logo-left-distance - $standard-margin + $base-padding;
}
6 changes: 6 additions & 0 deletions t/custom/doc/off.html.ep
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
% layout 'main', sidebar_off => 1;


<div class="intro">
<h2>This has no sidebar!</h2>
</div>
11 changes: 11 additions & 0 deletions t/intro.t
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ $t->get_ok('/')
->element_exists('meta[name="keywords"][content^="KorAP"]')
->element_exists('body[itemscope][itemtype="http://schema.org/WebApplication"]')
->element_exists_not('#koralQuery')
->attr_is('aside', 'class', ' off')
;

$t->get_ok('/?cq=corpusSigle%3DGOE')
Expand All @@ -63,11 +64,21 @@ $t->get_ok('/?cq=corpusSigle%3DGOE')
->element_exists('meta[name="keywords"][content^="KorAP"]')
->element_exists('body[itemscope][itemtype="http://schema.org/WebApplication"]')
->element_exists('#koralQuery')
->attr_is('aside', 'class',' off')
;

$t->get_ok('/huhuhuhuhu')
->status_is(404)
->text_is('title', 'KorAP: 404 - Page not found')
->text_is('h1 span', 'KorAP: 404 - Page not found');


$t->get_ok('/doc/off')
->status_is(200)
->text_is('title', 'KorAP - Corpus Analysis Platform')
->text_is('h1 span', 'KorAP - Corpus Analysis Platform')
->attr_is('aside', 'class',' off')
;


done_testing();
2 changes: 1 addition & 1 deletion templates/partial/side.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
% };
% }

% if (length($side_bar) == 0) {
% if (length($side_bar) == 0 || stash('sidebar_off')) {
% $classes .= ' off';
% } elsif (stash('sidebar_active')) {
% $classes .= ' active';
Expand Down

0 comments on commit b01cccc

Please sign in to comment.