File tree 1 file changed +10
-5
lines changed
app/assets/javascripts/discourse/views 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -87,20 +87,25 @@ Discourse.HeaderView = Discourse.View.extend({
87
87
88
88
/**
89
89
Display the correct logo in the header, showing a custom small icon if it exists.
90
-
90
+ In case the logo_url setting is empty, shows the site title as the logo.
91
91
@property logoHTML
92
92
**/
93
93
logoHTML : function ( ) {
94
94
var result = "<div class='title'><a href='" + Discourse . getURL ( "/" ) + "'>" ;
95
95
if ( this . get ( 'controller.showExtraInfo' ) ) {
96
- var logo = Discourse . SiteSettings . logo_small_url ;
97
- if ( logo && logo . length > 1 ) {
98
- result += "<img class='logo-small' src='" + logo + "' width='33' height='33'>" ;
96
+ var logoSmall = Discourse . SiteSettings . logo_small_url ;
97
+ if ( logoSmall && logoSmall . length > 1 ) {
98
+ result += "<img class='logo-small' src='" + logoSmall + "' width='33' height='33'>" ;
99
99
} else {
100
100
result += "<i class='icon-home'></i>" ;
101
101
}
102
102
} else {
103
- result += "<img class='logo-big' src=\"" + Discourse . SiteSettings . logo_url + "\" alt=\"" + Discourse . SiteSettings . title + "\" id='site-logo'>" ;
103
+ var logo = Discourse . SiteSettings . logo_url ;
104
+ if ( logo && logo . length > 1 ) {
105
+ result += "<img class='logo-big' src=\"" + logo + "\" alt=\"" + Discourse . SiteSettings . title + "\" id='site-logo'>" ;
106
+ } else {
107
+ result += "<h2 class='text-logo' id='site-text-logo'>" + Discourse . SiteSettings . title + "</h2>"
108
+ }
104
109
}
105
110
result += "</a></div>" ;
106
111
return new Handlebars . SafeString ( result ) ;
You can’t perform that action at this time.
0 commit comments