navbar_alerts: Adjust app based on navbar height.

This commit is contained in:
Aman Agrawal
2023-05-21 18:52:46 +00:00
committed by Tim Abbott
parent a78dc4a2bd
commit dc04b0e171
5 changed files with 31 additions and 45 deletions

View File

@@ -23,9 +23,11 @@ import * as util from "./util";
/* This is called by resize.js, and thus indirectly when we trigger
* resize events in the logic below. */
export function resize_app() {
const navbar_alerts_wrapper_height = $("#navbar_alerts_wrapper").height();
$("body > .app").height("calc(100% - " + navbar_alerts_wrapper_height + "px)");
$(".recent_topics_container").height("calc(100vh - " + navbar_alerts_wrapper_height + "px)");
const navbar_alerts_height = $("#navbar_alerts_wrapper").height();
document.documentElement.style.setProperty(
"--navbar-alerts-wrapper-height",
navbar_alerts_height + "px",
);
// If the compose-box is in expanded state,
// reset its height as well.