summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorHunternif <hunternif@gmail.com>2025-02-16 20:10:40 +0000
committerHunternif <hunternif@gmail.com>2025-02-16 20:10:40 +0000
commit5720297b4006eed53db19da5547bcac6307cf094 (patch)
treeb77ec448dac711b50239a962e278b702d88062bb /client
parent01be3240e5805dd3a8385bbdfa0741978075b22c (diff)
client: fix inconsistent width in adaptive css on post page
Diffstat (limited to 'client')
-rw-r--r--client/html/post_main.tpl4
-rw-r--r--client/js/controls/post_content_control.js4
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 @@
<div class='sidebar-container'></div>
- <% if (window.innerWidth <= 1000) { %>
+ <% if (window.innerWidth <= 800) { %>
<div class='comments-panel'>
<% if (ctx.canListComments) { %>
<div class='comments-container'></div>
@@ -86,7 +86,7 @@
<div class='content'>
<div class='post-container'></div>
- <% if (window.innerWidth > 1000) { %>
+ <% if (window.innerWidth > 800) { %>
<% if (ctx.canListComments) { %>
<div class='comments-container'></div>
<% } %>
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, () => {