mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-27 12:53:13 +03:00
6d763a7901
refs https://github.com/TryGhost/Ghost/issues/8194 - Allows you to navigate to the title and body if the first element in the document is a card. - Adjust toolbar and + menu button for mobile screen. - Put in place resize throttling for moving of in-code positioned elements on screen resize.
100 lines
3.4 KiB
Handlebars
100 lines
3.4 KiB
Handlebars
<section class="gh-view">
|
|
|
|
<header class="gh-editor-header">
|
|
<div class="gh-editor-status">
|
|
{{#if model.isPublished}}
|
|
Published
|
|
{{else if model.isScheduled}}
|
|
Scheduled
|
|
{{else}}
|
|
Draft
|
|
{{/if}}
|
|
|
|
</div>
|
|
<section class="view-actions">
|
|
{{gh-editor-save-button
|
|
isPublished=model.isPublished
|
|
isScheduled=model.isScheduled
|
|
willPublish=willPublish
|
|
willSchedule=willSchedule
|
|
statusFreeze=statusFreeze
|
|
scheduledWillPublish=scheduledWillPublish
|
|
timeScheduled=model.timeScheduled
|
|
postOrPage=postOrPage
|
|
isNew=model.isNew
|
|
save="save"
|
|
setSaveType="setSaveType"
|
|
delete="toggleDeletePostModal"
|
|
submitting=submitting
|
|
}}
|
|
<button type="button" class="post-settings" title="Settings" {{action "openSettingsMenu"}}>
|
|
{{inline-svg "settings"}}
|
|
</button>
|
|
</section>
|
|
</header>
|
|
<div class="gh-editor-container needsclick">
|
|
<div class="gh-editor-inner">
|
|
{{gh-editor-title
|
|
val=(readonly model.titleScratch)
|
|
onChange=(action (mut model.titleScratch))
|
|
tabindex="1"
|
|
shouldFocus=shouldFocusTitle
|
|
focus-out="updateTitle"
|
|
update=(action (perform updateTitle))
|
|
id="gh-editor-title"
|
|
koenigEditor=(readonly editor)
|
|
editorMenuIsOpen=editorMenuIsOpen
|
|
}}
|
|
{{#if scheduleCountdown}}
|
|
<time datetime="{{post.publishedAtUTC}}" class="gh-notification gh-notification-schedule">
|
|
Post will be published {{scheduleCountdown}}.
|
|
</time>
|
|
{{/if}}
|
|
{{gh-koenig
|
|
value=(readonly model.scratch)
|
|
onChange=(action (mut model.scratch))
|
|
onFirstChange=(action "autoSaveNew")
|
|
onTeardown=(action "cancelTimers")
|
|
shouldFocusEditor=shouldFocusEditor
|
|
apiRoot=apiRoot
|
|
assetPath=assetPath
|
|
tabindex="2"
|
|
titleSelector=".gh-editor-title"
|
|
containerSelector=".gh-editor-container"
|
|
setEditor=(action "setEditor")
|
|
menuIsOpen=(action "editorMenuIsOpen")
|
|
menuIsClosed=(action "editorMenuIsClosed")
|
|
}}
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
{{#if showDeletePostModal}}
|
|
{{gh-fullscreen-modal "delete-post"
|
|
model=(hash post=model onSuccess=(route-action 'redirectToContentScreen'))
|
|
close=(action "toggleDeletePostModal")
|
|
modifier="action wide"}}
|
|
{{/if}}
|
|
|
|
{{#if showLeaveEditorModal}}
|
|
{{gh-fullscreen-modal "leave-editor"
|
|
confirm=(action "leaveEditor")
|
|
close=(action "toggleLeaveEditorModal")
|
|
modifier="action wide"}}
|
|
{{/if}}
|
|
|
|
{{#if showReAuthenticateModal}}
|
|
{{gh-fullscreen-modal "re-authenticate"
|
|
close=(action "toggleReAuthenticateModal")
|
|
modifier="action wide"}}
|
|
{{/if}}
|
|
|
|
{{#liquid-wormhole}}
|
|
{{gh-post-settings-menu
|
|
model=model
|
|
showSettingsMenu=application.showSettingsMenu
|
|
closeNavMenu=(action "closeNavMenu")
|
|
closeMenus=(action "closeMenus")
|
|
}}
|
|
{{/liquid-wormhole}}
|