Additional work on colors page.

This commit is contained in:
Andrey Antukh 2015-12-21 19:16:39 +02:00
parent 5d7379ec32
commit 5fb93ad5fd
5 changed files with 66 additions and 130 deletions

View file

@ -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)))