move standard includes to proper place. fixes #116

This commit is contained in:
Andreas Gohr 2025-04-10 11:56:52 +02:00
parent 18e52693eb
commit f6cbad5a6e

164
main.php
View file

@ -34,34 +34,14 @@ $showSidebar = true;
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<?php tpl_metaheaders() ?> <?php tpl_metaheaders() ?>
<?php
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* page title */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
?>
<title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title> <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title>
<script type="text/javascript">(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script> <script type="text/javascript">(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
<?php
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* favicons */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
?>
<?php <?php
include('tpl/favicon_tiles.php'); include('tpl/favicon_tiles.php');
?> ?>
<?php
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* Include Hook: meta.html */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
?>
<?php tpl_includeFile('meta.html') ?> <?php tpl_includeFile('meta.html') ?>
</head> </head>
<?php <?php
@ -73,27 +53,12 @@ $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'); ?>">
<div id="dokuwiki__site" class="<?php echo tpl_classes(); ?>"> <div id="dokuwiki__site" class="<?php echo tpl_classes(); ?>">
<?php
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* template Include: tpl/nav-direct */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
?>
<?php include('tpl/nav-direct.php') ?> <?php include('tpl/nav-direct.php') ?>
<div class="page-wrapper <?php echo ($showSidebar) ? 'hasSidebar' : ''; ?>"> <div class="page-wrapper <?php echo ($showSidebar) ? 'hasSidebar' : ''; ?>">
<?php <?php
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* Include Hook: header.html */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
tpl_includeFile('header.html'); tpl_includeFile('header.html');
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* User Tools and MagicMatcher Bar */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/** @var \helper_plugin_magicmatcher_context $mm */ /** @var \helper_plugin_magicmatcher_context $mm */
$mm = plugin_load('helper', 'magicmatcher_context'); $mm = plugin_load('helper', 'magicmatcher_context');
$headerClass = ""; /* for additionial class in #dokuwiki__header */ $headerClass = ""; /* for additionial class in #dokuwiki__header */
@ -121,22 +86,10 @@ $classWideContent = (Template::getInstance())->fullWidthClass();
</div> </div>
<?php } ?> <?php } ?>
<?php <?php include('tpl/main-sidebar-logo.php'); ?>
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* Logo */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* upload your logo into the data/media folder (root of the media manager) and replace 'logo.png' in der template config accordingly: */
include('tpl/main-sidebar-logo.php');
?>
<div class="main-title"> <div class="main-title">
<?php if ($conf['title']): <?php if ($conf['title']): ?>
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* Wiki Title Mobile */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ ?>
<p class="title mobile-only"><?php echo $conf['title'] ?></p> <p class="title mobile-only"><?php echo $conf['title'] ?></p>
<?php endif ?> <?php endif ?>
</div><!-- .main-title --> </div><!-- .main-title -->
@ -158,20 +111,10 @@ $classWideContent = (Template::getInstance())->fullWidthClass();
<div class="col-xs-12"> <div class="col-xs-12">
<div class="main-title desktop-only"> <div class="main-title desktop-only">
<?php if ($conf['title']): <?php if ($conf['title']): ?>
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* Wiki Title Desktop */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ ?>
<p class="title"><?php echo $conf['title'] ?></p> <p class="title"><?php echo $conf['title'] ?></p>
<?php endif ?> <?php endif ?>
<?php if ($conf['tagline']): <?php if ($conf['tagline']): ?>
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* Wiki Tagline Desktop */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ ?>
<p class="claim"><?php echo $conf['tagline'] ?></p> <p class="claim"><?php echo $conf['tagline'] ?></p>
<?php endif ?> <?php endif ?>
</div><!-- .main-title --> </div><!-- .main-title -->
@ -180,13 +123,6 @@ $classWideContent = (Template::getInstance())->fullWidthClass();
</div><!-- .row --> </div><!-- .row -->
</div><!-- .container --> </div><!-- .container -->
</div><!-- .header --> </div><!-- .header -->
<?php
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* headline menu area (Accessibility ) */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
?>
<div class="sr-only nav-area-head"> <div class="sr-only nav-area-head">
<h5 class="sr-only" role="heading" aria-level="1"><?php echo tpl_getLang('nav-area-head') ?></h5> <h5 class="sr-only" role="heading" aria-level="1"><?php echo tpl_getLang('nav-area-head') ?></h5>
@ -198,25 +134,11 @@ $classWideContent = (Template::getInstance())->fullWidthClass();
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<div class="search main-sidebar"> <div class="search main-sidebar">
<?php <?php include('tpl/main-sidebar-search.php'); ?>
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* search form */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
include('tpl/main-sidebar-search.php');
?>
</div><!-- .search --> </div><!-- .search -->
<div class="sidebarheader main-sidebar"> <div class="sidebarheader main-sidebar">
<?php <?php tpl_includeFile('sidebarheader.html') ?>
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* Include Hook: sidebarheader.html */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
tpl_includeFile('sidebarheader.html')
?>
</div><!-- .sidebarheader --> </div><!-- .sidebarheader -->
<div id="dokuwiki__aside"> <div id="dokuwiki__aside">
@ -229,14 +151,7 @@ $classWideContent = (Template::getInstance())->fullWidthClass();
); );
?> ?>
<?php <?php include('tpl/main-sidebar-nav.php'); ?>
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* sidebar */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
include('tpl/main-sidebar-nav.php');
?>
<?php <?php
echo Template::getInstance()->getInclude( echo Template::getInstance()->getInclude(
@ -259,11 +174,6 @@ $classWideContent = (Template::getInstance())->fullWidthClass();
<div class="col-xs-12"> <div class="col-xs-12">
<?php <?php
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* User Tools and MagicMatcher Bar */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
include('tpl/nav-usertools-buttons.php'); include('tpl/nav-usertools-buttons.php');
if($mm && $matcher !== ""){ if($mm && $matcher !== ""){
include('tpl/nav-magicmatcher.php'); include('tpl/nav-magicmatcher.php');
@ -280,18 +190,7 @@ $classWideContent = (Template::getInstance())->fullWidthClass();
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<?php tpl_flush(); /* flush the output buffer */?>
<?php tpl_flush(); /* flush the output buffer */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* Include Hook: pageheader.html */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
tpl_includeFile('pageheader.html')
?>
<?php
?>
<div class="breadcrumbs" data-do="<?php echo $ACT?>"> <div class="breadcrumbs" data-do="<?php echo $ACT?>">
@ -303,29 +202,13 @@ $classWideContent = (Template::getInstance())->fullWidthClass();
<h6 class="sr-only" role="heading" aria-level="2"><?php echo tpl_getLang('head_menu_status') ?></h6> <h6 class="sr-only" role="heading" aria-level="2"><?php echo tpl_getLang('head_menu_status') ?></h6>
<?php <?php include('tpl/nav-page-attributes.php'); ?>
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ <?php include('tpl/nav-breadcrumb.php'); ?>
/* page quality / page tasks */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
include('tpl/nav-page-attributes.php');
?>
<?php
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* breadcrumb */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
include('tpl/nav-breadcrumb.php');
?>
<h6 class="sr-only" role="heading" aria-level="2"><?php echo $lang['page_tools'] ?></h6> <h6 class="sr-only" role="heading" aria-level="2"><?php echo $lang['page_tools'] ?></h6>
<?php <?php
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* page tools */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
if(!tpl_getConf('closedwiki') || $INPUT->server->has('REMOTE_USER')) { if(!tpl_getConf('closedwiki') || $INPUT->server->has('REMOTE_USER')) {
include('tpl/nav-page-tools.php'); include('tpl/nav-page-tools.php');
} }
@ -336,14 +219,7 @@ $classWideContent = (Template::getInstance())->fullWidthClass();
<div id="dokuwiki__content" class="page main-content"> <div id="dokuwiki__content" class="page main-content">
<div id="spr__meta-box"> <div id="spr__meta-box">
<h6 class="sr-only" role="heading" aria-level="2"><?php echo tpl_getLang('head_meta_box') ?></h6> <h6 class="sr-only" role="heading" aria-level="2"><?php echo tpl_getLang('head_meta_box') ?></h6>
<?php include('tpl/nav-meta-box.php'); ?>
<?php
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* meta box */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
include('tpl/nav-meta-box.php'); ?>
</div> </div>
<div class="qc-output"></div> <div class="qc-output"></div>
@ -366,15 +242,12 @@ $classWideContent = (Template::getInstance())->fullWidthClass();
<div class="clearer"></div> <div class="clearer"></div>
</div> </div>
<?php <?php
tpl_includeFile('pageheader.html');
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* wikipage start / main content */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
tpl_content(false); /* the main content */ tpl_content(false); /* the main content */
?> ?>
<div class="clearer"></div> <div class="clearer"></div>
<?php <?php
tpl_includeFile('pagefooter.html');
if($ACT == 'show') echo Template::getInstance()->getInclude( if($ACT == 'show') echo Template::getInstance()->getInclude(
'footer', 'footer',
'<div class="wikipagefooter"><hr>', '<div class="wikipagefooter"><hr>',
@ -386,17 +259,6 @@ $classWideContent = (Template::getInstance())->fullWidthClass();
<div class="page-footer"> <div class="page-footer">
<?php <?php
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* Include Hook: pagefooter */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
tpl_includeFile('pagefooter.html');
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* 'Last modified' etc */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
tpl_pageinfo() tpl_pageinfo()
?> ?>
</div> </div>