Merge pull request #2454 from riking/mobile-logo

Allow a sepearate mobile logo URL
This commit is contained in:
Neil Lalonde 2014-06-19 14:14:32 -04:00
commit f0a0be1c2c
5 changed files with 17 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

@ -6,10 +6,14 @@
<i class="fa fa-home"></i>
{{/if}}
{{else}}
{{#if bigLogoUrl}}
<img id="site-logo" class="logo-big" src="{{unbound bigLogoUrl}}" alt="{{unbound title}}">
{{#if showMobileLogo}}
<img id="site-logo" class="logo-big" src="{{unbound mobileBigLogoUrl}}" alt="{{unbound title}}">
{{else}}
<h2 id="site-text-logo" class="text-logo">{{unbound title}}</h2>
{{#if bigLogoUrl}}
<img id="site-logo" class="logo-big" src="{{unbound bigLogoUrl}}" alt="{{unbound title}}">
{{else}}
<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

@ -643,6 +643,7 @@ en:
digest_logo_url: "The logo used in your site's email digest. If left blank `logo_url` will be used. eg: http://example.com/logo.png"
logo_small_url: "The small logo for your site used when scrolling down on topics eg: http://example.com/logo-small.png"
favicon_url: "A favicon for your site, see http://en.wikipedia.org/wiki/Favicon"
mobile_logo_url: "The logo used for mobile browsers. If left blank, `logo_url` will be used. eg: http://example.com/uploads/default/logo.png"
apple_touch_icon_url: "Icon used for Apple touch devices. Recommended size is 144px by 144px."
notification_email: "The return email address used when sending system emails such as notifying users of lost passwords, new accounts etc"

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'