Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-29614 theme_formal_white: Change the way Formal White theme shrin…

…ks pages
  • Loading branch information...
commit 1bc47427f050596df9c377ba07edcdc36e6d0e36 1 parent 8d62463
@kordan kordan authored samhemelryk committed
View
2  theme/formal_white/config.php
@@ -175,7 +175,7 @@
'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true),
),
'report' => array(
- 'file' => 'general.php',
+ 'file' => 'report.php',
'regions' => array('side-pre'),
'defaultregion' => 'side-pre',
),
View
2  theme/formal_white/lang/en/theme_formal_white.php
@@ -70,6 +70,8 @@
$string['fontsizereferencedesc'] = 'This allows you to set the default font size for this theme. It is not recommended to set this higher than 13px as it is known to cause display problems with certain blocks.';
$string['footnote'] = 'Footnote';
$string['footnotedesc'] = 'The content from this textarea will be displayed in the footer of every page.';
+$string['framemargin'] = 'Frame margin';
+$string['framemargindesc'] = 'Room between the frame and the edge of the browser window. (This setting will be ignored whether "Formal white 1.9 look" is requested).';
$string['frontpagelogo'] = 'Custom front page logo';
$string['frontpagelogodesc'] = 'Change the logo that is displayed on the front page of your site by entering the URL to the image you wish to use (i.e. http://www.yoursite.local/myfrontpagelogo.png). This setting overrides the custom logo setting. As a reference the default logo is 300px wide, 80px high and a transparent png will work best.';
$string['headerbgc'] = 'Header background colour';
View
22 theme/formal_white/layout/embedded.php
@@ -11,20 +11,22 @@
<body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses) ?>">
<?php echo $OUTPUT->standard_top_of_body_html(); ?>
- <div id="page-content">
- <div id="region-main-box">
- <div id="region-post-box">
+ <div id="page">
+ <div id="page-content">
+ <div id="region-main-box">
+ <div id="region-post-box">
- <!-- main mandatory content of the moodle page -->
- <div id="region-main-wrap">
- <div id="region-main">
- <div class="region-content">
- <?php echo $OUTPUT->main_content() ?>
+ <!-- main mandatory content of the moodle page -->
+ <div id="region-main-wrap">
+ <div id="region-main">
+ <div class="region-content">
+ <?php echo $OUTPUT->main_content() ?>
+ </div>
</div>
</div>
- </div>
- <!-- end of main mandatory content of the moodle page -->
+ <!-- end of main mandatory content of the moodle page -->
+ </div>
</div>
</div>
</div>
View
220 theme/formal_white/layout/frontpage.php
@@ -50,110 +50,111 @@
<?php echo $OUTPUT->standard_head_html() ?>
</head>
<body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
- <?php echo $OUTPUT->standard_top_of_body_html();
-
-if ($hasframe) { ?>
- <div id="frametop">
- <div id="framebottom">
- <div id="frametopright">
- <div>&nbsp;</div>
- </div>
- <div id="frameleft">
- <div id="frameright">
- <div id="wrapper">
+ <?php echo $OUTPUT->standard_top_of_body_html(); ?>
+ <div id="page">
+
+ <?php if ($hasframe) { ?>
+ <div id="frametop">
+ <div id="framebottom">
+ <div id="frametopright">
+ <div>&nbsp;</div>
+ </div>
+ <div id="frameleft">
+ <div id="frameright">
+ <div id="wrapper">
<?php } ?>
<!-- begin of page-header -->
- <?php if ($hasheading) { ?>
- <div id="page-header">
- <?php if ($displaylogo) { ?>
- <div id="headerlogo">
- <img src="<?php echo $logourl ?>" alt="Custom logo here" />
- </div>
- <?php } else { ?>
- <h1 class="headerheading"><?php echo $PAGE->heading ?></h1>
- <?php } ?>
-
- <div class="headermenu">
- <?php
- echo $OUTPUT->login_info();
- if (($CFG->langmenu) && (!empty($PAGE->layout_options['langmenu']))) {
- echo $OUTPUT->lang_menu();
- }
- echo $PAGE->headingmenu;
- ?>
- </div>
- </div>
- <?php } ?>
+ <?php if ($hasheading) { ?>
+ <div id="page-header">
+ <?php if ($displaylogo) { ?>
+ <div id="headerlogo">
+ <img src="<?php echo $logourl ?>" alt="Custom logo here" />
+ </div>
+ <?php } else { ?>
+ <h1 class="headerheading"><?php echo $PAGE->heading ?></h1>
+ <?php } ?>
+
+ <div class="headermenu">
+ <?php
+ echo $OUTPUT->login_info();
+ if (($CFG->langmenu) && (!empty($PAGE->layout_options['langmenu']))) {
+ echo $OUTPUT->lang_menu();
+ }
+ echo $PAGE->headingmenu;
+ ?>
+ </div>
+ </div>
+ <?php } ?>
<!-- end of page-header -->
<!-- begin of custom menu -->
- <?php if ($hascustommenu) { ?>
- <div id="custommenu"><?php echo $custommenu; ?></div>
- <?php } ?>
+ <?php if ($hascustommenu) { ?>
+ <div id="custommenu"><?php echo $custommenu; ?></div>
+ <?php } ?>
<!-- end of custom menu -->
<!-- begin of navigation bar -->
- <?php if ($hasnavbar) { ?>
- <div class="navbar clearfix">
- <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
- <div class="navbutton"><?php echo $PAGE->button; ?></div>
- </div>
- <?php } ?>
+ <?php if ($hasnavbar) { ?>
+ <div class="navbar clearfix">
+ <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
+ <div class="navbutton"><?php echo $PAGE->button; ?></div>
+ </div>
+ <?php } ?>
<!-- end of navigation bar -->
<!-- start of moodle content -->
- <div id="page-content">
- <div id="region-main-box">
- <div id="region-post-box">
-
- <!-- main mandatory content of the moodle page -->
- <div id="region-main-wrap">
- <div id="region-main">
- <div class="region-content">
- <?php echo $OUTPUT->main_content() ?>
+ <div id="page-content">
+ <div id="region-main-box">
+ <div id="region-post-box">
+
+ <!-- main mandatory content of the moodle page -->
+ <div id="region-main-wrap">
+ <div id="region-main">
+ <div class="region-content">
+ <?php echo $OUTPUT->main_content() ?>
+ </div>
+ </div>
+ </div>
+ <!-- end of main mandatory content of the moodle page -->
+
+
+ <!-- left column block - diplayed only if... -->
+ <?php if ($hassidepre) { ?>
+ <div id="region-pre" class="block-region">
+ <div class="region-content">
+ <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
+ </div>
+ </div>
+ <?php } ?>
+ <!-- end of left column block - diplayed only if... -->
+
+ <!-- right column block - diplayed only if... -->
+ <?php if ($hassidepost) { ?>
+ <div id="region-post" class="block-region">
+ <div class="region-content">
+ <?php echo $OUTPUT->blocks_for_region('side-post') ?>
+ </div>
+ </div>
+ <?php } ?>
+ <!-- end of right column block - diplayed only if... -->
+
+ </div>
</div>
</div>
- </div>
- <!-- end of main mandatory content of the moodle page -->
-
-
- <!-- left column block - diplayed only if... -->
- <?php if ($hassidepre) { ?>
- <div id="region-pre" class="block-region">
- <div class="region-content">
- <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
- </div>
- </div>
- <?php } ?>
- <!-- end of left column block - diplayed only if... -->
-
- <!-- right column block - diplayed only if... -->
- <?php if ($hassidepost) { ?>
- <div id="region-post" class="block-region">
- <div class="region-content">
- <?php echo $OUTPUT->blocks_for_region('side-post') ?>
- </div>
- </div>
- <?php } ?>
- <!-- end of right column block - diplayed only if... -->
-
- </div>
- </div>
- </div>
<!-- end of moodle content -->
- <div class="clearfix"></div>
+ <div class="clearfix"></div>
<?php if ($hasframe) { ?>
- </div> <!-- end of wrapper -->
- </div> <!-- </frameright> -->
- </div> <!-- </frameleft> -->
- <div id="framebottomright">
- <div>&nbsp;</div>
- </div>
- </div> <!-- </framebottom> -->
- </div> <!-- </frametop> -->
+ </div> <!-- </wrapper> -->
+ </div> <!-- </frameright> -->
+ </div> <!-- </frameleft> -->
+ <div id="framebottomright">
+ <div>&nbsp;</div>
+ </div>
+ </div> <!-- </framebottom> -->
+ </div> <!-- </frametop> -->
<?php }
@@ -162,7 +163,7 @@
<!-- START OF FOOTER -->
<div id="page-footer">
- <?php if (!empty($PAGE->theme->settings->footnote)) { ?>
+ <?php if (!empty($PAGE->theme->settings->footnote)) { ?>
<div id="footerframetop">
<div id="footerframebottom">
<div id="footerframetopright">
@@ -170,51 +171,58 @@
</div>
<div id="footerframeleft">
<div id="footerframeright">
+
<!-- the content to show -->
<div id="footerwrapper">
<?php echo $PAGE->theme->settings->footnote; ?>
- </div> <!-- end of footerwrapper -->
- </div>
- </div> <!-- </footerframeright></footerframeleft> -->
+ </div> <!-- </footerwrapper> -->
+
+ </div> <!-- </footerframeright> -->
+ </div> <!-- </footerframeleft> -->
<div id="footerframebottomright">
<div>&nbsp;</div>
</div>
- </div>
- </div> <!-- </footerframebottom></footerframetop> -->
- <?php }
- //one more div is waiting to be closed
+ </div> <!-- </footerframebottom> -->
+ </div> <!-- </footerframetop> -->
+ <?php }
+ //one more div is waiting to be closed
} else { ?>
<!-- START OF FOOTER -->
<div id="page-footer" class="noframefooter">
<?php if (!empty($PAGE->theme->settings->footnote)) { ?>
- <div id="page-footer-content">
+ <div id="page-footer-content">
- <!-- the content to show -->
- <div id="footerwrapper">
- <?php echo $PAGE->theme->settings->footnote; ?>
- </div> <!-- end of footerwrapper -->
+ <!-- the content to show -->
+ <div id="footerwrapper">
+ <?php echo $PAGE->theme->settings->footnote; ?>
+ </div> <!-- </footerwrapper> -->
- </div> <!-- end of page-footer_noframe-content -->
+ </div> <!-- </page-footer-content> -->
<?php }
- //one more div is waiting to be closed
+ //one more div is waiting to be closed
+
} ?>
+
<div class="moodledocsleft">
- <?php
+ <?php
echo $OUTPUT->login_info();
if ($PAGE->theme->settings->creditstomoodleorg) {
echo $OUTPUT->home_link();
}
echo $OUTPUT->standard_footer_html();
- ?>
+ ?>
</div>
<div class="moodledocs">
<?php echo page_doc_link(get_string('moodledocslink')); ?>
</div>
- </div> <!-- end of page-footer or page-footer_noframe -->
-<?php //the waiting div has been closed
-}
+ </div> <!-- </page-footer> -->
+ </div> <!-- </page"> -->
+
+ <div class="clearfix"></div>
+
+<?php } //the waiting div has been closed: </page-footer>
echo $OUTPUT->standard_end_of_body_html(); ?>
</body>
</html>
View
231 theme/formal_white/layout/general.php
@@ -48,110 +48,111 @@
<?php echo $OUTPUT->standard_head_html() ?>
</head>
<body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
- <?php echo $OUTPUT->standard_top_of_body_html();
-
-if ($hasframe) { ?>
- <div id="frametop">
- <div id="framebottom">
- <div id="frametopright">
- <div>&nbsp;</div>
- </div>
- <div id="frameleft">
- <div id="frameright">
- <div id="wrapper">
+ <?php echo $OUTPUT->standard_top_of_body_html(); ?>
+ <div id="page">
+
+ <?php if ($hasframe) { ?>
+ <div id="frametop">
+ <div id="framebottom">
+ <div id="frametopright">
+ <div>&nbsp;</div>
+ </div>
+ <div id="frameleft">
+ <div id="frameright">
+ <div id="wrapper">
<?php } ?>
<!-- begin of page-header -->
- <?php if ($hasheading) { ?>
- <div id="page-header">
- <?php if ($displaylogo) { ?>
- <div id="headerlogo">
- <img src="<?php echo $logourl ?>" alt="Custom logo here" />
- </div>
- <?php } else { ?>
- <h1 class="headerheading"><?php echo $PAGE->heading ?></h1>
- <?php } ?>
-
- <div class="headermenu">
- <?php
- echo $OUTPUT->login_info();
- if (($CFG->langmenu) && (!empty($PAGE->layout_options['langmenu']))) {
- echo $OUTPUT->lang_menu();
- }
- echo $PAGE->headingmenu;
- ?>
- </div>
- </div>
- <?php } ?>
+ <?php if ($hasheading) { ?>
+ <div id="page-header">
+ <?php if ($displaylogo) { ?>
+ <div id="headerlogo">
+ <img src="<?php echo $logourl ?>" alt="Custom logo here" />
+ </div>
+ <?php } else { ?>
+ <h1 class="headerheading"><?php echo $PAGE->heading ?></h1>
+ <?php } ?>
+
+ <div class="headermenu">
+ <?php
+ echo $OUTPUT->login_info();
+ if (($CFG->langmenu) && (!empty($PAGE->layout_options['langmenu']))) {
+ echo $OUTPUT->lang_menu();
+ }
+ echo $PAGE->headingmenu;
+ ?>
+ </div>
+ </div>
+ <?php } ?>
<!-- end of page-header -->
<!-- begin of custom menu -->
- <?php if ($hascustommenu) { ?>
- <div id="custommenu"><?php echo $custommenu; ?></div>
- <?php } ?>
+ <?php if ($hascustommenu) { ?>
+ <div id="custommenu"><?php echo $custommenu; ?></div>
+ <?php } ?>
<!-- end of custom menu -->
<!-- begin of navigation bar -->
- <?php if ($hasnavbar) { ?>
- <div class="navbar clearfix">
- <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
- <div class="navbutton"><?php echo $PAGE->button; ?></div>
- </div>
- <?php } ?>
+ <?php if ($hasnavbar) { ?>
+ <div class="navbar clearfix">
+ <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
+ <div class="navbutton"><?php echo $PAGE->button; ?></div>
+ </div>
+ <?php } ?>
<!-- end of navigation bar -->
<!-- start of moodle content -->
- <div id="page-content">
- <div id="region-main-box">
- <div id="region-post-box">
-
- <!-- main mandatory content of the moodle page -->
- <div id="region-main-wrap">
- <div id="region-main">
- <div class="region-content">
- <?php echo $OUTPUT->main_content() ?>
+ <div id="page-content">
+ <div id="region-main-box">
+ <div id="region-post-box">
+
+ <!-- main mandatory content of the moodle page -->
+ <div id="region-main-wrap">
+ <div id="region-main">
+ <div class="region-content">
+ <?php echo $OUTPUT->main_content() ?>
+ </div>
+ </div>
+ </div>
+ <!-- end of main mandatory content of the moodle page -->
+
+
+ <!-- left column block - diplayed only if... -->
+ <?php if ($hassidepre) { ?>
+ <div id="region-pre" class="block-region">
+ <div class="region-content">
+ <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
+ </div>
+ </div>
+ <?php } ?>
+ <!-- end of left column block - diplayed only if... -->
+
+ <!-- right column block - diplayed only if... -->
+ <?php if ($hassidepost) { ?>
+ <div id="region-post" class="block-region">
+ <div class="region-content">
+ <?php echo $OUTPUT->blocks_for_region('side-post') ?>
+ </div>
+ </div>
+ <?php } ?>
+ <!-- end of right column block - diplayed only if... -->
+
+ </div>
</div>
</div>
- </div>
- <!-- end of main mandatory content of the moodle page -->
-
-
- <!-- left column block - diplayed only if... -->
- <?php if ($hassidepre) { ?>
- <div id="region-pre" class="block-region">
- <div class="region-content">
- <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
- </div>
- </div>
- <?php } ?>
- <!-- end of left column block - diplayed only if... -->
-
- <!-- right column block - diplayed only if... -->
- <?php if ($hassidepost) { ?>
- <div id="region-post" class="block-region">
- <div class="region-content">
- <?php echo $OUTPUT->blocks_for_region('side-post') ?>
- </div>
- </div>
- <?php } ?>
- <!-- end of right column block - diplayed only if... -->
-
- </div>
- </div>
- </div>
<!-- end of moodle content -->
- <div class="clearfix"></div>
+ <div class="clearfix"></div>
<?php if ($hasframe) { ?>
- </div> <!-- end of wrapper -->
- </div> <!-- </frameright> -->
- </div> <!-- </frameleft> -->
- <div id="framebottomright">
- <div>&nbsp;</div>
- </div>
- </div> <!-- </framebottom> -->
- </div> <!-- </frametop> -->
+ </div> <!-- </wrapper> -->
+ </div> <!-- </frameright> -->
+ </div> <!-- </frameleft> -->
+ <div id="framebottomright">
+ <div>&nbsp;</div>
+ </div>
+ </div> <!-- </framebottom> -->
+ </div> <!-- </frametop> -->
<?php }
@@ -160,7 +161,7 @@
<!-- START OF FOOTER -->
<div id="page-footer">
- <?php if (!empty($PAGE->theme->settings->footnote)) { ?>
+ <?php if (!empty($PAGE->theme->settings->footnote)) { ?>
<div id="footerframetop">
<div id="footerframebottom">
<div id="footerframetopright">
@@ -168,62 +169,68 @@
</div>
<div id="footerframeleft">
<div id="footerframeright">
+
<!-- the content to show -->
<div id="footerwrapper">
<?php echo $PAGE->theme->settings->footnote; ?>
- </div> <!-- end of footerwrapper -->
- </div>
- </div> <!-- </footerframeright></footerframeleft> -->
+ </div> <!-- </footerwrapper> -->
+
+ </div> <!-- </footerframeright> -->
+ </div> <!-- </footerframeleft> -->
<div id="footerframebottomright">
<div>&nbsp;</div>
</div>
- </div>
- </div> <!-- </footerframebottom></footerframetop> -->
- <?php }
- //one more div is waiting to be closed
+ </div> <!-- </footerframebottom> -->
+ </div> <!-- </footerframetop> -->
+ <?php }
+ //one more div is waiting to be closed
} else { ?>
<!-- START OF FOOTER -->
<div id="page-footer" class="noframefooter">
<?php if (!empty($PAGE->theme->settings->footnote)) { ?>
- <div id="page-footer-content">
- <!-- the content to show -->
- <div id="footerwrapper">
- <?php echo $PAGE->theme->settings->footnote; ?>
- </div> <!-- end of footerwrapper -->
- </div> <!-- end of page-footer_noframe-content -->
+ <div id="page-footer-content">
+
+ <!-- the content to show -->
+ <div id="footerwrapper">
+ <?php echo $PAGE->theme->settings->footnote; ?>
+ </div> <!-- </footerwrapper> -->
+
+ </div> <!-- </page-footer-content> -->
<?php }
- //one more div is waiting to be closed
+ //one more div is waiting to be closed
+
} ?>
<div class="moodledocsleft">
- <?php
+ <?php
echo $OUTPUT->login_info();
//echo $OUTPUT->home_link();
- ?>
+ ?>
<div class="moodledocs">
<?php echo page_doc_link(get_string('moodledocslink')); ?>
</div>
- <?php
+ <?php
if ($PAGE->theme->settings->creditstomoodleorg == 2) {
// can not use $OUTPUT->home_link() here because whether $OUTPUT->page->pagetype != 'site-index'
// the output of the function is not the classic nice moodle logo $this->pix_url('moodlelogo')
- ?>
+ ?>
<div class="sitelink">
<a title="Moodle" href="http://moodle.org/">
<img style="width:100px;height:30px" src="<?php echo $this->pix_url('moodlelogo') ?>" alt="moodlelogo" />
</a>
</div>
- <?php
+ <?php
}
- ?>
- <?php
echo $OUTPUT->standard_footer_html();
- ?>
+ ?>
</div>
- </div> <!-- end of page-footer or page-footer_noframe -->
-<?php //the waiting div has been closed
-}
+ </div> <!-- </page-footer> -->
+ </div> <!-- </page"> -->
+
+ <div class="clearfix"></div>
+
+<?php } //the waiting div has been closed: </page-footer>
echo $OUTPUT->standard_end_of_body_html(); ?>
</body>
</html>
View
193 theme/formal_white/layout/report.php
@@ -0,0 +1,193 @@
+<?php
+
+$hasheading = ($PAGE->heading);
+$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
+$hasfooter = (empty($PAGE->layout_options['nofooter']));
+$hassidepre = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-pre', $OUTPUT));
+$haslogininfo = (empty($PAGE->layout_options['nologininfo']));
+
+$showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
+
+$custommenu = $OUTPUT->custom_menu();
+$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
+
+$bodyclasses = array();
+if (!$showsidepre) {
+ $bodyclasses[] = 'content-only';
+}
+if ($hascustommenu) {
+ $bodyclasses[] = 'has_custom_menu';
+}
+
+/************************************************************************************************/
+if (!empty($PAGE->theme->settings->logo)) {
+ $logourl = $PAGE->theme->settings->logo;
+} else {
+ $logourl = $OUTPUT->pix_url('logo_small', 'theme');
+}
+
+$hasframe = !isset($PAGE->theme->settings->noframe) || !$PAGE->theme->settings->noframe;
+
+$displaylogo = !isset($PAGE->theme->settings->displaylogo) || $PAGE->theme->settings->displaylogo;
+/************************************************************************************************/
+
+echo $OUTPUT->doctype() ?>
+<html <?php echo $OUTPUT->htmlattributes() ?>>
+<head>
+ <title><?php echo $PAGE->title ?></title>
+ <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
+ <?php echo $OUTPUT->standard_head_html() ?>
+</head>
+<body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
+ <?php echo $OUTPUT->standard_top_of_body_html(); ?>
+ <div id="page">
+
+ <?php if ($hasframe) { ?>
+ <div id="frametop">
+ <div id="framebottom">
+ <div id="frametopright">
+ <div>&nbsp;</div>
+ </div>
+ <div id="frameleft">
+ <div id="frameright">
+ <div id="wrapper">
+<?php } ?>
+
+<!-- begin of page-header -->
+ <?php if ($hasheading) { ?>
+ <div id="page-header">
+ <?php if ($displaylogo) { ?>
+ <div id="headerlogo">
+ <img src="<?php echo $logourl ?>" alt="Custom logo here" />
+ </div>
+ <?php } else { ?>
+ <h1 class="headerheading"><?php echo $PAGE->heading ?></h1>
+ <?php } ?>
+
+ <div class="headermenu">
+ <?php
+ echo $OUTPUT->login_info();
+ if (($CFG->langmenu) && (!empty($PAGE->layout_options['langmenu']))) {
+ echo $OUTPUT->lang_menu();
+ }
+ echo $PAGE->headingmenu;
+ ?>
+ </div>
+ </div>
+ <?php } ?>
+<!-- end of page-header -->
+
+<!-- begin of custom menu -->
+ <?php if ($hascustommenu) { ?>
+ <div id="custommenu"><?php echo $custommenu; ?></div>
+ <?php } ?>
+<!-- end of custom menu -->
+
+<!-- begin of navigation bar -->
+ <?php if ($hasnavbar) { ?>
+ <div class="navbar clearfix">
+ <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
+ <div class="navbutton"><?php echo $PAGE->button; ?></div>
+ </div>
+ <?php } ?>
+<!-- end of navigation bar -->
+
+<!-- start of moodle content -->
+ <div id="page-content" class="clearfix">
+ <div id="report-main-content">
+ <div class="region-content">
+ <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
+ </div>
+ </div>
+ <?php if ($hassidepre) { ?>
+ <div id="report-region-wrap">
+ <div id="report-region-pre" class="block-region">
+ <div class="region-content">
+ <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
+ </div>
+ </div>
+ </div>
+ <?php } ?>
+ </div>
+<!-- end of moodle content -->
+
+ <div class="clearfix"></div>
+
+<?php if ($hasframe) { ?>
+ </div> <!-- end of wrapper -->
+ </div> <!-- </frameright> -->
+ </div> <!-- </frameleft> -->
+ <div id="framebottomright">
+ <div>&nbsp;</div>
+ </div>
+ </div> <!-- </framebottom> -->
+ </div> <!-- </frametop> -->
+
+<?php }
+
+if ($hasfooter) {
+ if ($hasframe) { ?>
+
+ <!-- START OF FOOTER -->
+ <div id="page-footer">
+ <?php if (!empty($PAGE->theme->settings->footnote)) { ?>
+ <div id="footerframetop">
+ <div id="footerframebottom">
+ <div id="footerframetopright">
+ <div>&nbsp;</div>
+ </div>
+ <div id="footerframeleft">
+ <div id="footerframeright">
+
+ <!-- the content to show -->
+ <div id="footerwrapper">
+ <?php echo $PAGE->theme->settings->footnote; ?>
+ </div> <!-- </footerwrapper> -->
+
+ </div> <!-- </footerframeright> -->
+ </div> <!-- </footerframeleft> -->
+ <div id="footerframebottomright">
+ <div>&nbsp;</div>
+ </div>
+ </div> <!-- </footerframebottom> -->
+ </div> <!-- </footerframetop> -->
+ <?php }
+ //one more div is waiting to be closed
+
+ } else { ?>
+
+ <!-- START OF FOOTER -->
+ <div id="page-footer" class="noframefooter">
+ <?php if (!empty($PAGE->theme->settings->footnote)) { ?>
+ <div id="page-footer-content">
+
+ <!-- the content to show -->
+ <div id="footerwrapper">
+ <?php echo $PAGE->theme->settings->footnote; ?>
+ </div> <!-- </footerwrapper> -->
+
+ </div> <!-- </page-footer-content> -->
+ <?php }
+ //one more div is waiting to be closed
+
+ } ?>
+
+ <div class="moodledocsleft">
+ <?php
+ //echo $OUTPUT->login_info();
+ //echo $OUTPUT->home_link();
+ echo $OUTPUT->standard_footer_html();
+ ?>
+ </div>
+ <div class="moodledocs">
+ <?php echo page_doc_link(get_string('moodledocslink')); ?>
+ </div>
+ </div> <!-- </page-footer> -->
+ </div> <!-- </page"> -->
+
+ <div class="clearfix"></div>
+
+<?php } //the waiting div has been closed: </page-footer>
+ echo $OUTPUT->standard_end_of_body_html(); ?>
+</body>
+</html>
View
27 theme/formal_white/lib.php
@@ -19,6 +19,14 @@ function formal_white_user_settings($css, $theme) {
}
$css = formal_white_set_fontsizereference($css, $fontsizereference);
+ // Set the frame margin
+ if (!isset($theme->settings->framemargin)) {
+ $framemargin = 15; // default
+ } else {
+ $framemargin = $theme->settings->framemargin;
+ }
+ $css = formal_white_set_framemargin($css, $framemargin);
+
// Set the page header background color
if (empty($theme->settings->headerbgc)) {
$headerbgc = '#E3DFD4'; // default
@@ -67,7 +75,6 @@ function formal_white_user_settings($css, $theme) {
}
$css = formal_white_set_customcss($css, $customcss);
- // Return the CSS
return $css;
}
@@ -83,6 +90,17 @@ function formal_white_set_fontsizereference($css, $fontsizereference) {
return $css;
}
+function formal_white_set_framemargin($css, $framemargin) {
+ $tag = '[[setting:framemargin]]';
+ $css = str_replace($tag, $framemargin.'px', $css);
+
+ // Set .headermenu right
+ $tag = '[[setting:headermenuright]]';
+ $css = str_replace($tag, ($framemargin+17).'px', $css); // 17px is the width of the frame
+
+ return $css;
+}
+
function formal_white_set_headerbgc($css, $headerbgc) {
$tag = '[[setting:headerbgc]]';
$css = str_replace($tag, $headerbgc, $css);
@@ -117,6 +135,13 @@ function formal_white_set_blockcolumnwidth($css, $blockcolumnwidth) {
$tag = '[[setting:doubleblockcolumnwidth]]';
$css = str_replace($tag, (2*$blockcolumnwidth).'px', $css);
+ // set the min-width of the page to provide: content region min-width = block region width
+ // I do not care $framemargin because the min-width applies to #frametop that is free from $framemargin
+ // I need to add twice the width of the frame because it is inside #frametop
+ // (this code here because it HAS TO come later than $blockcolumnwidth definition)
+ $tag = '[[setting:minwidth]]';
+ $css = str_replace($tag, (3*$blockcolumnwidth + 34).'px', $css); // 34 = 2*17 (17px is the width of the frame)
+
return $css;
}
View
9 theme/formal_white/settings.php
@@ -24,6 +24,15 @@
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
$settings->add($setting);
+ // Frame margin
+ $name = 'theme_formal_white/framemargin';
+ $title = get_string('framemargin','theme_formal_white');
+ $description = get_string('framemargindesc', 'theme_formal_white');
+ $default = '15';
+ $choices = array(0=>'0px', 5=>'5px', 10=>'10px', 15=>'15px', 20=>'20px', 25=>'25px', 30=>'30px', 35=>'35px', 40=>'40px', 45=>'45px', 50=>'50px');
+ $setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
+ $settings->add($setting);
+
// Display logo or heading
$name = 'theme_formal_white/displaylogo';
$title = get_string('displaylogo','theme_formal_white');
View
35 theme/formal_white/style/formal_white.css
@@ -19,15 +19,19 @@ h2 {font-size:130%;}
h3 {font-size:120%;}
h4 {font-weight:bold;}
-h2.main, h3.main, h4.main {margin:0;padding:0;text-align: center;}
-
-#headerlogo {margin:0.3em;float:left;top:1em;}
h1.headerheading {margin:14px 11px 8px 11px;float:left;font-size:200%;}
+h2.main, h3.main, h4.main {margin:0;padding:0;text-align:center;}
-/* headermenu */
+/* page-header */
#page-header{line-height:0;overflow:hidden;}
-/*#headerlogo img {margin:7px;}*/
-.headermenu {position:relative;line-height:1.7em;font-size:90%;margin:0.3em 0.3em 0.3em 0;right:0.3em;}
+
+/* headerlogo */
+#headerlogo {position:relative;margin:0.3em;}
+ /* if I use: position:absolute; I even need height:105px; in #page-header */
+ /* if I use: position:relative; z-index doesn't work*/
+
+/* headermenu */
+.headermenu {position:absolute;text-align:right;line-height:1.7em;font-size:90%;margin:0.3em;right:[[setting:headermenuright]];top:15px;}
#dock {background-color:[[setting:blockcontentbgc]];border-right:1px #000 dashed;}
#dock .dockeditem_container {margin-top: 10px;}
@@ -40,6 +44,13 @@ h1.headerheading {margin:14px 11px 8px 11px;float:left;font-size:200%;}
.navbar li span {color:#E3DFD4;}
.navbar li a:link, .navbar li a:visited {color:white;}
+#page-content {
+ /* min-width here is useless until min-width in frame.css/#frametop is gretaer enought to hold this #page-content min-width */
+ /* #page-content min-width is inherited by parent themes */
+ /* #page-content min-width = 0 frees me from possible related problems */
+ min-width:0;
+}
+
/* navbutton */
.navbutton {padding-right:0.5em;}
.navbutton table td {padding:0;}
@@ -50,6 +61,7 @@ h1.headerheading {margin:14px 11px 8px 11px;float:left;font-size:200%;}
background-repeat: no-repeat;
background-position: 0 -1px;
}
+
.block_navigation .block_tree li.type_category.contains_branch.collapsed>p span {
padding-left: 20px;
background-image: url([[pix:theme|folderclose]]);
@@ -143,7 +155,7 @@ ul.topics .section span.commands {position:absolute;right:1em;}
.mform fieldset {border:1px #DDD solid;}
.mform .fitem .fitemtitle {width:25%;}
.mform .fitem .fitemtitle label {padding-right:5px;}
-.mform .fitem .felement {margin-left:26%;width:73%;}
+.mform .fitem .felement {margin-left:26%;width:73%;min-height: 0.8em;}
/*.mform .fitem fieldset.felement {padding-left:0}*/
.mform .fitem .fitemtitle .helplink img {margin-right:-5px;}
.mform .fsubmit {text-align:left}
@@ -206,9 +218,18 @@ pre, code, tt {
background: none repeat scroll 0 0 [[setting:lblockcolumnbgc]];
}
+.notifytiny {
+ font-size: 1em;
+}
+
/* MDL-29403 */
.capdefault {background-image:url([[pix:theme|gradient_h]]);background-repeat:repeat-x;background-color:#E3DFD4;}
table#defineroletable th {border-top:none;}
+form.loginform .rememberusername {
+ padding-left:0.3em;
+ width: auto;
+}
+
/** Custom CSS **/
[[setting:customcss]]
View
4 theme/formal_white/style/frame.css
@@ -55,10 +55,10 @@
#frametop,
#footerframetop {
background-image:url([[pix:theme|roundcorner/header]]);
- margin:15px 15px 0;
+ margin:[[setting:framemargin]] [[setting:framemargin]] 0;
background-position:0 0;
background-repeat:repeat-x;
- min-width:934px;
+ min-width:[[setting:minwidth]];
}
#frametopright,
View
4 theme/formal_white/style/quiz.css
@@ -27,4 +27,6 @@
#page-mod-quiz-edit .quizpagedelete,
#page-mod-quiz-edit .quizpagedelete img {background-color:transparent;}
-#page-mod-quiz-edit #page-footer {padding:0;}
+#page-mod-quiz-edit #page-footer {padding:0;}
+
+/*#page-mod-quiz-report.pagelayout-report .no-overflow {overflow: auto;}*/
View
2  theme/formal_white/version.php
@@ -25,7 +25,7 @@
defined('MOODLE_INTERNAL') || die;
-$plugin->version = 2011082400; // The current module version (Date: YYYYMMDDXX)
+$plugin->version = 2012011900; // The current module version (Date: YYYYMMDDXX)
$plugin->requires = 2011081700; // Requires this Moodle version
$plugin->component = 'theme_formal_white';
$plugin->maturity = MATURITY_STABLE;
Please sign in to comment.
Something went wrong with that request. Please try again.