Allow a sepearate mobile logo URL

This commit is contained in:
riking 2014-06-18 12:44:00 -07:00
parent ad2bd11d6e
commit cd186aee56
4 changed files with 16 additions and 4 deletions

View File

@ -9,8 +9,13 @@ export default Ember.Component.extend({
return !Discourse.Mobile.mobileView && this.get("minimized");
}.property("minimized"),
showMobileLogo: function() {
return Discourse.Mobile.mobileView && !Ember.isBlank(this.get('mobileBigLogoUrl'));
}.property(),
smallLogoUrl: Discourse.computed.setting('logo_small_url'),
bigLogoUrl: Discourse.computed.setting('logo_url'),
mobileBigLogoUrl: Discourse.computed.setting('mobile_logo_url'),
title: Discourse.computed.setting('title'),
click: function(e) {

View File

@ -5,6 +5,9 @@
{{else}}
<i class="fa fa-home"></i>
{{/if}}
{{else}}
{{#if showMobileLogo}}
<img id="site-logo" class="logo-big" src="{{unbound mobileBigLogoUrl}}" alt="{{unbound title}}">
{{else}}
{{#if bigLogoUrl}}
<img id="site-logo" class="logo-big" src="{{unbound bigLogoUrl}}" alt="{{unbound title}}">
@ -12,4 +15,5 @@
<h2 id="site-text-logo" class="text-logo">{{unbound title}}</h2>
{{/if}}
{{/if}}
{{/if}}
</a>

View File

@ -43,7 +43,7 @@
<div class="contents">
<div class="row">
<div class="title span13">
<a href="/"><img src="<%=SiteSetting.logo_url%>" alt="<%=SiteSetting.title%>" id="site-logo"></a>
<a href="/"><img src="<%= (mobile_view? && SiteSetting.mobile_logo_url) || SiteSetting.logo_url %>" alt="<%=SiteSetting.title%>" id="site-logo"></a>
</div>
</div>
</div>

View File

@ -35,6 +35,9 @@ required:
digest_logo_url:
client: false
default: ''
mobile_logo_url:
client: true
default: ''
favicon_url:
client: true
default: '/images/default-favicon.ico'