Merge branch 'MDL-57124-master' of git://github.com/damyon/moodle
This commit is contained in:
@@ -283,13 +283,16 @@ class renderer_base {
|
||||
* @param int $maxheight The maximum height, or null when the maximum height does not matter.
|
||||
* @return moodle_url|false
|
||||
*/
|
||||
public function get_logo_url($maxwidth = null, $maxheight = 100) {
|
||||
public function get_logo_url($maxwidth = null, $maxheight = 200) {
|
||||
global $CFG;
|
||||
$logo = get_config('core_admin', 'logo');
|
||||
if (empty($logo)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 200px high is the default image size which should be displayed at 100px in the page to account for retina displays.
|
||||
// It's not worth the overhead of detecting and serving 2 different images based on the device.
|
||||
|
||||
// Hide the requested size in the file path.
|
||||
$filepath = ((int) $maxwidth . 'x' . (int) $maxheight) . '/';
|
||||
|
||||
|
||||
@@ -73,16 +73,20 @@ class core_renderer extends \core_renderer {
|
||||
* @return string HTML to display the main header.
|
||||
*/
|
||||
public function full_header() {
|
||||
global $PAGE;
|
||||
|
||||
$html = html_writer::start_tag('header', array('id' => 'page-header', 'class' => 'row'));
|
||||
$html .= html_writer::start_div('col-xs-12 p-a-1');
|
||||
$html .= html_writer::start_div('card');
|
||||
$html .= html_writer::start_div('card-block');
|
||||
$html .= html_writer::div($this->context_header_settings_menu(), 'pull-xs-right context-header-settings-menu');
|
||||
$html .= $this->context_header();
|
||||
$html .= html_writer::start_div('clearfix', array('id' => 'page-navbar'));
|
||||
$html .= html_writer::tag('div', $this->navbar(), array('class' => 'breadcrumb-nav'));
|
||||
$html .= html_writer::div($this->page_heading_button(), 'breadcrumb-button');
|
||||
$html .= html_writer::end_div();
|
||||
if (empty($PAGE->layout_options['nonavbar'])) {
|
||||
$html .= html_writer::start_div('clearfix', array('id' => 'page-navbar'));
|
||||
$html .= html_writer::tag('div', $this->navbar(), array('class' => 'breadcrumb-nav'));
|
||||
$html .= html_writer::div($this->page_heading_button(), 'breadcrumb-button');
|
||||
$html .= html_writer::end_div();
|
||||
}
|
||||
$html .= html_writer::tag('div', $this->course_header(), array('id' => 'course-header'));
|
||||
$html .= html_writer::end_div();
|
||||
$html .= html_writer::end_div();
|
||||
@@ -140,7 +144,7 @@ class core_renderer extends \core_renderer {
|
||||
if ($this->should_display_main_logo($headinglevel)) {
|
||||
$sitename = format_string($SITE->fullname, true, array('context' => context_course::instance(SITEID)));
|
||||
return html_writer::div(html_writer::empty_tag('img', [
|
||||
'src' => $this->get_logo_url(null, 75), 'alt' => $sitename]), 'logo');
|
||||
'src' => $this->get_logo_url(null, 150), 'alt' => $sitename]), 'logo');
|
||||
}
|
||||
|
||||
return parent::context_header($headerinfo, $headinglevel);
|
||||
@@ -152,7 +156,7 @@ class core_renderer extends \core_renderer {
|
||||
* @return string
|
||||
*/
|
||||
public function get_compact_logo_url($maxwidth = 100, $maxheight = 100) {
|
||||
return parent::get_compact_logo_url(null, 35);
|
||||
return parent::get_compact_logo_url(null, 70);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -81,7 +81,7 @@ $THEME->layouts = [
|
||||
'file' => 'columns2.php',
|
||||
'regions' => array('side-pre'),
|
||||
'defaultregion' => 'side-pre',
|
||||
'options' => array('langmenu' => true),
|
||||
'options' => array('nonavbar' => true, 'langmenu' => true),
|
||||
),
|
||||
// My public page.
|
||||
'mypublic' => array(
|
||||
|
||||
@@ -1881,11 +1881,17 @@ img#persona_signin {
|
||||
#page-header {
|
||||
.logo {
|
||||
margin: $spacer 0;
|
||||
img {
|
||||
height: 75px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Header. */
|
||||
header {
|
||||
.logo img {
|
||||
height: 35px;
|
||||
}
|
||||
.collapse.in,
|
||||
.collapsing {
|
||||
display: block;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
.pagelayout-login .card-img-top {
|
||||
.pagelayout-login .card-title h2 img {
|
||||
max-width: 100%;
|
||||
max-height: 100px;
|
||||
}
|
||||
|
||||
.pagelayout-login #region-main {
|
||||
|
||||
@@ -97,12 +97,15 @@
|
||||
<div class="row">
|
||||
<div class="col-xl-6 push-xl-3 m-2-md col-sm-8 push-sm-2">
|
||||
<div class="card">
|
||||
{{#logourl}}
|
||||
<img class="card-img-top" src="{{logourl}}" alt="" role="presentation"/>
|
||||
{{/logourl}}
|
||||
<div class="card-block">
|
||||
<div class="card-title">
|
||||
<h2 class="m-t-1">{{sitename}}</h2>
|
||||
<div class="card-title text-xs-center">
|
||||
{{#logourl}}
|
||||
<h2><img src="{{logourl}}" title="{{sitename}}" alt="{{sitename}}"/></h2>
|
||||
{{/logourl}}
|
||||
{{^logourl}}
|
||||
<h2>{{sitename}}</h2>
|
||||
{{/logourl}}
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
{{#cansignup}}
|
||||
|
||||
@@ -2,10 +2,16 @@
|
||||
<div class="row">
|
||||
<div class="col-md-8 push-md-2 col-xl-6 push-xl-3">
|
||||
<div class="card">
|
||||
{{#logourl}}
|
||||
<img class="card-img-top" src="{{logourl}}">
|
||||
{{/logourl}}
|
||||
<div class="card-block">
|
||||
<div class="card-title text-xs-center">
|
||||
{{#logourl}}
|
||||
<h2><img src="{{logourl}}" title="{{sitename}}" alt="{{sitename}}"/></h2>
|
||||
{{/logourl}}
|
||||
{{^logourl}}
|
||||
<h2>{{sitename}}</h2>
|
||||
{{/logourl}}
|
||||
<hr>
|
||||
</div>
|
||||
<div class="card-title">
|
||||
<h3>{{#str}}newaccount{{/str}}</h3>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user