From fd13712579571173a897da9c7d4394b1ae4d8ce7 Mon Sep 17 00:00:00 2001
From: Sanne de Vries <65487235+sanne-san@users.noreply.github.com>
Date: Fri, 22 Sep 2023 11:54:51 +0200
Subject: [PATCH] Added bookmark back to published posts in Beta editor
(#18289)
No ref
- By popular request, a bookmark of the published post is now shown
after publishing
- The 'Published' status in the editor now links to the published post
---
.../editor/modals/publish-flow/complete.hbs | 8 ++---
.../app/components/gh-editor-post-status.hbs | 9 ++++--
.../app/components/gh-post-settings-menu.hbs | 4 +--
ghost/admin/app/styles/layouts/editor.css | 30 ++++++++++++++++---
4 files changed, 37 insertions(+), 14 deletions(-)
diff --git a/ghost/admin/app/components/editor/modals/publish-flow/complete.hbs b/ghost/admin/app/components/editor/modals/publish-flow/complete.hbs
index e5086af3fb..ed3b7441ff 100644
--- a/ghost/admin/app/components/editor/modals/publish-flow/complete.hbs
+++ b/ghost/admin/app/components/editor/modals/publish-flow/complete.hbs
@@ -79,11 +79,9 @@
{{/if}}
{{else}}
- {{#unless post.lexical}}
-
-
diff --git a/ghost/admin/app/components/gh-editor-post-status.hbs b/ghost/admin/app/components/gh-editor-post-status.hbs index 2ea4086cf2..da3d7ec8f3 100644 --- a/ghost/admin/app/components/gh-editor-post-status.hbs +++ b/ghost/admin/app/components/gh-editor-post-status.hbs @@ -26,9 +26,12 @@ {{/if}} {{else if (or @post.isPublished @post.pastScheduledTime)}} - - Published - + + Published + {{#unless @post.email}} + {{svg-jar "arrow-top-right" title="View post"}} + {{/unless}} + {{#if (or (eq @post.email.status "submitting") (eq @post.email.status "submitting"))}} and sending to {{gh-pluralize @post.email.emailCount "member"}} {{else if (eq @post.email.status "submitted")}} diff --git a/ghost/admin/app/components/gh-post-settings-menu.hbs b/ghost/admin/app/components/gh-post-settings-menu.hbs index e164b6b922..dd5ab95b5b 100644 --- a/ghost/admin/app/components/gh-post-settings-menu.hbs +++ b/ghost/admin/app/components/gh-post-settings-menu.hbs @@ -17,11 +17,11 @@ {{#unless this.post.isNew}} {{#if (or this.post.isPublished this.post.isSent)}} - View {{this.post.displayName}} {{svg-jar "external"}} + View {{this.post.displayName}} {{svg-jar "arrow-top-right"}} {{else if this.post.isScheduled}} - Preview {{svg-jar "external"}} + Preview {{svg-jar "arrow-top-right"}} {{/if}} {{/unless}} diff --git a/ghost/admin/app/styles/layouts/editor.css b/ghost/admin/app/styles/layouts/editor.css index 18825c0d8e..02aae47f60 100644 --- a/ghost/admin/app/styles/layouts/editor.css +++ b/ghost/admin/app/styles/layouts/editor.css @@ -104,7 +104,7 @@ } .post-view-link:hover { - color: var(--darkgrey); + color: var(--midgrey-d2); } .post-view-link svg { @@ -112,12 +112,11 @@ width: 12px; height: 12px; vertical-align: middle; - margin-bottom: 2px; - fill: var(--midgrey); + transition: all .15s ease; } .post-view-link:hover svg { - fill: var(--darkgrey); + transform: translateY(-1px); } @@ -742,6 +741,29 @@ body[data-user-is-dragging] .gh-editor-feature-image-dropzone { margin-left: 1rem; } +.gh-editor-post-status .view-post { + display: inline-flex; + align-items: center; + color: var(--midgrey-l2); + text-decoration: none; + transition: all 0.2s ease; +} + +.gh-editor-post-status .view-post:hover { + color: var(--midgrey-d1); +} + +.gh-editor-post-status .view-post svg { + width: 1.2rem; + height: 1.2rem; + margin: 1px 0 0 .6rem; + transition: all .15s ease; +} + +.gh-editor-post-status .view-post:hover svg { + transform: translateY(-1px); +} + @media (max-width: 720px) { .gh-editor-post-status .newsletter-failed { display: none;