diff --git a/app/services/theme.js b/app/services/theme.js index 173b50beb..a1e72cc15 100644 --- a/app/services/theme.js +++ b/app/services/theme.js @@ -1,6 +1,5 @@ import Ember from 'ember'; import config from 'ember-get-config'; -import pathJoin from '../utils/path-join'; import buildProviderAssetPath from '../utils/build-provider-asset-path'; /** @@ -91,22 +90,12 @@ export default Ember.Service.extend({ // The logo object for social sharing logoSharing: Ember.computed('id', 'isDomain', function() { const id = this.get('id'); - let logo = {}; - if (id === 'osf') { - logo = config.PREPRINTS.providers - .find(provider => provider.id === id) - .logoSharing; - - logo.path = pathJoin('/preprints', logo.path); - } else { - logo = { - path: buildProviderAssetPath(config, id, 'sharing.png', this.get('isDomain')), - type: 'image/png', - width: 1200, - height: 630 - } - } - return logo; + return { + path: buildProviderAssetPath(config, id, 'sharing.png', this.get('isDomain')), + type: 'image/png', + width: 1200, + height: 630 + }; }), // The url to redirect users to sign up to diff --git a/config/environment.js b/config/environment.js index ef077a337..e8015a571 100644 --- a/config/environment.js +++ b/config/environment.js @@ -38,19 +38,6 @@ module.exports = function(environment) { }, PREPRINTS: { defaultProvider: 'osf', - // Logos are needed for open graph sharing meta tags (Facebook, LinkedIn, etc) and must be at least 200x200 - providers: [ - // OSF must be the first provider - { - id: 'osf', - logoSharing: { - path: '/assets/img/provider_logos/osf-dark.png', - type: 'image/png', - width: 363, - height: 242 - } - } - ], }, i18n: { defaultLocale: 'en' diff --git a/tests/unit/services/theme-test.js b/tests/unit/services/theme-test.js index dbe8b71a3..d92d94331 100644 --- a/tests/unit/services/theme-test.js +++ b/tests/unit/services/theme-test.js @@ -13,8 +13,6 @@ test('it exists', function(assert) { }); test('themes have proper config', function(assert) { - let providers = config.PREPRINTS.providers; - for (var provider of providers) { - assert.ok(typeof provider.id !== 'undefined'); - } + let defaultProvider = config.PREPRINTS.defaultProvider; + assert.equal(defaultProvider, 'osf'); });