/public_html/theme/arialist/layout/frontpage.php

https://github.com/hatone/moodle · PHP · 124 lines · 100 code · 24 blank · 0 comment · 14 complexity · 74965de0462476918a0891ef37b90ea0 MD5 · raw file

  1. <?php
  2. $hasheading = ($PAGE->heading);
  3. $hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
  4. $hasfooter = (empty($PAGE->layout_options['nofooter']));
  5. $hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
  6. $showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT));
  7. $custommenu = $OUTPUT->custom_menu();
  8. $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
  9. $bodyclasses = array();
  10. if ($showsidepost) {
  11. $bodyclasses[] = 'side-post-only';
  12. } else if (!$showsidepost) {
  13. $bodyclasses[] = 'content-only';
  14. }
  15. if ($hascustommenu) {
  16. $bodyclasses[] = 'has-custom-menu';
  17. }
  18. if (!empty($PAGE->theme->settings->tagline)) {
  19. $tagline = '<p>'.$PAGE->theme->settings->tagline.'</p>';
  20. } else {
  21. $tagline = '<!-- There was no custom tagline set -->';
  22. }
  23. if (!empty($PAGE->theme->settings->logo)) {
  24. $logourl = $PAGE->theme->settings->logo;
  25. }
  26. echo $OUTPUT->doctype() ?>
  27. <html <?php echo $OUTPUT->htmlattributes() ?>>
  28. <head>
  29. <title><?php echo $PAGE->title ?></title>
  30. <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
  31. <meta name="description" content="<?php p(strip_tags(format_text($SITE->summary, FORMAT_HTML))) ?>" />
  32. <?php echo $OUTPUT->standard_head_html() ?>
  33. </head>
  34. <body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
  35. <?php echo $OUTPUT->standard_top_of_body_html() ?>
  36. <?php if ($hascustommenu) { ?>
  37. <div id="custommenu"><?php echo $custommenu; ?></div>
  38. <?php } ?>
  39. <div id="page">
  40. <div id="wrapper" class="clearfix">
  41. <!-- START OF HEADER -->
  42. <div id="page-header">
  43. <div id="page-header-wrapper" class="wrapper clearfix">
  44. <div id="header-left">
  45. <?php if (!empty($PAGE->theme->settings->logo)) { ?>
  46. <a href="<?php echo $CFG->wwwroot; ?>" title="Home"><img id="logo" src="<?php echo $logourl; ?>" alt="Logo" /></a>
  47. <?php } else { ?>
  48. <h1 class="headermain"><a href="<?php echo $CFG->wwwroot; ?>" title="Home"><?php echo $PAGE->heading ?></a></h1>
  49. <div class="tagline"><?php echo $tagline; ?></div>
  50. <?php } ?>
  51. </div>
  52. <div class="headermenu">
  53. <?php
  54. echo $OUTPUT->login_info();
  55. echo $OUTPUT->lang_menu();
  56. echo $PAGE->headingmenu;
  57. ?>
  58. </div>
  59. </div>
  60. </div>
  61. <!-- END OF HEADER -->
  62. <!-- START OF CONTENT -->
  63. <div id="page-content-wrapper" class="wrapper clearfix">
  64. <div id="page-content">
  65. <div id="region-main-box">
  66. <div id="region-post-box">
  67. <div id="region-main-wrap">
  68. <div id="region-main">
  69. <div class="region-content">
  70. <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
  71. </div>
  72. </div>
  73. </div>
  74. <?php if ($hassidepost) { ?>
  75. <div id="region-post" class="block-region">
  76. <div class="region-content">
  77. <?php echo $OUTPUT->blocks_for_region('side-post') ?>
  78. </div>
  79. </div>
  80. <?php } ?>
  81. </div>
  82. </div>
  83. </div>
  84. </div>
  85. <!-- END OF CONTENT -->
  86. </div> <!-- END #wrapper -->
  87. <!-- START OF FOOTER -->
  88. <div id="page-footer" class="wrapper clearfix">
  89. <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
  90. <?php
  91. echo $OUTPUT->login_info();
  92. echo $OUTPUT->home_link();
  93. echo $OUTPUT->standard_footer_html();
  94. ?>
  95. </div>
  96. <!-- END OF FOOTER -->
  97. </div> <!-- END #page -->
  98. <?php echo $OUTPUT->standard_end_of_body_html() ?>
  99. </body>
  100. </html>