added possibility to disable sidebar (closes #4)
This commit is contained in:
parent
494e771047
commit
c73a278835
2 changed files with 13 additions and 11 deletions
|
|
@ -71,20 +71,20 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* make content wider when there's no sidebar */
|
/* make content wider when there's no sidebar */
|
||||||
.mode_show #dokuwiki__content {
|
.hasSidebar.mode_show #dokuwiki__content {
|
||||||
float: right;
|
float: right;
|
||||||
margin-left: -__sidebar_width__;
|
margin-left: -__sidebar_width__;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
[dir=rtl] .mode_show #dokuwiki__content {
|
[dir=rtl] .hasSidebar.mode_show #dokuwiki__content {
|
||||||
float: left;
|
float: left;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
margin-right: -__sidebar_width__;
|
margin-right: -__sidebar_width__;
|
||||||
}
|
}
|
||||||
.mode_show #dokuwiki__content > .pad {
|
.hasSidebar.mode_show #dokuwiki__content > .pad {
|
||||||
margin-left: __sidebar_width__;
|
margin-left: __sidebar_width__;
|
||||||
}
|
}
|
||||||
[dir=rtl] .mode_show #dokuwiki__content > .pad {
|
[dir=rtl] .hasSidebar.mode_show #dokuwiki__content > .pad {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
margin-right: __sidebar_width__;
|
margin-right: __sidebar_width__;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
16
main.php
16
main.php
|
|
@ -35,7 +35,7 @@ $showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && $_SERVER
|
||||||
see http://www.dokuwiki.org/devel:action_modes for a list of action modes */ ?>
|
see http://www.dokuwiki.org/devel:action_modes for a list of action modes */ ?>
|
||||||
<?php /* .dokuwiki should always be in one of the surrounding elements (e.g. plugins and templates depend on it) */ ?>
|
<?php /* .dokuwiki should always be in one of the surrounding elements (e.g. plugins and templates depend on it) */ ?>
|
||||||
<div id="dokuwiki__site"><div id="dokuwiki__top"
|
<div id="dokuwiki__site"><div id="dokuwiki__top"
|
||||||
class="dokuwiki site mode_<?php echo $ACT ?>">
|
class="dokuwiki site mode_<?php echo $ACT ?> <?php echo ($conf['sidebar']) ? 'hasSidebar' : '' ?>">
|
||||||
<?php html_msgarea() /* occasional error and info messages on top of the page */ ?>
|
<?php html_msgarea() /* occasional error and info messages on top of the page */ ?>
|
||||||
<?php tpl_includeFile('header.html') ?>
|
<?php tpl_includeFile('header.html') ?>
|
||||||
|
|
||||||
|
|
@ -112,12 +112,14 @@ $showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && $_SERVER
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
|
|
||||||
<!-- ********** ASIDE ********** -->
|
<!-- ********** ASIDE ********** -->
|
||||||
<div id="dokuwiki__aside"><div class="pad include">
|
<?php if ($conf['sidebar']): ?>
|
||||||
<?php tpl_includeFile('sidebarheader.html') ?>
|
<div id="dokuwiki__aside"><div class="pad include">
|
||||||
<?php tpl_include_page($conf['sidebar'], 1, 1) /* includes the nearest sidebar page */ ?>
|
<?php tpl_includeFile('sidebarheader.html') ?>
|
||||||
<?php tpl_includeFile('sidebarfooter.html') ?>
|
<?php tpl_include_page($conf['sidebar'], 1, 1) /* includes the nearest sidebar page */ ?>
|
||||||
<div class="clearer"></div>
|
<?php tpl_includeFile('sidebarfooter.html') ?>
|
||||||
</div></div><!-- /aside -->
|
<div class="clearer"></div>
|
||||||
|
</div></div><!-- /aside -->
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<!-- ********** CONTENT ********** -->
|
<!-- ********** CONTENT ********** -->
|
||||||
<div id="dokuwiki__content"><div class="pad">
|
<div id="dokuwiki__content"><div class="pad">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue