Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

Commit 5b7b47c

Browse files
committed
Koenig - Avoid word count overlap with content
refs TryGhost/Ghost#9724 - display word count/reading time in the top-left when the opaque top bar is present otherwise use the bottom-right
1 parent 09a8c7f commit 5b7b47c

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

app/templates/editor.hbs

+12-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
isSaving=(or autosave.isRunning saveTasks.isRunning)
1515
}}
1616
</span>
17-
{{#if wordCount}}
17+
{{!-- editor.headerClass is only set on small screens with opaque tpo bar --}}
18+
{{#if (and editor.headerClass wordCount)}}
1819
<span class="pl3 f-small midgrey">
1920
{{wordCount.readingTime}} ({{pluralize wordCount.wordCount "word"}})
2021
</span>
@@ -184,6 +185,16 @@
184185
{{/if}}
185186

186187
{{/if}} {{!-- end Koenig conditional --}}
188+
189+
{{#unless editor.headerClass}}
190+
{{#if wordCount}}
191+
<div class="absolute right-8 bottom-6">
192+
<span class="pl3 f-small midgrey">
193+
{{wordCount.readingTime}} ({{pluralize wordCount.wordCount "word"}})
194+
</span>
195+
</div>
196+
{{/if}}
197+
{{/unless}}
187198
{{/gh-editor}}
188199

189200
{{#if showDeletePostModal}}

0 commit comments

Comments
 (0)