More css tweaks

pull/645/head
Tienson Qin 2020-10-22 19:56:41 +08:00
parent f24b69c9cf
commit 29191d0bdc
5 changed files with 20 additions and 18 deletions

View File

@ -652,7 +652,7 @@
control-show (util/react (rum/cursor *control-show? block-id))
dark? (= "dark" (state/sub :ui/theme))
heading? (= (get (:block/properties block) "heading") "true")]
[:div.hd-control.mr-2.flex.flex-row.items-center
[:div.mr-2.flex.flex-row.items-center
{:style {:height 24
:margin-top (if (and heading? (<= level 6))
(case level
@ -664,7 +664,7 @@
0)
:float "left"}}
[:a.block-control
[:a.block-control.opacity-50.hover:opacity-100
{:id (str "control-" uuid)
:style {:width 14
:height 16

View File

@ -313,11 +313,12 @@
(when (seq links)
(ui/dropdown-with-links
(fn [{:keys [toggle-fn]}]
[:a {:style {:position "absolute"
:right 0
:top 20}
:title "More options"
:on-click toggle-fn}
[:a.opacity-70.hover:opacity-100
{:style {:position "absolute"
:right 0
:top 20}
:title "More options"
:on-click toggle-fn}
(svg/vertical-dots {:class (util/hiccup->class "opacity-50.hover:opacity-100.h-5.w-5")})])
links
{:modal-class (util/hiccup->class

View File

@ -70,8 +70,9 @@
(let [fold? (get state ::fold?)]
[:div
[:div.flex.flex-row.items-center.mb-1
[:a.control {:on-click #(swap! fold? not)
:style {:width "0.75rem"}}
[:a.control.opacity-50.hover:opacity-100
{:on-click #(swap! fold? not)
:style {:width "0.75rem"}}
(when (seq l)
(if @fold?
svg/arrow-down-v2
@ -89,7 +90,7 @@
(rum/defc contents < rum/reactive db-mixins/query
[]
[:div.contents.flex-col.flex.ml-3.mt-2
[:div.contents.flex-col.flex.ml-3
(when-let [contents (db/entity [:page/name "contents"])]
(page/contents-page contents))])
@ -164,7 +165,7 @@
([on-close]
(close nil on-close))
([class on-close]
[:a.close.hover:text-gray-900.text-gray-500.flex.items-center
[:a.close.opacity-50.hover:opacity-100.flex.items-center
(cond-> {:on-click on-close}
class
(assoc :class class))
@ -180,12 +181,12 @@
[:div.flex.flex-col
[:div.flex.flex-row.justify-between
[:div.flex.flex-row.justify-center
[:a.hover:text-gray-900.text-gray-500.flex.items-center.pr-1
[:a.opacity-50.hover:opacity-100.flex.items-center.pr-1
{:on-click #(state/sidebar-block-toggle-collapse! db-id)}
(if collapse?
(svg/caret-right)
(svg/caret-down))]
[:div.ml-1.font-medium
[:div.ml-1
title]]
(close #(state/sidebar-remove-block! idx))]
[:div {:class (if collapse? "hidden" "initial")}

View File

@ -319,7 +319,7 @@
(when (and (not logged?)
(not config/publishing?))
[:a.text-sm.font-medium.login
[:a.text-sm.font-medium.login.opacity-70.hover:opacity-100
{:href "/login/github"
:on-click (fn []
(storage/remove :git/current-repo))}
@ -331,7 +331,7 @@
(widgets/repos true)]
(when-let [project (and current-repo (state/get-current-project))]
[:a.opacity-50.hover:opacity-100.ml-4
[:a.opacity-70.hover:opacity-100.ml-4
{:title (str (t :go-to) "/" project)
:href (str config/website "/" project)
:target "_blank"}
@ -354,7 +354,7 @@
(if-let [avatar (:avatar me)]
[:img.h-7.w-7.rounded-full
{:src avatar}]
[:div.h-7.w-7.rounded-full.bg-base-2 {:style {:padding 1.5}}
[:div.h-7.w-7.rounded-full.bg-base-2.opacity-70.hover:opacity-100. {:style {:padding 1.5}}
[:a svg/user]])])
(let [logged? (:name me)]
(->>
@ -408,7 +408,7 @@
[:a#download-as-html.hidden]
[:a.hover:.ml-3.hidden.md:block
[:a.opacity-70.hover:opacity-100.ml-3.hidden.md:block
{:on-click (fn []
(state/toggle-sidebar-open?!))}
(svg/menu)]]]]

View File

@ -400,7 +400,7 @@
[:div.content
[:div.flex-1.flex-row.foldable-title {:on-mouse-over #(reset! control? true)
:on-mouse-out #(reset! control? false)}
[:div.hd-control.flex.flex-row.items-center
[:div.flex.flex-row.items-center
[:a.block-control.opacity-50.hover:opacity-100.mr-2
{:style {:width 14
:height 16