Skip to content

Build your personal knowledge base with Trilium Notes

fix(mobile): width on tablet view

Elian Doran6aee38337e8d
diff --git a/src/public/app/layouts/mobile_layout.ts b/src/public/app/layouts/mobile_layout.ts
index ed3d766653..db4db49bc6 100644
--- a/src/public/app/layouts/mobile_layout.ts
+++ b/src/public/app/layouts/mobile_layout.ts
@@ -130,7 +130,7 @@ export default class MobileLayout {
.id("mobile-rest-container")
.child(
new SidebarContainer("tree", "column")
- .class("d-sm-flex d-md-flex d-lg-flex d-xl-flex col-12 col-sm-5 col-md-4 col-lg-3 col-xl-3")
+ .class("d-md-flex d-lg-flex d-xl-flex col-12 col-sm-5 col-md-4 col-lg-3 col-xl-3")
.id("mobile-sidebar-wrapper")
.css("max-height", "100%")
.css("padding-left", "0")
@@ -142,10 +142,6 @@ export default class MobileLayout {
new ScreenContainer("detail", "column")
.id("detail-container")
.class("d-sm-flex d-md-flex d-lg-flex d-xl-flex col-12 col-sm-7 col-md-8 col-lg-9")
- .css("padding-left", "0")
- .css("padding-right", "0")
- .css("max-height", "100%")
- .css("position", "relative")
.child(
new FlexContainer("row")
.contentSized()
diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.css
index 4f34130e24..c2091531ab 100644
--- a/src/public/stylesheets/style.css
+++ b/src/public/stylesheets/style.css
@@ -1315,6 +1315,12 @@ body:not(.mobile) #launcher-pane.horizontal .dropdown-submenu > .dropdown-menu {
}
/* Mobile, phone mode */
+
+#detail-container {
+ max-height: 100%;
+ position: relative;
+}
+
@media (max-width: 991px) {
body.mobile #launcher-pane .dropdown.global-menu > .dropdown-menu.show,
body.mobile #launcher-container .dropdown > .dropdown-menu.show {
@@ -1354,6 +1360,10 @@ body:not(.mobile) #launcher-pane.horizontal .dropdown-submenu > .dropdown-menu {
z-index: 2000;
}
+ #detail-container {
+ width: 100%;
+ }
+
#mobile-sidebar-container.show #mobile-sidebar-wrapper {
transform: translateX(0);
}