From 5720297b4006eed53db19da5547bcac6307cf094 Mon Sep 17 00:00:00 2001 From: Hunternif Date: Sun, 16 Feb 2025 20:10:40 +0000 Subject: client: fix inconsistent width in adaptive css on post page --- client/html/post_main.tpl | 4 ++-- client/js/controls/post_content_control.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/html/post_main.tpl b/client/html/post_main.tpl index 33f9afd..f0fc46d 100644 --- a/client/html/post_main.tpl +++ b/client/html/post_main.tpl @@ -70,7 +70,7 @@ - <% if (window.innerWidth <= 1000) { %> + <% if (window.innerWidth <= 800) { %>
<% if (ctx.canListComments) { %>
@@ -86,7 +86,7 @@
- <% if (window.innerWidth > 1000) { %> + <% if (window.innerWidth > 800) { %> <% if (ctx.canListComments) { %>
<% } %> diff --git a/client/js/controls/post_content_control.js b/client/js/controls/post_content_control.js index 0023854..b42c711 100644 --- a/client/js/controls/post_content_control.js +++ b/client/js/controls/post_content_control.js @@ -107,7 +107,7 @@ class PostContentControl { _resizePostContent(width, height) { // on mobile don't make the content node narrower than the screen, so that small images are centered // use browser width to accommodate Android's on-screen buttons in landscape mode - if (window.innerWidth < 1000) { + if (window.innerWidth <= 800) { width = Math.max(window.innerWidth, width); } this._postContentNode.style.width = width + "px"; @@ -121,7 +121,7 @@ class PostContentControl { _install() { this._reinstall(); // Don't auto-resize on mobile, to prevent size jerk when scrolling - if (window.innerWidth > 1000) { + if (window.innerWidth > 800) { optimizedResize.add(() => this._refreshSize()); } views.monitorNodeRemoval(this._hostNode, () => { -- cgit v1.3