diff --git a/resources/public/styles/partials/dashboard-bar.scss b/resources/public/styles/partials/dashboard-bar.scss index 19b89c59ae..a632e319d0 100644 --- a/resources/public/styles/partials/dashboard-bar.scss +++ b/resources/public/styles/partials/dashboard-bar.scss @@ -28,22 +28,44 @@ } .dashboard-search { - cursor: pointer; - margin-left: $big; + align-items: center; + display: flex; + margin-left: $small; - svg { - fill: $color-gray-dark; - height: 20px; - width: 20px; + .input-text { + background: rgba(255,255,255,.4); + border: 0; + color: $dark-ui-text; + padding: 4px 8px; + margin: 0; + max-width: 160px; + } + + .clear-search { + align-items: center; + background: rgba(255,255,255,.4); + cursor: pointer; + display: flex; + height: 28px; + padding: 0 5px; + + svg { + fill: $light-ui-icons; + height: 15px; + transform: rotate(45deg); + width: 15px; + + &:hover { + fill: $color-danger; + } - &:hover { - fill: $color-gray-darker; } } } + &.library-gap { padding: $small $medium $small 270px; } diff --git a/src/uxbox/ui/dashboard/projects.cljs b/src/uxbox/ui/dashboard/projects.cljs index 11e1b4840b..4c125b1c77 100644 --- a/src/uxbox/ui/dashboard/projects.cljs +++ b/src/uxbox/ui/dashboard/projects.cljs @@ -192,16 +192,16 @@ (let [change-term #(rs/emit! (dd/set-project-filtering (.-value (.-target %)))) clear-term #(rs/emit! (dd/clear-project-filtering))] (html - [:form - [:input + [:form.dashboard-search + [:input.input-text {:type "text" :on-change change-term :auto-focus true + :placeholder "Search..." :value (rum/react project-filtering-l)}] - [:input - {:type "button" - :on-click clear-term - :value "X"}]]))) + [:div.clear-search + {:on-click clear-term} + i/close]]))) (def project-search (mx/component @@ -218,9 +218,7 @@ [:div.dashboard-info [:span.dashboard-projects (tr "ds.num-projects" (t/c pcount))] (project-sorting) - (project-search)] - [:div.dashboard-search - i/search]]))) + (project-search)]]))) (def menu (mx/component @@ -299,4 +297,3 @@ {:render grid-render :name "grid" :mixins [rum/reactive]})) -