main.php 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <?php
  2. /**
  3. * DokuWiki Default Template 2012
  4. *
  5. * @link http://dokuwiki.org/template
  6. * @author Anika Henke <anika@selfthinker.org>
  7. * @author Clarence Lee <clarencedglee@gmail.com>
  8. * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
  9. */
  10. if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */
  11. $hasSidebar = page_findnearest($conf['sidebar']);
  12. $showSidebar = $hasSidebar && ($ACT=='show');
  13. ?><!DOCTYPE html>
  14. <html lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
  15. <head>
  16. <meta charset="utf-8" />
  17. <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title>
  18. <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
  19. <?php tpl_metaheaders() ?>
  20. <meta name="viewport" content="width=device-width,initial-scale=1" />
  21. <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
  22. <?php tpl_includeFile('meta.html') ?>
  23. </head>
  24. <body>
  25. <div id="dokuwiki__site"><div id="dokuwiki__top" class="site <?php echo tpl_classes(); ?> <?php
  26. echo ($showSidebar) ? 'showSidebar' : ''; ?> <?php echo ($hasSidebar) ? 'hasSidebar' : ''; ?>">
  27. <?php include('tpl_header.php') ?>
  28. <div class="wrapper group">
  29. <?php if($showSidebar): ?>
  30. <!-- ********** ASIDE ********** -->
  31. <nav id="dokuwiki__aside" aria-label="<?php echo $lang['sidebar']
  32. ?>"><div class="pad aside include group">
  33. <h3 class="toggle"><?php echo $lang['sidebar'] ?></h3>
  34. <div class="content"><div class="group">
  35. <?php tpl_flush() ?>
  36. <?php tpl_includeFile('sidebarheader.html') ?>
  37. <?php tpl_include_page($conf['sidebar'], true, true) ?>
  38. <?php tpl_includeFile('sidebarfooter.html') ?>
  39. </div></div>
  40. </div></nav><!-- /aside -->
  41. <?php endif; ?>
  42. <!-- ********** CONTENT ********** -->
  43. <main id="dokuwiki__content"><div class="pad group">
  44. <?php html_msgarea() ?>
  45. <div class="pageId"><span><?php echo hsc($ID) ?></span></div>
  46. <div class="page group">
  47. <?php tpl_flush() ?>
  48. <?php tpl_includeFile('pageheader.html') ?>
  49. <!-- wikipage start -->
  50. <?php tpl_content() ?>
  51. <!-- wikipage stop -->
  52. <?php tpl_includeFile('pagefooter.html') ?>
  53. </div>
  54. <div class="docInfo"><?php tpl_pageinfo() ?></div>
  55. <?php tpl_flush() ?>
  56. <hr class="a11y" />
  57. </div></main><!-- /content -->
  58. <!-- PAGE ACTIONS -->
  59. <nav id="dokuwiki__pagetools" aria-labelledby="dokuwiki__pagetools__heading">
  60. <h3 class="a11y" id="dokuwiki__pagetools__heading"><?php echo $lang['page_tools']; ?></h3>
  61. <div class="tools">
  62. <ul>
  63. <?php echo (new \dokuwiki\Menu\PageMenu())->getListItems(); ?>
  64. </ul>
  65. </div>
  66. </nav>
  67. </div><!-- /wrapper -->
  68. <?php include('tpl_footer.php') ?>
  69. </div></div><!-- /site -->
  70. <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
  71. <div id="screen__mode" class="no"></div><?php /* helper to detect CSS media query in script.js */ ?>
  72. </body>
  73. </html>