Skip to content

Commit

Permalink
fix: color-level class
Browse files Browse the repository at this point in the history
  • Loading branch information
tiensonqin committed Nov 12, 2023
1 parent e0c7ff0 commit a31c530
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
12 changes: 3 additions & 9 deletions src/main/frontend/components/block.cljs
Expand Up @@ -3486,9 +3486,7 @@
page (db/entity (:db/id page))
blocks (tree/non-consecutive-blocks->vec-tree blocks)
parent-blocks (group-by :block/parent blocks)]
[:div.my-2 (cond-> {:key (str "page-" (:db/id page))}
(:ref? config)
(assoc :class "color-level px-2 sm:px-7 py-2 rounded"))
[:div.custom-query-page-result.color-level {:key (str "page-" (:db/id page))}
(ui/foldable
[:div
(page-cp config page)
Expand All @@ -3514,9 +3512,7 @@
page (db/entity (:db/id page))
;; FIXME: parents need to be sorted
parent-blocks (group-by :block/parent page-blocks)]
[:div.my-2 (cond-> {:key (str "page-" (:db/id page))}
(:ref? config)
(assoc :class "color-level px-2 sm:px-7 py-2 rounded"))
[:div.my-2 {:key (str "page-" (:db/id page))}
(ui/foldable
[:div
(page-cp config page)
Expand Down Expand Up @@ -3544,9 +3540,7 @@
(let [alias? (:block/alias? page)
page (db/entity (:db/id page))
whiteboard? (model/whiteboard-page? page)]
[:div.my-2 (cond-> {:key (str "page-" (:db/id page))}
(:ref? config)
(assoc :class "color-level px-2 sm:px-7 py-2 rounded"))
[:div.my-2 {:key (str "page-" (:db/id page))}
(ui/foldable
[:div
(page-cp config page)
Expand Down
4 changes: 2 additions & 2 deletions src/main/frontend/components/block.css
Expand Up @@ -478,9 +478,9 @@
}

.color-level {
background-color: var(--ls-right-sidebar-content-background, --lx-gray-02, --color-level-1);
background-color: or(--ls-right-sidebar-content-background, --lx-gray-02, --color-level-1);
.dark & {
background-color: var(--ls-right-sidebar-content-background, --lx-gray-01, --color-level-1);
background-color: or(--ls-right-sidebar-content-background, --lx-gray-01, --color-level-1);
}

& .color-level {
Expand Down
7 changes: 5 additions & 2 deletions src/main/frontend/components/container.css
Expand Up @@ -128,12 +128,15 @@

.nav-header a {
.keyboard-shortcut {
@apply w-0 opacity-0;
transition: opacity 0.3s;
@apply w-0 opacity-0;
visibility: hidden;
}

&:hover {
.keyboard-shortcut {
visibility: visible;
transition: opacity 1s;
transition-delay: 2s;
width: auto;
opacity: 1;
}
Expand Down
4 changes: 4 additions & 0 deletions src/main/frontend/components/reference.css
Expand Up @@ -18,3 +18,7 @@
.ls-filters {
max-width: 704px;
}

.custom-query-page-result {
@apply p-2 my-2 rounded;
}

0 comments on commit a31c530

Please sign in to comment.