I added an option to the nice Argon dokuwiki template to get rid of the left sidebar for users that have not logged in so that the entire width of the page can be used for text. Here are the changes I made:
main.php
(in lib/tpl/argon/
)$showLeftSidebar = !tpl_getConf('hideLeftSidebar') || !empty($_SERVER['REMOTE_USER']);
left sidebar
comment), add the line:<?php if ($showLeftSidebar) { ?>
<!-- center content --> <main class="col-12 col-md-9 col-xl-8 py-md-3 pl-md-5 ct-content dokuwiki" role="main">
add the following three lines:
<?php } else { ?> <main class="col-12 col-md-115 col-xl-10 py-md-3 pl-md-5 ct-content dokuwiki" role="main"> <?php }?>
default.php
(in lib/tpl/argon/conf/
)$conf['hideLeftSidebar'] = 0;
meta.php
(in lib/tpl/argon/conf/
)$meta['hideLeftSidebar'] = array('onoff');
doku.css
(in lib/tpl/argon/assets/css/doku.css
).col-md-auto, .col-md-12, .col-md-11, .col-md-10, .col-md-9, .col-md-8, .col-md-7, .col-md-6, .col-md-5, .col-md-4, .col-md-3, .col-md-2, .col-md-1, .col-sm,
to
.col-md-auto, .col-md-12, .col-md-115, .col-md-11, .col-md-10, .col-md-9, .col-md-8, .col-md-7, .col-md-6, .col-md-5, .col-md-4, .col-md-3, .col-md-2, .col-md-1, .col-sm,
.col-md-115 { flex: 0 0 97.5%; max-width: 97.5%; }
after line 1183 (after the closing brace).
settings.php
(in lib/tpl/argon/lang/en/settings.php
)$lang['hideLeftSidebar'] = 'Hide left sidebar when not logged in?';
With these changes, a new option should appear in the template configuration settings that allows you to turn off the left sidebar.
In addition, we use the following patch to fix the login window overlap issues.