|
2355 | 2355 | block-ref? (:block-ref? config) |
2356 | 2356 | block-type (or (keyword (pu/lookup block :logseq.property/ls-type)) :default) |
2357 | 2357 | html-export? (:html-export? config) |
2358 | | - bg-color (pu/lookup block :logseq.property/background-color) |
2359 | 2358 | ;; `heading-level` is for backward compatibility, will remove it in later releases |
2360 | 2359 | heading-level (:block/heading-level block) |
2361 | 2360 | heading (or |
|
2376 | 2375 | (when (and marker |
2377 | 2376 | (not (string/blank? marker)) |
2378 | 2377 | (not= "nil" marker)) |
2379 | | - {:data-marker (str (string/lower-case marker))}) |
2380 | | - (when bg-color |
2381 | | - (let [built-in-color? (ui/built-in-color? bg-color)] |
2382 | | - {:style {:background-color (if built-in-color? |
2383 | | - (str "var(--ls-highlight-color-" bg-color ")") |
2384 | | - bg-color) |
2385 | | - :color (when-not built-in-color? "white")} |
2386 | | - :class "px-1 with-bg-color"}))) |
| 2378 | + {:data-marker (str (string/lower-case marker))})) |
2387 | 2379 |
|
2388 | 2380 | ;; children |
2389 | 2381 | (let [area? (= :area (keyword (pu/lookup block :logseq.property.pdf/hl-type))) |
|
3157 | 3149 | raw-mode-block (state/sub :editor/raw-mode-block) |
3158 | 3150 | type-block-editor? (and (contains? #{:code} (:logseq.property.node/display-type block)) |
3159 | 3151 | (not= (:db/id block) (:db/id raw-mode-block))) |
3160 | | - config (assoc config :block-parent-id block-id)] |
| 3152 | + config (assoc config :block-parent-id block-id) |
| 3153 | + bg-color (pu/lookup block :logseq.property/background-color)] |
3161 | 3154 | [:div.block-content-or-editor-wrap |
3162 | | - {:class (when (:page-title? config) "ls-page-title-container") |
3163 | | - :data-node-type (some-> (:logseq.property.node/display-type block) name)} |
| 3155 | + (merge |
| 3156 | + {:class (util/classnames [{"ls-page-title-container" (:page-title? config) |
| 3157 | + "px-1 with-bg-color" bg-color}]) |
| 3158 | + :data-node-type (some-> (:logseq.property.node/display-type block) name)} |
| 3159 | + (when bg-color |
| 3160 | + (let [built-in-color? (ui/built-in-color? bg-color)] |
| 3161 | + {:style {:background-color (if built-in-color? |
| 3162 | + (str "var(--ls-highlight-color-" bg-color ")") |
| 3163 | + bg-color) |
| 3164 | + :color (when-not built-in-color? "white")}}))) |
| 3165 | + |
3164 | 3166 | (when (and db-based? (not table?)) (block-positioned-properties config block :block-left)) |
3165 | 3167 | [:div.block-content-or-editor-inner |
3166 | 3168 | [:div.block-row.flex.flex-1.flex-row.gap-1.items-center |
|
0 commit comments