mirror of
https://github.com/penpot/penpot.git
synced 2025-05-22 12:36:13 +02:00
Additional work on colors page.
This commit is contained in:
parent
5d7379ec32
commit
5fb93ad5fd
5 changed files with 66 additions and 130 deletions
|
@ -1,36 +1,32 @@
|
|||
(ns uxbox.ui.dashboard.builtins)
|
||||
|
||||
(def ^:static +colors+
|
||||
(def ^:static +color-collections+
|
||||
[{:name "Generic 1"
|
||||
:id 1
|
||||
:colors
|
||||
[{:hex "00f9ff"}
|
||||
{:hex "009fff"}
|
||||
{:hex "0078ff"}
|
||||
{:hex "005eff"}
|
||||
{:hex "0900ff"}
|
||||
{:hex "7502f1"}
|
||||
{:hex "ffe705"}
|
||||
{:hex "00ffab"}
|
||||
{:hex "f52105"}
|
||||
{:hex "7502f1"}
|
||||
{:hex "ffe705"}
|
||||
{:hex "00ffab"}
|
||||
{:hex "f52105"}]}
|
||||
:colors #{:00f9ff
|
||||
:009fff
|
||||
:0078ff
|
||||
:005eff
|
||||
:0900ff
|
||||
:7502f1
|
||||
:ffe705
|
||||
:00ffab
|
||||
:f52105
|
||||
}}
|
||||
{:name "Generic 2"
|
||||
:id 2
|
||||
:colors
|
||||
[{:hex "00f9ff"}
|
||||
{:hex "009fff"}
|
||||
{:hex "0078ff"}
|
||||
{:hex "005eff"}
|
||||
{:hex "0900ff"}
|
||||
{:hex "7502f1"}
|
||||
{:hex "ffe705"}
|
||||
{:hex "00ffab"}
|
||||
{:hex "f52105"}
|
||||
{:hex "7502f1"}
|
||||
{:hex "ffe705"}
|
||||
{:hex "00ffab"}
|
||||
{:hex "f52105"}]}])
|
||||
:colors #{:00f9ff
|
||||
:009fff
|
||||
:0078ff
|
||||
:005eff
|
||||
:0900ff
|
||||
:7502f1
|
||||
:ffe705
|
||||
:00ffab
|
||||
:f52105
|
||||
}}])
|
||||
|
||||
(def ^:static +color-collections-by-id+
|
||||
(let [data (transient {})]
|
||||
(run! #(assoc! data (:id %) %) +color-collections+)
|
||||
(persistent! data)))
|
||||
|
|
|
@ -77,14 +77,16 @@
|
|||
builtin? (= (:collection-type dashboard) :builtin)
|
||||
collections (if own?
|
||||
(sort-by :id (vals colors))
|
||||
builtins/+colors+)]
|
||||
builtins/+color-collections+)]
|
||||
(html
|
||||
[:div.library-bar
|
||||
[:div.library-bar-inside
|
||||
[:ul.library-tabs
|
||||
[:li (when builtin? {:class-name "current"})
|
||||
[:li {:class-name (when builtin? "current")
|
||||
:on-click #(rs/emit! (dd/set-collection-type :builtin))}
|
||||
"STANDARD"]
|
||||
[:li (when own? {:class-name "current"})
|
||||
[:li {:class-name (when own? "current")
|
||||
:on-click #(rs/emit! (dd/set-collection-type :own))}
|
||||
"YOUR LIBRARIES"]]
|
||||
[:ul.library-elements
|
||||
;; (when own?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue