function bootstrap3_is_fluid_container()
{
    $fluid_container = bootstrap3_conf('fluidContainer');
    $fluid_container_btn = bootstrap3_fluid_container_button();
    if ($fluid_container_btn) {
        $fluid_container = true;
    }
    return $fluid_container;
}
/**
 * Calculate automatically the grid size for main container
 *
 * @author  Giuseppe Di Terlizzi <*****@*****.**>
 *
 * @return  string
 */
function bootstrap3_container_grid()
{
    global $ACT;
    global $ID;
    global $conf;
    $grids = array();
    $result = '';
    $showRightSidebar = bootstrap3_conf('showRightSidebar');
    $showLeftSidebar = bootstrap3_conf('showSidebar');
    $fluidContainer = bootstrap3_conf('fluidContainer');
    if (bootstrap3_conf('fluidContainerBtn')) {
        $fluidContainer = bootstrap3_fluid_container_button();
    }
    if (bootstrap3_conf('showLandingPage') && (bool) preg_match(bootstrap3_conf('landingPages'), $ID)) {
        $showLeftSidebar = false;
    }
    if (!$showLeftSidebar) {
        return 'container' . ($fluidContainer ? '-fluid' : '');
    }
    foreach (explode(' ', bootstrap3_conf('leftSidebarGrid')) as $grid) {
        list($col, $media, $size) = explode('-', $grid);
        $grids[$media]['left'] = (int) $size;
    }
    foreach (explode(' ', bootstrap3_conf('rightSidebarGrid')) as $grid) {
        list($col, $media, $size) = explode('-', $grid);
        $grids[$media]['right'] = (int) $size;
    }
    foreach ($grids as $media => $item) {
        $left = $item['left'];
        $right = $item['right'];
        $result .= sprintf('col-%s-%s ', $media, 12 - $left - ($showRightSidebar ? $right : 0));
    }
    return $result;
}
?>

        <?php 
include_once dirname(__FILE__) . '/tpl_admin.php';
include_once dirname(__FILE__) . '/tpl_tools_menu.php';
include_once dirname(__FILE__) . '/tpl_theme_switcher.php';
include_once dirname(__FILE__) . '/tpl_translation.php';
?>

        <ul class="nav navbar-nav">

          <?php 
if ($fluidContainerBtn) {
    ?>
          <li class="hidden-xs<?php 
    echo bootstrap3_fluid_container_button() ? ' active' : '';
    ?>
">
            <a href="#" class="fluid-container" title="<?php 
    echo tpl_getLang('expand_container');
    ?>
"><i class="fa fa-fw fa-arrows-alt"></i><span class="hidden-lg hidden-md hidden-sm"> <?php 
    echo tpl_getLang('expand_container');
    ?>
</span></a>
          </li>
          <?php 
}
?>

          <?php 
$fluidContainerBtn = bootstrap3_conf('fluidContainerBtn');
$showPageInfo = bootstrap3_conf('showPageInfo');
$showBadges = bootstrap3_conf('showBadges');
$semantic = bootstrap3_conf('semantic');
$schemaOrgType = bootstrap3_conf('schemaOrgType');
$leftSidebarGrid = bootstrap3_conf('leftSidebarGrid');
$rightSidebarGrid = bootstrap3_conf('rightSidebarGrid');
$showLandingPage = bootstrap3_conf('showLandingPage');
$hideInThemeSwitcher = bootstrap3_conf('hideInThemeSwitcher');
$useLocalBootswatch = bootstrap3_conf('useLocalBootswatch');
$contentGrid = bootstrap3_container_grid();
$bootstrapStyles = array();
$tplConfigJSON = array('tableFullWidth' => (int) bootstrap3_conf('tableFullWidth'), 'tableStyle' => bootstrap3_conf('tableStyle'), 'tagsOnTop' => (int) bootstrap3_conf('tagsOnTop'), 'useAnchorJS' => (int) bootstrap3_conf('useAnchorJS'));
$JSINFO['bootstrap3'] = $tplConfigJSON;
if ($fluidContainerBtn) {
    $fluidContainer = bootstrap3_fluid_container_button();
}
// Display a landing page (set the pageOnPanel and showSidebar config to "off")
if ($showLandingPage && (bool) preg_match_all(bootstrap3_conf('landingPages'), $ID)) {
    $showSidebar = false;
    $pageOnPanel = false;
}
if ($showThemeSwitcher && $bootstrapTheme == 'bootswatch') {
    if (get_doku_pref('bootswatchTheme', null) !== null && get_doku_pref('bootswatchTheme', null) !== '') {
        $bootswatchTheme = get_doku_pref('bootswatchTheme', null);
    }
    global $INPUT;
    if ($INPUT->str('bootswatchTheme')) {
        $bootswatchTheme = $INPUT->str('bootswatchTheme');
        set_doku_pref('bootswatchTheme', $bootswatchTheme);
    }