Skip to content
Snippets Groups Projects
Commit 5dcb1251 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

collapse sidebar in mobile view FS#2473

parent 290a8064
No related branches found
No related tags found
No related merge requests found
...@@ -14,10 +14,30 @@ ...@@ -14,10 +14,30 @@
width: 100%; width: 100%;
float: none; float: none;
} }
#dokuwiki__aside > .pad { #dokuwiki__aside > .pad {
margin: 0 0 .5em; margin: 0 0 .5em;
/* style like the page */
background: __background__;
color: inherit;
border: 1px solid #eee;
box-shadow: 0 0 .5em #999;
border-radius: 2px;
padding: 1em;
margin-bottom: .5em;
overflow: hidden;
word-wrap: break-word;
}
#dokuwiki__aside h3.aside {
padding: 0 0 .5em;
font-size: .875em;
letter-spacing: .1em;
border-bottom: 1px solid __border__;
} }
.hasSidebar #dokuwiki__content { .hasSidebar #dokuwiki__content {
float: none; float: none;
margin-left: 0; margin-left: 0;
...@@ -45,6 +65,7 @@ ...@@ -45,6 +65,7 @@
margin: 0 0 1em 0; margin: 0 0 1em 0;
border-right-width: 0; border-right-width: 0;
} }
#dw__toc h3 { #dw__toc h3 {
padding: 0 0 .5em; padding: 0 0 .5em;
} }
...@@ -194,6 +215,7 @@ ...@@ -194,6 +215,7 @@
/*____________ content ____________*/ /*____________ content ____________*/
#dokuwiki__aside > .pad,
.dokuwiki div.page { .dokuwiki div.page {
padding: .5em; padding: .5em;
} }
......
...@@ -37,7 +37,7 @@ $showSidebar = $conf['sidebar'] && page_exists($conf['sidebar']) && ($ACT=='show ...@@ -37,7 +37,7 @@ $showSidebar = $conf['sidebar'] && page_exists($conf['sidebar']) && ($ACT=='show
<?php if($showSidebar): ?> <?php if($showSidebar): ?>
<!-- ********** ASIDE ********** --> <!-- ********** ASIDE ********** -->
<div id="dokuwiki__aside"><div class="pad include group"> <div id="dokuwiki__aside"><div class="pad include group">
<div class="a11y toggle"><?php echo hsc(ucfirst($conf['sidebar'])) ?></div> <h3 class="aside a11y"><?php echo hsc(ucfirst($conf['sidebar'])) ?></h3>
<div class="aside group"> <div class="aside group">
<?php tpl_flush() ?> <?php tpl_flush() ?>
<?php tpl_includeFile('sidebarheader.html') ?> <?php tpl_includeFile('sidebarheader.html') ?>
......
jQuery(function(){
// check if we are in mobile mode
if(jQuery('div.mobileTools').css('display') == 'none') return;
// toc and sidebar hiding
dw_page.makeToggle('#dokuwiki__aside h3.aside','#dokuwiki__aside div.aside');
jQuery('#dw__toc > h3').click();
jQuery('#dokuwiki__aside h3.aside').removeClass('a11y').click();
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment