refactor: use block content indent class

This commit is contained in:
Tienson Qin
2026-05-21 21:34:00 +08:00
parent b3ab3216f6
commit 96d35c7c10
3 changed files with 16 additions and 6 deletions

View File

@@ -4288,7 +4288,7 @@
(when show-inline-comments?
[:div.ls-inline-comments
(when-not (:page-title? config)
{:style {:padding-left (if (util/mobile?) 12 45)}})
{:class "ls-block-content-indent"})
(block-comments/comments-area-view
(assoc config :container-id (comments-model/inline-comment-container-id (:container-id config)))
comment-thread
@@ -4306,7 +4306,7 @@
(and
(not collapsed?)
(not (or table? property?)))))
[:div (when-not (:page-title? config) {:style {:padding-left (if (util/mobile?) 12 45)}})
[:div (when-not (:page-title? config) {:class "ls-block-content-indent"})
(db-properties-cp config block {:in-block-container? true})])
(when (and show-query? (not (:table? config)))

View File

@@ -49,6 +49,14 @@
@apply flex flex-1 flex-col w-full pr-1;
}
.ls-block-content-indent {
padding-left: 45px;
}
html.is-mobile .ls-block-content-indent {
padding-left: 12px;
}
.block-head-wrap {
@apply flex flex-1 w-full flex-row flex-wrap;
@apply justify-between items-center;

View File

@@ -111,7 +111,8 @@
config (dissoc config* :page)]
(when (or page? block? (util/mobile?))
[:div.ls-block.block-add-button.flex-1.flex-col.rounded-sm.cursor-text.transition-opacity.ease-in.duration-100.!py-0
{:class opacity-class
{:class (util/classnames [opacity-class
{"ls-block-content-indent" block?}])
:parentblockid (:db/id block)
:ref *ref
:on-click (fn [e]
@@ -141,9 +142,10 @@
:tab-index 0}
[:div.flex.flex-row
[:div.flex.items-center {:style {:height 28
:margin-left (if (util/mobile?)
(if page? 0 18)
22)}}
:margin-left (cond
(and block? (not (util/mobile?))) 6
(util/mobile?) (if page? 0 18)
:else 22)}}
[:span.bullet-container
[:span.bullet]]]]])))