Просмотр исходного кода

WIP: Minmal CSS UI layout tweaks before clean build

scheinriese 5 месяцев назад
Родитель
Сommit
57a6e9ffed

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

@@ -3664,7 +3664,7 @@
      (when-not (:hide-title? config)
      (when-not (:hide-title? config)
        [:div.block-main-container.flex.flex-row.gap-1
        [:div.block-main-container.flex.flex-row.gap-1
         {:style (when (and db-based? (:page-title? config))
         {:style (when (and db-based? (:page-title? config))
-                  {:margin-left (if page-icon -36 -30)})
+                  {:margin-left (if page-icon "-3.6em" "-0.6em")})
          :data-has-heading (some-> block (pu/lookup :logseq.property/heading))
          :data-has-heading (some-> block (pu/lookup :logseq.property/heading))
          :on-touch-start (fn [event uuid] (block-handler/on-touch-start event uuid))
          :on-touch-start (fn [event uuid] (block-handler/on-touch-start event uuid))
          :on-touch-move (fn [event]
          :on-touch-move (fn [event]

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

@@ -507,7 +507,7 @@
 .ls-page-title-container .block-content-wrapper {
 .ls-page-title-container .block-content-wrapper {
   .ls-page-title-actions {
   .ls-page-title-actions {
     @apply absolute -top-5 opacity-0;
     @apply absolute -top-5 opacity-0;
-    left: -2px;
+    left: 1.375rem;
   }
   }
 
 
   &:hover {
   &:hover {

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

@@ -55,7 +55,7 @@
 }
 }
 
 
 #main-content-container {
 #main-content-container {
-  @apply sm:py-8 py-2 sm:pl-8 sm:pr-4;
+  @apply sm:py-8 py-2 sm:pl-16 sm:pr-4;
 }
 }
 
 
 .left-sidebar-inner {
 .left-sidebar-inner {

+ 4 - 5
src/main/frontend/components/property.cljs

@@ -212,8 +212,7 @@
                  :page "page"
                  :page "page"
                  :node "letter-n"
                  :node "letter-n"
                  "letter-t"))]
                  "letter-t"))]
-    (ui/icon icon {:class "opacity-50"
-                   :size 15})))
+    (ui/icon icon {:class "opacity-50" :size 16})))
 
 
 (defn- property-input-on-chosen
 (defn- property-input-on-chosen
   [block *property *property-key *show-new-property-config? {:keys [class-schema? remove-property?]}]
   [block *property *property-key *show-new-property-config? {:keys [class-schema? remove-property?]}]
@@ -321,7 +320,7 @@
                                                  :content-props {:onEscapeKeyDown #(.preventDefault %)}}))})
                                                  :content-props {:onEscapeKeyDown #(.preventDefault %)}}))})
                (assoc :class "flex items-center"))
                (assoc :class "flex items-center"))
            (if icon
            (if icon
-             (icon-component/icon icon {:size 15 :color? true})
+             (icon-component/icon icon {:size 16 :color? true})
              (property-icon property nil)))]))
              (property-icon property nil)))]))
 
 
      (if config/publishing?
      (if config/publishing?
@@ -427,7 +426,7 @@
     (let [add-new-property! (fn [e]
     (let [add-new-property! (fn [e]
                               (state/pub-event! [:editor/new-property (merge opts {:block block
                               (state/pub-event! [:editor/new-property (merge opts {:block block
                                                                                    :target (.-target e)})]))]
                                                                                    :target (.-target e)})]))]
-      [:div.ls-new-property {:style {:margin-left 7 :margin-top 1 :font-size 15}}
+      [:div.ls-new-property {:style {:margin-left 2 :margin-top 1 :font-size 15}}
        [:a.flex.jtrigger
        [:a.flex.jtrigger
         {:tab-index 0
         {:tab-index 0
          :on-click add-new-property!
          :on-click add-new-property!
@@ -436,7 +435,7 @@
                            (.preventDefault e)
                            (.preventDefault e)
                            (add-new-property! e)))}
                            (add-new-property! e)))}
         [:div.flex.flex-row.items-center.shrink-0
         [:div.flex.flex-row.items-center.shrink-0
-         (ui/icon "plus" {:size 15 :class "opacity-50"})
+         (ui/icon "plus" {:size 16 :class "opacity-50"})
          [:div.ml-1 {:style {:margin-top 1}}
          [:div.ml-1 {:style {:margin-top 1}}
           "Add property"]]]])))
           "Add property"]]]])))
 
 

+ 3 - 3
src/main/frontend/components/property.css

@@ -30,7 +30,7 @@
 }
 }
 
 
 .ls-block .property-pair, .ls-sidebar-page-properties .property-pair, .property-block .property-value, .block-property-value {
 .ls-block .property-pair, .ls-sidebar-page-properties .property-pair, .property-block .property-value, .block-property-value {
-  margin-left: 7px;
+  margin-left: 2px;
 }
 }
 
 
 .grid-auto-fit {
 .grid-auto-fit {
@@ -331,8 +331,8 @@ a.control-link {
   .property-icon {
   .property-icon {
     @apply flex items-center;
     @apply flex items-center;
     svg {
     svg {
-        width: 15px;
-        height: 15px;
+        width: 16px;
+        height: 16px;
     }
     }
   }
   }