Ghost/ghost/admin/app/templates/application.hbs
Kevin Ansfield 5ce67c7892 Initial ember-promise-modals implementation
refs https://github.com/TryGhost/Team/issues/559

We want to get rid of our existing modals implementation because it doesn't play well with Glimmer compoments and the animation library it uses is now unmaintained and blocking our Ember.js upgrades.

- installed addon using customised fork
  - fork allows passthrough of `allowOutsideClick` to `focus-trap` so we can allow clicks on dropdowns and other wormholed content inside of a modal
- extended the `modals` service locally so we can customise click-outside-to-close behaviour and tie in with our `dropdowns` service
- set up styles in `modals-new.css`, mostly copied from `modals.css` with a few specific overrides
  - once all modals are converted we can drop the old `modals.css` and rename `modals-new.css`
2021-09-13 13:01:12 +01:00

64 lines
1.8 KiB
Handlebars

<GhApp>
<GhSkipLink @anchor=".gh-main">Skip to main content</GhSkipLink>
<GhAlerts />
<div class="gh-viewport {{if this.ui.showMobileMenu 'mobile-menu-expanded'}}">
{{#if this.showNavMenu}}
<GhNavMenu />
{{/if}}
<main class="gh-main {{this.ui.mainClass}}" role="main">
{{outlet}}
{{#if this.showBilling}}
<GhBillingModal @billingWindowOpen={{this.billing.billingWindowOpen}} />
{{/if}}
</main>
<GhNotifications />
<GhContentCover />
<GhMobileNavBar />
</div>
{{#if this.customViews.showFormModal}}
<GhFullscreenModal
@modal="custom-view-form"
@close={{this.customViews.toggleFormModal}}
@modifier="action narrow"
/>
{{/if}}
{{#if this.settings.accentColor}}
<style>
:root {
--accent-color: {{this.settings.accentColor}};
--adjusted-accent-color: {{this.ui.adjustedAccentColor}};
--text-color-for-adjusted-accent-background: {{this.ui.textColorForAdjustedAccentBackground}};
}
.koenig-editor__editor a:not([class]) {
color: var(--adjusted-accent-color);
}
.koenig-editor__editor blockquote {
border-left: 0.25rem solid var(--adjusted-accent-color);
}
.gh-btn-accent {
color: var(--text-color-for-adjusted-accent-background);
background-color: var(--adjusted-accent-color)
}
.gh-btn-accent:hover {
color: {{hex-contrast this.ui.adjustedAccentColor}};
background-color: {{hex-adjust this.ui.adjustedAccentColor l=-15}}
}
</style>
{{/if}}
</GhApp>
<EpmModalContainer />
<EmberLoadRemover />