added option to disable the autocollapsing of the sidebar
This commit is contained in:
parent
049cbbfef7
commit
3e1e2a1f18
6 changed files with 22 additions and 1 deletions
15
Template.php
15
Template.php
|
@ -148,6 +148,21 @@ class Template {
|
||||||
return $header . $nav;
|
return $header . $nav;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default class defining is the sidebar should collapse
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function fullWidthClass() {
|
||||||
|
global $ACT;
|
||||||
|
// no auto collapsing? empty class
|
||||||
|
if (!tpl_getConf('autocollapse')) return '';
|
||||||
|
// mode show? empty class
|
||||||
|
if ($ACT === "show") return '';
|
||||||
|
// anything else? wide content
|
||||||
|
return 'wide-content ';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all the tabs to display
|
* Get all the tabs to display
|
||||||
*
|
*
|
||||||
|
|
|
@ -6,3 +6,4 @@
|
||||||
|
|
||||||
$conf['sidebar_sections'] = 'h1,h2,h3,h4,h5';
|
$conf['sidebar_sections'] = 'h1,h2,h3,h4,h5';
|
||||||
$conf['header_layout'] = 'header-default';
|
$conf['header_layout'] = 'header-default';
|
||||||
|
$conf['autocollapse'] = 1;
|
||||||
|
|
|
@ -17,3 +17,5 @@ $meta['header_layout'] = array(
|
||||||
'header-compact',
|
'header-compact',
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$meta['autocollapse'] = array('onoff');
|
||||||
|
|
|
@ -14,3 +14,5 @@ $lang['sidebar_sections_o_li.level1 > .li'] = 'Top-level Listeneinträge in ve
|
||||||
$lang['header_layout'] = 'Layout des Headers anpassen:';
|
$lang['header_layout'] = 'Layout des Headers anpassen:';
|
||||||
$lang['header_layout_o_default'] = 'großer Header für langen Wiki Titel und Tagline';
|
$lang['header_layout_o_default'] = 'großer Header für langen Wiki Titel und Tagline';
|
||||||
$lang['header_layout_o_compact'] = 'kompakter Header für kurzen Wiki Titel ohne Tagline';
|
$lang['header_layout_o_compact'] = 'kompakter Header für kurzen Wiki Titel ohne Tagline';
|
||||||
|
|
||||||
|
$lang['autocollapse'] = 'Sidebar automatisch einklappen wenn Nicht-Inhaltsseiten angezigt werden, um mehr Platz zu haben.';
|
||||||
|
|
|
@ -15,3 +15,4 @@ $lang['header_layout'] = 'Adjust header layout:';
|
||||||
$lang['header_layout_o_default'] = 'generous header layout for long wiki titel and tagline';
|
$lang['header_layout_o_default'] = 'generous header layout for long wiki titel and tagline';
|
||||||
$lang['header_layout_o_compact'] = 'compact header layout for short wiki title and hidden tagline';
|
$lang['header_layout_o_compact'] = 'compact header layout for short wiki title and hidden tagline';
|
||||||
|
|
||||||
|
$lang['autocollapse'] = 'Automatically collapse the sidebar when viewing non-content pages for more screen estate.';
|
||||||
|
|
2
main.php
2
main.php
|
@ -68,7 +68,7 @@ $showSidebar = true;
|
||||||
|
|
||||||
|
|
||||||
/* #dokuwiki__top used as anchor for "back to top" button/link links */
|
/* #dokuwiki__top used as anchor for "back to top" button/link links */
|
||||||
$classWideContent = ($ACT === "show") ? "": "wide-content ";
|
$classWideContent = (Template::getInstance())->fullWidthClass();
|
||||||
?>
|
?>
|
||||||
<body id="dokuwiki__top" class="<?php echo ($ACT) ? 'do-'.$ACT : 'do-none'; ?> <?php echo $classWideContent; ?><?php echo ($showSidebar) ? 'showSidebar' : ''; ?> <?php echo tpl_getConf('header_layout'); ?>">
|
<body id="dokuwiki__top" class="<?php echo ($ACT) ? 'do-'.$ACT : 'do-none'; ?> <?php echo $classWideContent; ?><?php echo ($showSidebar) ? 'showSidebar' : ''; ?> <?php echo tpl_getConf('header_layout'); ?>">
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue