Skip to content

Build your personal knowledge base with Trilium Notes

feat(mobile): give the attribute sections the note panel's cards

Elian Doran8dd90b66d10c
diff --git a/apps/client/src/stylesheets/theme-next/ios.css b/apps/client/src/stylesheets/theme-next/ios.css
index 1b5e2d865d..0617fb1569 100644
--- a/apps/client/src/stylesheets/theme-next/ios.css
+++ b/apps/client/src/stylesheets/theme-next/ios.css
@@ -105,6 +105,9 @@ body.mobile.ios {
--note-panel-group-spacing: 22px;
--note-panel-group-background: var(--grouped-card-background-color);
--note-panel-card-padding: 12px 16px;
+ --note-panel-separator-color: var(--main-border-color);
+ /* Starts under the attribute's name: the row's padding, the 1.1em kind icon and the 6px gap. */
+ --note-panel-separator-inset: calc(16px + 1.1em + 6px);
}
.modal.options-dialog {
diff --git a/apps/client/src/widgets/mobile_widgets/MobileNotePanel.css b/apps/client/src/widgets/mobile_widgets/MobileNotePanel.css
index 2e836eaa56..62d3fe3f07 100644
--- a/apps/client/src/widgets/mobile_widgets/MobileNotePanel.css
+++ b/apps/client/src/widgets/mobile_widgets/MobileNotePanel.css
@@ -10,12 +10,9 @@ body.mobile .modal.mobile-note-panel {
min-width: 0;
}
- .tn-master-detail-title:has(> .modal-title) {
- color: var(--main-text-color);
- }
-
.tn-master-detail-title > .modal-title {
display: flex;
+ color: var(--main-text-color);
flex: 1;
min-width: 0;
}
@@ -141,10 +138,22 @@ body.mobile .modal.mobile-note-panel {
}
}
+ .options-section {
+ margin: 0;
+
+ + .options-section > .options-section-header {
+ padding-top: var(--note-panel-group-spacing, 16px);
+ }
+ }
+
.options-section-card {
--options-card-padding: 0;
- padding-block: 8px;
+ padding-block: 4px;
+ border: 0;
+ border-radius: var(--note-panel-group-radius, 6px);
+ background: var(--note-panel-group-background, var(--card-background-color));
+ box-shadow: none;
overflow: hidden;
}
@@ -158,8 +167,20 @@ body.mobile .modal.mobile-note-panel {
z-index: auto !important;
.attribute-row {
+ --attribute-kind-cutout: var(--note-panel-group-background, var(--card-background-color));
+
+ border-bottom: 0 !important;
background: transparent;
border-radius: 0;
+
+ &:has(+ .attribute-row)::after {
+ content: "";
+ position: absolute;
+ inset-block-end: 0;
+ inset-inline: var(--note-panel-separator-inset, 0px) 0;
+ height: 1px;
+ background: var(--note-panel-separator-color, var(--menu-item-delimiter-color));
+ }
}
/* Outweighs the menus' hover fill, which a touch screen leaves on the last row tapped. */
@@ -171,6 +192,7 @@ body.mobile .modal.mobile-note-panel {
.options-section-header {
justify-content: flex-start;
gap: 4px;
+ margin-bottom: 6px;
h4 {
margin: 0;