Skip to content

Build your personal knowledge base with Trilium Notes

fix mobile frontend, closes #2217

zadam23e34e8c025c
diff --git a/src/public/app/layouts/mobile_layout.js b/src/public/app/layouts/mobile_layout.js
index 5cf662c318..95605d4fe1 100644
--- a/src/public/app/layouts/mobile_layout.js
+++ b/src/public/app/layouts/mobile_layout.js
@@ -36,6 +36,7 @@ const FANCYTREE_CSS = `
margin-top: 55px;
overflow-y: auto;
contain: content;
+ padding-left: 10px;
}
.fancytree-custom-icon {
@@ -57,6 +58,7 @@ const FANCYTREE_CSS = `
span.fancytree-expander {
width: 24px !important;
+ margin-right: 5px;
}
.fancytree-loading span.fancytree-expander {
@@ -98,18 +100,24 @@ export default class MobileLayout {
.child(new ScreenContainer("detail", "column")
.class("d-sm-flex d-md-flex d-lg-flex d-xl-flex col-12 col-sm-7 col-md-8 col-lg-8")
.css('max-height', '100%')
- .child(new FlexContainer('row').overflowing().filling()
+ .child(new FlexContainer('row').overflowing().contentSized()
.css('font-size', 'larger')
.css('align-items', 'center')
- .child(new MobileDetailMenuWidget())
- .child(new NoteTitleWidget())
- .child(new CloseDetailButtonWidget()))
+ .child(new MobileDetailMenuWidget().contentSized())
+ .child(new NoteTitleWidget()
+ .contentSized()
+ .css("position: relative;")
+ .css("top: 5px;")
+ )
+ .child(new CloseDetailButtonWidget().contentSized()))
.child(
new ScrollingContainer()
+ .filling()
+ .overflowing()
+ .contentSized()
.child(
new NoteDetailWidget()
.css('padding', '5px 20px 10px 0')
- .css('contain', 'content')
)
)
);
diff --git a/src/views/mobile.ejs b/src/views/mobile.ejs
index 6ad62780d5..ea47ffd360 100644
--- a/src/views/mobile.ejs
+++ b/src/views/mobile.ejs
@@ -95,7 +95,7 @@
}
</style>
</head>
-<body class="mobile theme-<%= theme %> heading-style-<%= headingStyle %>">
+<body class="mobile heading-style-<%= headingStyle %>">
<noscript>Trilium requires JavaScript to be enabled.</noscript>
<div id="toast-container" class="d-flex flex-column justify-content-center align-items-center"></div>
@@ -133,6 +133,7 @@
<link href="api/fonts" rel="stylesheet">
<link href="stylesheets/ckeditor-theme.css" rel="stylesheet">
+<link href="stylesheets/theme-light.css" rel="stylesheet">
<% if (themeCssUrl) { %>
<link href="<%= themeCssUrl %>" rel="stylesheet">
<% } %>