Browse Source

enhance(ui): add page block bullet flag for the reference links

charlie 1 year ago
parent
commit
9dcae0e0f5

+ 6 - 0
src/main/frontend/common.css

@@ -486,6 +486,12 @@ a.tag {
   .block-title-wrap.as-heading {
     @apply my-0 pb-0;
   }
+
+  .page-ref {
+    .ui__icon.ti {
+      @apply relative left-[2px] top-[5px];
+    }
+  }
 }
 
 svg.note {

+ 6 - 3
src/main/frontend/components/block.cljs

@@ -1958,12 +1958,15 @@
                                      " hide-inner-bullet")
                                    (when order-list? " as-order-list typed-list"))}
 
-                      (let [icon (get-block-icon block)]
+                      (let [icon (get-block-icon block)
+                            page? (db/page? block)]
                         (cond
                           link?
-                          (ui/icon "link" {:size 14})
+                          (ui/icon "link" {:size 15})
+                          page?
+                          (ui/icon "page" {:size 15})
                           icon
-                          (icon-component/icon icon)
+                          (icon-component/icon icon {:size 16})
                           :else
                           [:span.bullet (cond->
                                          {:blockid (str uuid)}

+ 1 - 1
src/main/frontend/components/block.css

@@ -355,7 +355,7 @@
   }
 
   .ui__icon.ti {
-    @apply relative left-[2px] top-[5px];
+    @apply relative top-[3px] left-0;
   }
 }
 

+ 4 - 4
src/main/frontend/components/page.css

@@ -75,6 +75,10 @@
 
   &.title {
     @apply mb-3;
+
+    .block-main-container {
+      @apply gap-2;
+    }
   }
 
   .edit-input {
@@ -203,10 +207,6 @@ html.is-native-ios {
 
 .references {
   @apply select-none;
-
-  .ls-page-icon {
-    @apply hidden;
-  }
 }
 
 .no-ring {