mirror of
https://github.com/discourse/discourse.git
synced 2024-12-12 04:53:51 +08:00
Merge pull request #2454 from riking/mobile-logo
Allow a sepearate mobile logo URL
This commit is contained in:
commit
f0a0be1c2c
|
@ -9,8 +9,13 @@ export default Ember.Component.extend({
|
||||||
return !Discourse.Mobile.mobileView && this.get("minimized");
|
return !Discourse.Mobile.mobileView && this.get("minimized");
|
||||||
}.property("minimized"),
|
}.property("minimized"),
|
||||||
|
|
||||||
|
showMobileLogo: function() {
|
||||||
|
return Discourse.Mobile.mobileView && !Ember.isBlank(this.get('mobileBigLogoUrl'));
|
||||||
|
}.property(),
|
||||||
|
|
||||||
smallLogoUrl: Discourse.computed.setting('logo_small_url'),
|
smallLogoUrl: Discourse.computed.setting('logo_small_url'),
|
||||||
bigLogoUrl: Discourse.computed.setting('logo_url'),
|
bigLogoUrl: Discourse.computed.setting('logo_url'),
|
||||||
|
mobileBigLogoUrl: Discourse.computed.setting('mobile_logo_url'),
|
||||||
title: Discourse.computed.setting('title'),
|
title: Discourse.computed.setting('title'),
|
||||||
|
|
||||||
click: function(e) {
|
click: function(e) {
|
||||||
|
|
|
@ -6,10 +6,14 @@
|
||||||
<i class="fa fa-home"></i>
|
<i class="fa fa-home"></i>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if bigLogoUrl}}
|
{{#if showMobileLogo}}
|
||||||
<img id="site-logo" class="logo-big" src="{{unbound bigLogoUrl}}" alt="{{unbound title}}">
|
<img id="site-logo" class="logo-big" src="{{unbound mobileBigLogoUrl}}" alt="{{unbound title}}">
|
||||||
{{else}}
|
{{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}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
<div class="contents">
|
<div class="contents">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="title span13">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -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"
|
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"
|
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"
|
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."
|
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"
|
notification_email: "The return email address used when sending system emails such as notifying users of lost passwords, new accounts etc"
|
||||||
|
|
|
@ -35,6 +35,9 @@ required:
|
||||||
digest_logo_url:
|
digest_logo_url:
|
||||||
client: false
|
client: false
|
||||||
default: ''
|
default: ''
|
||||||
|
mobile_logo_url:
|
||||||
|
client: true
|
||||||
|
default: ''
|
||||||
favicon_url:
|
favicon_url:
|
||||||
client: true
|
client: true
|
||||||
default: '/images/default-favicon.ico'
|
default: '/images/default-favicon.ico'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user