MDL-65144 output: Add img-fluid to logo

Extra wide logos do not scale to the screen size - this change adds the bootstrap class
img-fluid to logos on the loginpage, signupform and in the context header.

Thanks to Maksud R for working on this.
This commit is contained in:
Damyon Wiese
2019-04-01 15:49:29 +08:00
parent 0920f35ed9
commit 647fd16ec9
4 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -4053,7 +4053,7 @@ EOD;
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, 150), 'alt' => $sitename]), 'logo');
'src' => $this->get_logo_url(null, 150), 'alt' => $sitename, 'class' => 'img-fluid']), 'logo');
}
// Make sure to use the heading if it has been set.
+1 -1
View File
@@ -99,7 +99,7 @@
<div class="card">
<div class="card-block">
{{#logourl}}
<h2 class="card-header text-center" ><img src="{{logourl}}" title="{{sitename}}" alt="{{sitename}}"/></h2>
<h2 class="card-header text-center" ><img src="{{logourl}}" class="img-fluid" title="{{sitename}}" alt="{{sitename}}"/></h2>
{{/logourl}}
{{^logourl}}
<h2 class="card-header text-center">{{sitename}}</h2>
+1 -1
View File
@@ -15,7 +15,7 @@
<div class="card-body">
<div class="card-title text-xs-center">
{{#logourl}}
<h2><img src="{{logourl}}" title="{{sitename}}" alt="{{sitename}}"/></h2>
<h2><img class="img-fluid" src="{{logourl}}" title="{{sitename}}" alt="{{sitename}}"/></h2>
{{/logourl}}
{{^logourl}}
<h2>{{sitename}}</h2>
+1
View File
@@ -2,6 +2,7 @@
-------------------------*/
div.logo {
background: url([[setting:logo]]) 0 0 no-repeat;
background-size: contain;
display: block;
float: left;
height: 75px;