1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Go to file
Kevin Ansfield 3855e1a7b7 Added ability to set <main> class using route metadata
no issue
- modified `ui` service's `routeDidChange` handler to update it's `mainClass` property based on the new route's metadata
- used in the future for switching screen background colours

To use the feature, modify or add a `buildRouteInfoMetadata` hook in the route which you'd like to change, eg:

```js
export default AuthenticatedRoute.extend({
    ...

    buildRouteInfoMetadata() {
        return {
            bodyClasses: ['my-body-class'],
            mainClasses: ['grey-bg'] // <--------
        };
    }
});

```

The route hierarchy is taken into consideration with classes being added for all currently shown routes. For example if you wanted to add an `editor` class to all editor routes you could use the hook in `routes/editor.js` then if you added an `editor-new` class in `routes/editor/new.js` the resulting HTML output on the "New story" screen would be:

```html
<main class="gh-main editor editor-new">
```
2019-05-20 15:33:12 +01:00
.github Updated / simplified contributing.md 2019-02-11 16:44:34 +00:00
app Added ability to set <main> class using route metadata 2019-05-20 15:33:12 +01:00
config Fixed deprecated computed().volatile() usage 2019-05-07 14:54:41 +01:00
lib Use extracted @tryghost/kg-parser-plugins package 2019-05-03 10:45:08 +01:00
mirage Removed usage of ember-light-table in subscribers screen (#1191) 2019-05-07 12:39:56 +01:00
public/assets Sidebar refinements and view site in new tab button (#1192) 2019-05-07 15:29:59 +02:00
tests Update dependency ember-exam to v3 2019-05-13 15:55:11 +01:00
.csscomb.json Unsplash integration 2017-08-15 16:01:12 +01:00
.editorconfig deps: ember-cli@2.8.0 2016-10-07 17:32:30 +01:00
.ember-cli grunt init, dev 2015-03-11 12:37:41 -06:00
.eslintignore Bumped ember core dependencies to 3.5.x 2019-03-06 07:39:51 +00:00
.eslintrc.js Bower => NPM (#972) 2018-03-19 17:56:09 +00:00
.gitignore Bumped ember core dependencies to 3.7.x 2019-03-07 16:25:43 +00:00
.travis.yml Removed coveralls code-coverage reporting (#1190) 2019-05-06 12:02:23 +01:00
.watchmanconfig deps: ember-cli@1.13.13 2015-11-30 11:21:39 -06:00
ember-cli-build.js 🐛 Fixed syntax highlighting inside Code Injection inputs 2019-04-29 17:57:41 +02:00
Gruntfile.js Bower => NPM (#972) 2018-03-19 17:56:09 +00:00
LICENSE 2019 2019-01-01 14:20:55 +00:00
package.json Update ember core 2019-05-20 11:32:08 +01:00
README.md Removed coveralls code-coverage reporting (#1190) 2019-05-06 12:02:23 +01:00
renovate.json Re-configured Renovate to ignore ember-in-viewport (#1173) 2019-04-22 12:45:44 +01:00
SECURITY.md Added SECURITY.md 2019-02-11 16:44:34 +00:00
testem.js Used ember-exam to split tests and run in parallel on Travis (#1112) 2019-03-11 18:16:01 +00:00
yarn.lock Lock file maintenance 2019-05-20 11:42:58 +01:00

Ghost-Admin

Build Status

This is the home of Ember.js based admin client that ships with Ghost.

Do you want to set up a Ghost blog? Check the getting started guide

Do you want to modify or contribute to Ghost-Admin? Please read how to install from source and swing by our forum if you need any help 😄

Have a bug or issue?

Bugs and issues (even if they only affect the admin client) should be opened on the core Ghost repository.

Copyright & License

Copyright (c) 2013-2019 Ghost Foundation - Released under the MIT license. Ghost and the Ghost Logo are trademarks of Ghost Foundation Ltd. Please see our trademark policy for info on acceptable usage.