Skip to content

Build your personal knowledge base with Trilium Notes

style(mobile): background for whole bottom area + fix alignment

Elian Doran336e29846254
diff --git a/src/public/app/layouts/mobile_layout.ts b/src/public/app/layouts/mobile_layout.ts
index 7f11c2e65a..ba61f24003 100644
--- a/src/public/app/layouts/mobile_layout.ts
+++ b/src/public/app/layouts/mobile_layout.ts
@@ -184,13 +184,16 @@ export default class MobileLayout {
.child(new ProtectedSessionPasswordDialog())
.child(new ConfirmDialog())
)
- .child(new TabRowWidget().css('height', '40px'))
- .child(new FlexContainer("row")
- .class("horizontal")
- .css("height", "53px")
- .child(new LauncherContainer(true))
- .child(new GlobalMenuWidget(true))
- .id("launcher-pane"))
+ .child(new FlexContainer("column")
+ .contentSized()
+ .id("mobile-bottom-bar")
+ .child(new TabRowWidget().css('height', '40px'))
+ .child(new FlexContainer("row")
+ .class("horizontal")
+ .css("height", "53px")
+ .child(new LauncherContainer(true))
+ .child(new GlobalMenuWidget(true))
+ .id("launcher-pane")))
.child(new AboutDialog())
.child(new HelpDialog())
}
diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.css
index 06ae690012..14bb72f002 100644
--- a/src/public/stylesheets/style.css
+++ b/src/public/stylesheets/style.css
@@ -22,6 +22,7 @@
:root {
--submenu-opening-delay: 300ms;
--launcher-pane-size: 53px;
+ --mobile-bottom-offset: calc(env(safe-area-inset-bottom) * 0.75);
}
html {
@@ -57,7 +58,10 @@ body.mobile.context-menu-shown * {
body.mobile #root-widget {
padding-top: env(safe-area-inset-top);
- padding-bottom: calc(env(safe-area-inset-bottom) * 0.75);
+}
+
+#mobile-bottom-bar {
+ padding-bottom: var(--mobile-bottom-offset);
}
body.desktop #root-widget.horizontal-layout {
@@ -1190,7 +1194,7 @@ body:not(.mobile) #launcher-pane.horizontal .dropdown-submenu > .dropdown-menu {
body.mobile #launcher-pane .dropdown-menu.show {
position: fixed !important;
- bottom: var(--launcher-pane-size) !important;
+ bottom: calc(var(--mobile-bottom-offset) + var(--launcher-pane-size)) !important;
top: unset !important;
left: 0 !important;
right: 0 !important;
diff --git a/src/public/stylesheets/theme-next/shell.css b/src/public/stylesheets/theme-next/shell.css
index aa0b26964a..35358fea48 100644
--- a/src/public/stylesheets/theme-next/shell.css
+++ b/src/public/stylesheets/theme-next/shell.css
@@ -112,8 +112,17 @@ body.layout-horizontal > .horizontal {
#launcher-pane.horizontal {
height: var(--launcher-pane-size) !important;
- align-items: center;
- border-top: 1px solid var(--launcher-pane-horizontal-border-color);
+ align-items: center;
+}
+
+@media (max-width: 991px) {
+ #mobile-bottom-bar {
+ background: var(--launcher-pane-background-color);
+ }
+
+ #launcher-pane {
+ background: transparent !important;
+ }
}
@media (min-width: 992px) {