Disable sidebar via stash

Change-Id: I90a89bba41ebf8cdc7dd5b14bf4762784fb834fa
diff --git a/Changes b/Changes
index e3dd470..4071963 100644
--- a/Changes
+++ b/Changes
@@ -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
diff --git a/dev/scss/footer/footer.scss b/dev/scss/footer/footer.scss
index e2ec64e..1a5b312 100644
--- a/dev/scss/footer/footer.scss
+++ b/dev/scss/footer/footer.scss
@@ -93,7 +93,7 @@
   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;
 }
diff --git a/dev/scss/main/intro.scss b/dev/scss/main/intro.scss
index 8f83175..e3b4d63 100644
--- a/dev/scss/main/intro.scss
+++ b/dev/scss/main/intro.scss
@@ -20,6 +20,6 @@
   }
 }
 
-aside.active ~ main div.intro {
+aside.active:not(.off) ~ main div.intro {
   margin-left: $logo-left-distance - $standard-margin + $base-padding;
 }
\ No newline at end of file
diff --git a/t/custom/doc/off.html.ep b/t/custom/doc/off.html.ep
new file mode 100644
index 0000000..b907f12
--- /dev/null
+++ b/t/custom/doc/off.html.ep
@@ -0,0 +1,6 @@
+% layout 'main', sidebar_off => 1;
+
+
+<div class="intro">
+  <h2>This has no sidebar!</h2>
+</div>
diff --git a/t/intro.t b/t/intro.t
index 6d46466..7ea9022 100644
--- a/t/intro.t
+++ b/t/intro.t
@@ -50,6 +50,7 @@
   ->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')
@@ -63,6 +64,7 @@
   ->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')
@@ -70,4 +72,13 @@
   ->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();
diff --git a/templates/partial/side.html.ep b/templates/partial/side.html.ep
index a8deb0e..c64e275 100644
--- a/templates/partial/side.html.ep
+++ b/templates/partial/side.html.ep
@@ -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';