diff options
| author | Eva <evauwu@riseup.net> | 2023-05-20 18:00:01 +0200 |
|---|---|---|
| committer | Eva <evauwu@riseup.net> | 2024-03-21 22:26:28 +0100 |
| commit | 4b6b231fc809b173f7f619563589e4eed77d35c2 (patch) | |
| tree | 937d2407dffda6e8f67ba27dabc0965c26cd47fe /client/html | |
| parent | 6b0c3cfc7f99d658c1c37e9915f7f089feb5024e (diff) | |
client/posts: reorder elements in mobile layout
Navigation is always right below the image, and comments are always
at the very bottom, to minimize scrolling for common actions.
Diffstat (limited to 'client/html')
| -rw-r--r-- | client/html/post_main.tpl | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/client/html/post_main.tpl b/client/html/post_main.tpl index 54c5733..84e48b1 100644 --- a/client/html/post_main.tpl +++ b/client/html/post_main.tpl @@ -29,6 +29,7 @@ <span class='vim-nav-hint'>Next post ></span> </a> </article> + <% if (ctx.canEditPosts || ctx.canDeletePosts || ctx.canFeaturePosts) { %> <article class='edit-post'> <% if (ctx.editMode) { %> <a href='<%= ctx.getPostUrl(ctx.post.id, ctx.parameters) %>'> @@ -36,16 +37,13 @@ <span class='vim-nav-hint'>Back to view mode</span> </a> <% } else { %> - <% if (ctx.canEditPosts || ctx.canDeletePosts || ctx.canFeaturePosts) { %> - <a href='<%= ctx.getPostEditUrl(ctx.post.id, ctx.parameters) %>'> - <% } else { %> - <a class='inactive'> - <% } %> - <i class='fa fa-pencil'></i> - <span class='vim-nav-hint'>Edit post</span> + <a href='<%= ctx.getPostEditUrl(ctx.post.id, ctx.parameters) %>'> + <i class='fa fa-pencil'></i> + <span class='vim-nav-hint'>Edit post</span> </a> <% } %> </article> + <% } %> </nav> <div class='sidebar-container'></div> @@ -54,13 +52,15 @@ <div class='content'> <div class='post-container'></div> - <% if (ctx.canListComments) { %> - <div class='comments-container'></div> - <% } %> + <div class='after-mobile-controls'> + <% if (ctx.canCreateComments) { %> + <h2>Add comment</h2> + <div class='comment-form-container'></div> + <% } %> - <% if (ctx.canCreateComments) { %> - <h2>Add comment</h2> - <div class='comment-form-container'></div> - <% } %> + <% if (ctx.canListComments) { %> + <div class='comments-container'></div> + <% } %> + </div> </div> </div> |