2021-10-11 19:14:18 +03:00
|
|
|
import Controller from '@ember/controller';
|
2021-10-12 12:18:55 +03:00
|
|
|
import {action} from '@ember/object';
|
2021-10-11 21:30:58 +03:00
|
|
|
import {inject as service} from '@ember/service';
|
2021-10-12 12:18:55 +03:00
|
|
|
import {tracked} from '@glimmer/tracking';
|
2021-10-11 19:14:18 +03:00
|
|
|
|
|
|
|
export default class ChangeThemeController extends Controller {
|
2021-10-12 12:18:55 +03:00
|
|
|
@service store;
|
2021-10-11 21:30:58 +03:00
|
|
|
@service themeManagement;
|
|
|
|
|
2021-10-12 12:18:55 +03:00
|
|
|
@tracked showAdvanced = false;
|
2021-10-12 15:50:57 +03:00
|
|
|
@tracked themes = this.store.peekAll('theme');
|
2021-10-12 12:18:55 +03:00
|
|
|
|
2021-10-11 19:14:18 +03:00
|
|
|
marketplaceThemes = [{
|
2021-10-13 18:36:26 +03:00
|
|
|
name: 'Journal',
|
|
|
|
category: 'Newsletter',
|
|
|
|
url: 'https://github.com/TryGhost/Journal',
|
|
|
|
previewUrl: 'https://journal.ghost.io/',
|
|
|
|
ref: 'TryGhost/Journal',
|
|
|
|
image: 'assets/img/themes/Journal.png'
|
|
|
|
}, {
|
2021-10-11 19:14:18 +03:00
|
|
|
name: 'Edition',
|
|
|
|
category: 'Newsletter',
|
|
|
|
url: 'https://github.com/TryGhost/Edition',
|
2021-10-12 16:27:51 +03:00
|
|
|
previewUrl: 'https://edition.ghost.io/',
|
2021-10-11 19:14:18 +03:00
|
|
|
ref: 'TryGhost/Edition',
|
2021-10-13 18:36:26 +03:00
|
|
|
image: 'assets/img/themes/Edition.png'
|
|
|
|
}, {
|
|
|
|
name: 'Digest',
|
|
|
|
category: 'Newsletter',
|
|
|
|
url: 'https://github.com/TryGhost/Digest',
|
|
|
|
previewUrl: 'https://digest.ghost.io/',
|
|
|
|
ref: 'TryGhost/Digest',
|
|
|
|
image: 'assets/img/themes/Digest.png'
|
|
|
|
}, {
|
|
|
|
name: 'Bulletin',
|
|
|
|
category: 'Newsletter',
|
|
|
|
url: 'https://github.com/TryGhost/Bulletin',
|
|
|
|
previewUrl: 'https://bulletin.ghost.io/',
|
|
|
|
ref: 'TryGhost/Bulletin',
|
|
|
|
image: 'assets/img/themes/Bulletin.png'
|
|
|
|
}, {
|
|
|
|
name: 'Dawn',
|
|
|
|
category: 'Newsletter',
|
|
|
|
url: 'https://github.com/TryGhost/Dawn',
|
|
|
|
previewUrl: 'https://dawn.ghost.io/',
|
|
|
|
ref: 'TryGhost/Dawn',
|
|
|
|
image: 'assets/img/themes/Dawn.png'
|
2021-10-11 19:14:18 +03:00
|
|
|
}, {
|
|
|
|
name: 'Alto',
|
|
|
|
category: 'Blog',
|
|
|
|
url: 'https://github.com/TryGhost/Alto',
|
2021-10-12 16:27:51 +03:00
|
|
|
previewUrl: 'https://alto.ghost.io',
|
2021-10-11 19:14:18 +03:00
|
|
|
ref: 'TryGhost/Alto',
|
2021-10-13 18:36:26 +03:00
|
|
|
image: 'assets/img/themes/Alto.png'
|
2021-10-11 19:14:18 +03:00
|
|
|
}, {
|
2021-10-13 18:36:26 +03:00
|
|
|
name: 'Edge',
|
2021-10-11 19:14:18 +03:00
|
|
|
category: 'Photography',
|
2021-10-13 18:36:26 +03:00
|
|
|
url: 'https://github.com/TryGhost/Edge',
|
|
|
|
previewUrl: 'https://edge.ghost.io',
|
|
|
|
ref: 'TryGhost/Edge',
|
|
|
|
image: 'assets/img/themes/Edge.png'
|
2021-10-11 19:14:18 +03:00
|
|
|
}, {
|
|
|
|
name: 'Ease',
|
|
|
|
category: 'Documentation',
|
|
|
|
url: 'https://github.com/TryGhost/Ease',
|
2021-10-12 16:27:51 +03:00
|
|
|
previewUrl: 'https://ease.ghost.io',
|
2021-10-11 19:14:18 +03:00
|
|
|
ref: 'TryGhost/Ease',
|
2021-10-13 18:36:26 +03:00
|
|
|
image: 'assets/img/themes/Ease.png'
|
|
|
|
}, {
|
|
|
|
name: 'Ruby',
|
|
|
|
category: 'Magazine',
|
|
|
|
url: 'https://github.com/TryGhost/Ruby',
|
|
|
|
previewUrl: 'https://ruby.ghost.io',
|
|
|
|
ref: 'TryGhost/Ruby',
|
|
|
|
image: 'assets/img/themes/Ruby.png'
|
|
|
|
}, {
|
|
|
|
name: 'Dope',
|
|
|
|
category: 'Magazine',
|
|
|
|
url: 'https://github.com/TryGhost/Dope',
|
|
|
|
previewUrl: 'https://dope.ghost.io',
|
|
|
|
ref: 'TryGhost/Dope',
|
|
|
|
image: 'assets/img/themes/Dope.png'
|
|
|
|
}, {
|
|
|
|
name: 'Wave',
|
|
|
|
category: 'Podcast',
|
|
|
|
url: 'https://github.com/TryGhost/Wave',
|
|
|
|
previewUrl: 'https://wave.ghost.io',
|
|
|
|
ref: 'TryGhost/Wave',
|
|
|
|
image: 'assets/img/themes/Wave.png'
|
|
|
|
}, {
|
|
|
|
name: 'London',
|
|
|
|
category: 'Photography',
|
|
|
|
url: 'https://github.com/TryGhost/London',
|
|
|
|
previewUrl: 'https://london.ghost.io',
|
|
|
|
ref: 'TryGhost/London',
|
|
|
|
image: 'assets/img/themes/London.jpg'
|
|
|
|
}, {
|
|
|
|
name: 'Editorial',
|
|
|
|
category: 'Magazine',
|
|
|
|
url: 'https://github.com/TryGhost/Editorial',
|
|
|
|
previewUrl: 'https://editorial.ghost.io',
|
|
|
|
ref: 'TryGhost/Editorial',
|
|
|
|
image: 'assets/img/themes/Editorial.jpg'
|
|
|
|
}, {
|
|
|
|
name: 'Massively',
|
|
|
|
category: 'Magazine',
|
|
|
|
url: 'https://github.com/TryGhost/Massively',
|
|
|
|
previewUrl: 'https://massively.ghost.io',
|
|
|
|
ref: 'TryGhost/Massively',
|
|
|
|
image: 'assets/img/themes/Massively.jpg'
|
2021-10-11 19:14:18 +03:00
|
|
|
}]
|
2021-10-12 12:18:55 +03:00
|
|
|
|
|
|
|
@action
|
|
|
|
toggleAdvanced() {
|
|
|
|
this.showAdvanced = !this.showAdvanced;
|
|
|
|
}
|
2021-10-11 19:14:18 +03:00
|
|
|
}
|