0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-28 15:41:25 -05:00
This commit is contained in:
Andrey Antukh 2015-12-13 22:57:14 +02:00
parent 68b5f9c2ea
commit 7b8f241d41
9 changed files with 124 additions and 76 deletions

View file

@ -1,7 +1,8 @@
(ns uxbox.core
(:require [uxbox.ui :as ui]
(:require [uxbox.state]
[uxbox.ui :as ui]
[uxbox.ui.navigation]
[uxbox.state]
[uxbox.router]
[uxbox.rstore]
[goog.dom :as dom]))

View file

@ -2,9 +2,9 @@
(:require [bidi.router]
[bidi.bidi :as bidi]
[goog.events :as events]
[uxbox.state]
[uxbox.rstore :as rs]))
(enable-console-print!)
(declare +router+)
@ -24,7 +24,6 @@
rs/UpdateEvent
(-apply-update [_ state]
(println "-apply-update" handler route-params)
(merge state
{:location handler}
(when route-params
@ -66,12 +65,12 @@
(defn- on-navigate
[data]
(println "on-navigate:" data)
(rs/emit! (update-location data)))
(defonce +router+
(bidi.router/start-router! routes {:on-navigate on-navigate
:default-location {:handler :auth/login}}))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Public Api
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -51,7 +51,6 @@
"Emits an event or a collection of them.
The order of events does not matters."
([event]
(println "emit! " event)
(rx/push! bus event))
([event & events]
(run! #(rx/push! bus %) (into [event] events))))
@ -84,7 +83,6 @@
(-apply-update [_ _]
state)))
(defn init
"Initializes the stream event loop and
return a stream with model changes."
@ -108,6 +106,5 @@
(rx/on-value $ emit!))
;; Initialize the stream machinary with initial state.
(emit! (reset-state state))
(emit! (swap-state (fn [s] (merge s state))))
state-s))

View file

@ -2,16 +2,14 @@
(:require [uxbox.rstore :as rs]
[beicon.core :as rx]))
(defonce stream
(rs/init {:location :auth/login
:location-params nil
(enable-console-print!)
(defonce state (atom {}))
(def stream
(rs/init {:user {:fullname "Cirilla"
:avatar "http://lorempixel.com/50/50/"}
:projects-by-id {}
:pages-by-id {}}))
(defonce state (atom {}))
(rx/to-atom stream state)
;; (rs/emit! (rs/reset-state {:location :auth/login
;; :location-params nil
;; :projects-by-id {}
;; :pages-by-id {}}))

View file

@ -7,13 +7,12 @@
[uxbox.ui.dashboard :as ui.d]))
(def ^:private ^:static state
(as-> (l/select-keys [:location]) $
(as-> (l/select-keys [:location :location-params]) $
(l/focus-atom $ s/state)))
(defn app-render
[own]
(println "KAKA: " @state)
(let [{:keys [location location-params]} (rum/react state)]
(let [{:keys [location location-params] :as state} (rum/react state)]
(case location
:auth/login (ui.u/login)
;; :auth/register (u/register)
@ -28,18 +27,6 @@
(util/component {:render app-render
:mixins [rum/reactive]
:name "app"}))
;; (rum/defc app < rum/reactive
;; [conn location]
;; (let [{:keys [location location-params]} (rum/react state)]
;; (case location
;; :auth/login (u/login)
;; :auth/register (u/register)
;; :auth/recover (u/recover-password)
;; :main/dashboard (d/dashboard)
;; :main/project (w/workspace conn location-params)
;; :main/page (w/workspace conn location-params))))
(defn mount!
[el]
(rum/mount (app) el))

View file

@ -218,7 +218,6 @@
(defn dashboard-render
[own]
(println "2222")
(html
[:main.dashboard-main
(header)

View file

@ -1,4 +1,5 @@
(ns uxbox.ui.icons)
(ns uxbox.ui.icons
(:require [sablono.core :as html :refer-macros [html]]))
(def logo
[:svg
@ -56,7 +57,8 @@
"m254.83206 1051.8787c-2.65759 0.6446-7.00641 0.6446-9.66407 0-5.77272-1.4-13.14681-8.2641-14.84551-13.8188-0.64086-2.0956-1.13697-50.68291-1.10251-107.97192 0.0345-57.28903-0.56181-104.78648-1.32503-105.5499-0.76322-0.76342-48.24831-1.35984-105.52242-1.32537-57.274094 0.0345-105.848829-0.46179-107.943842-1.10281-2.095015-0.641-5.7968829-3.15684-8.2263775-5.59077-8.2697477-8.28472-8.2697131-19.89906 0-28.18382 2.4299131-2.4335 6.1313615-4.94977 8.2263775-5.59077 2.095016-0.64101 50.66975-1.13727 107.943842-1.1028 57.27411 0.0345 104.7592-0.56195 105.52242-1.32538 0.76322-0.76342 1.35948-48.26087 1.32503-105.54989-0.0345-57.28901 0.46168-105.87639 1.10252-107.97196 0.64083-2.09555 3.15602-5.79839 5.58931-8.22852 8.28279-8.27168 19.89389-8.27186 28.17649 0 2.43287 2.43055 4.94848 6.13297 5.58931 8.22852 0.64085 2.09557 1.13698 50.68295 1.10252 107.97196-0.0345 57.28901 0.56181 104.78647 1.32503 105.54989 0.76322 0.76343 48.24831 1.35984 105.52241 1.32539 57.2741-0.0345 105.84882 0.46176 107.94383 1.10278 2.09504 0.64101 5.79694 3.1569 8.22638 5.59077 8.26952 8.28494 8.26976 19.8991 0 28.18383-2.43138 2.43202-6.13137 4.94974-8.22634 5.5908-2.09503 0.64098-50.66977 1.13725-107.94386 1.10278-57.27411-0.0345-104.7592 0.56195-105.52242 1.32537-0.76322 0.76342-1.35948 48.26087-1.32504 105.54989 0.0345 57.28902-0.46166 105.87643-1.10248 107.97203-1.69867 5.5546-9.07281 12.4187-14.84557 13.8187z"}]]])
(def page
[:svg
(html
[:svg
{:viewBox "0 0 500.00001 500.00001"
:height "500"
:width "500"}
@ -64,7 +66,7 @@
{:transform "translate(0,-552.36216)"}
[:path
{:d
"m320.39015 552.36384c-73.44108 0.67745-146.95887-0.65415-220.35122 1.35334-20.735733 7.39435-39.285118 27.31347-37.496207 50.50588 0.159401 136.49023-0.678826 273.03012 0.435229 409.48934 7.00946 21.481 27.826139 39.8571 51.330508 38.0905 93.42612 1.0407 186.87148 0.3971 280.29208-0.074 11.93639-0.885 21.88629-9.1406 29.96801-17.301 9.44013-10.0211 14.25282-24.0348 12.62864-37.73777-0.068-109.31076 0.33172-218.62105 0.414-327.93168-38.8013-38.79882-77.60274-77.59751-116.40404-116.39634l-0.817 0.002zM156.2119 596.40487c44.39032 0.0793 88.78053 0.20461 133.17076 0.32295 0.89112 30.38082-1.63281 61.04374 3.10844 91.19049 4.50849 10.79379 17.66579 12.76549 27.98415 11.74708 24.31509 0.93899 48.65429 0.86757 72.98341 0.8347-0.94636 100.89864 1.59171 201.89472-0.93042 302.73151-4.32142 8.2814-15.4464 5.2405-22.98551 5.4881-85.85716-0.442-171.75573 0.5107-257.58716-0.49-8.5224-3.9279-4.48072-14.7643-5.47913-21.87524-1.05218-89.48558-0.25588-178.98094-0.67544-268.47056 0.0769-38.72441-0.0552-77.52294 0.82966-116.19834 5.15916-8.09318 16.09959-4.2524 23.95239-5.21639 8.54273-0.0805 17.08621 0.0375 25.62885-0.0643zm183.87657 37.19746c7.31652 7.26768 14.61028 14.55841 21.85135 21.90133-9.15606 0.0559-18.31231 0.006-27.46846 0.0135 0.004-9.15358-0.0407-18.30727 0.0135-27.46076 1.86788 1.84866 3.73577 3.69732 5.60365 5.54598zM186.86953 759.6181c-13.51688 0.90037-27.78705-1.09729-40.95181 2.9066-14.55751 6.71156-15.52384 31.17282-0.41523 37.83184 12.35107 5.4839 26.1995 1.54676 39.06972 2.81948 55.27419 0.20135 110.65713 1.39131 165.86234-1.0317 16.51104-4.35227 20.12709-31.04729 4.42141-38.71804-14.42469-5.96564-30.39136-2.38042-45.49997-3.70231-40.8284-0.27337-81.65801 0.1215-122.48646-0.10587zm7.57405 82.67833c-15.3862 0.36678-30.98165-0.0866-46.20944 2.22608-14.26085 4.44473-18.88813 25.29444-7.7586 35.35778 10.4972 10.18266 26.50705 6.06793 39.5156 6.93108 56.02716 0.1996 112.13912 1.36881 168.1116-1.08522 12.16166-1.99844 20.42559-15.48166 16.32845-27.20317-2.76428-10.21399-13.43017-16.41979-23.71054-15.26258-43.82424-1.9684-87.71727-0.3158-131.56913-0.94096-4.90258-0.0291-9.80528-0.0358-14.70794-0.023zm-9.68287 83.66835c-12.50914 0.35681-25.33564-0.61576-37.64537 1.15148-12.614 6.28059-17.65249 25.62063-6.61289 35.68265 9.88024 9.66013 24.91707 6.06324 37.28579 6.72443 56.77355 0.32441 113.62307 1.22515 170.34719-1.04388 11.04294-1.63331 19.10832-12.97955 16.70329-23.9371-1.57109-10.58817-11.77955-19.6154-22.71618-17.97767-52.44584-1.16105-104.90969-0.29309-157.36183-0.59991z"}]]])
"m320.39015 552.36384c-73.44108 0.67745-146.95887-0.65415-220.35122 1.35334-20.735733 7.39435-39.285118 27.31347-37.496207 50.50588 0.159401 136.49023-0.678826 273.03012 0.435229 409.48934 7.00946 21.481 27.826139 39.8571 51.330508 38.0905 93.42612 1.0407 186.87148 0.3971 280.29208-0.074 11.93639-0.885 21.88629-9.1406 29.96801-17.301 9.44013-10.0211 14.25282-24.0348 12.62864-37.73777-0.068-109.31076 0.33172-218.62105 0.414-327.93168-38.8013-38.79882-77.60274-77.59751-116.40404-116.39634l-0.817 0.002zM156.2119 596.40487c44.39032 0.0793 88.78053 0.20461 133.17076 0.32295 0.89112 30.38082-1.63281 61.04374 3.10844 91.19049 4.50849 10.79379 17.66579 12.76549 27.98415 11.74708 24.31509 0.93899 48.65429 0.86757 72.98341 0.8347-0.94636 100.89864 1.59171 201.89472-0.93042 302.73151-4.32142 8.2814-15.4464 5.2405-22.98551 5.4881-85.85716-0.442-171.75573 0.5107-257.58716-0.49-8.5224-3.9279-4.48072-14.7643-5.47913-21.87524-1.05218-89.48558-0.25588-178.98094-0.67544-268.47056 0.0769-38.72441-0.0552-77.52294 0.82966-116.19834 5.15916-8.09318 16.09959-4.2524 23.95239-5.21639 8.54273-0.0805 17.08621 0.0375 25.62885-0.0643zm183.87657 37.19746c7.31652 7.26768 14.61028 14.55841 21.85135 21.90133-9.15606 0.0559-18.31231 0.006-27.46846 0.0135 0.004-9.15358-0.0407-18.30727 0.0135-27.46076 1.86788 1.84866 3.73577 3.69732 5.60365 5.54598zM186.86953 759.6181c-13.51688 0.90037-27.78705-1.09729-40.95181 2.9066-14.55751 6.71156-15.52384 31.17282-0.41523 37.83184 12.35107 5.4839 26.1995 1.54676 39.06972 2.81948 55.27419 0.20135 110.65713 1.39131 165.86234-1.0317 16.51104-4.35227 20.12709-31.04729 4.42141-38.71804-14.42469-5.96564-30.39136-2.38042-45.49997-3.70231-40.8284-0.27337-81.65801 0.1215-122.48646-0.10587zm7.57405 82.67833c-15.3862 0.36678-30.98165-0.0866-46.20944 2.22608-14.26085 4.44473-18.88813 25.29444-7.7586 35.35778 10.4972 10.18266 26.50705 6.06793 39.5156 6.93108 56.02716 0.1996 112.13912 1.36881 168.1116-1.08522 12.16166-1.99844 20.42559-15.48166 16.32845-27.20317-2.76428-10.21399-13.43017-16.41979-23.71054-15.26258-43.82424-1.9684-87.71727-0.3158-131.56913-0.94096-4.90258-0.0291-9.80528-0.0358-14.70794-0.023zm-9.68287 83.66835c-12.50914 0.35681-25.33564-0.61576-37.64537 1.15148-12.614 6.28059-17.65249 25.62063-6.61289 35.68265 9.88024 9.66013 24.91707 6.06324 37.28579 6.72443 56.77355 0.32441 113.62307 1.22515 170.34719-1.04388 11.04294-1.63331 19.10832-12.97955 16.70329-23.9371-1.57109-10.58817-11.77955-19.6154-22.71618-17.97767-52.44584-1.16105-104.90969-0.29309-157.36183-0.59991z"}]]]))
(def folder
[:svg
@ -181,7 +183,8 @@
"m0.32786945 583.28935c-0.01731 154.86312-1.1434756 309.76991 0.1890122 464.60575 3.42297305 5.8801 11.42262935 2.9412 17.02479935 3.8041 159.804239 1.5123 319.635879-0.087 479.429489 0.2734 4.84753 2.1011 2.63124-5.0869 2.80172-7.4325 0.21954-81.86894 0.0323-163.76968 0.0945-245.65085-15.8534 0-31.7068 0-47.56019 0-0.42763 68.0503-0.8574 136.10057-1.28371 204.15085-133.94401 0-267.88802 0-401.832032 0 0-133.94398 0-267.88799 0-401.832 68.050962-0.42631 136.101892-0.85608 204.152852-1.28371 0-15.85405 0-31.70811 0-47.56216-84.33817 0-168.676315 0-253.01447205 0-0.0006564 10.30904-0.00131 20.61807-0.00197 30.92712zM329.02203 599.92045c28.84878 0.29635 57.7037 0.19717 86.54593 0.97065-41.14083 44.14516-85.49473 85.25729-126.57123 129.40444-0.3673 8.15453 8.63834 11.84867 12.75328 17.84073 5.42547 5.6539 10.90188 11.42678 17.55758 15.65184 9.59809-3.53351 14.43162-13.47296 22.4493-19.30482 36.68366-35.78205 72.17295-72.78596 109.58753-107.81769 0.76612 28.84173 0.67091 57.69584 0.96869 86.54396 15.85143 0 31.70286 0 47.55428 0 0-56.94845 0-113.89691 0-170.84536-56.94845 0-113.89691 0-170.84536 0 0 15.85208 0 31.70416 0 47.55625z"}]]])
(def exit
[:svg#svg4946
(html
[:svg#svg4946
{:viewBox "0 0 500 500.00001"
:height "500"
:width "500"}
@ -189,10 +192,11 @@
{:transform "translate(0,-552.3622)"}
[:path
{:d
"M42.200656 1051.3855C26.72746 1047.706 12.320915 1035.669 4.837135 1020.1676l-4.7248-9.7867 0-61.98274 0-61.9825 27.402824 0 27.402825 0 0.340383 55.1319 0.340395 55.1318 194.415398 0 194.41541 0 0-194.42954 0-194.42956-194.41541 0-194.415398 0-0.340395 55.13186-0.340383 55.13188-27.402825 0-27.402824 0 0-61.98258 0-61.98258 4.7248-9.78672c6.11369-12.6636 14.58156-21.13147 27.245161-27.24517l9.786724-4.72479 208.13099 0 208.13096 0 9.78673 4.72479c12.6636 6.1137 21.13148 14.58157 27.24516 27.24517l4.7248 9.78672 0 208.19866 0 208.1986-4.80498 9.7191c-6.28078 12.7042-14.76269 21.19-27.16498 27.1775l-9.78673 4.7248-205.52117 0.2052c-116.4972 0.1163-207.63847-0.2983-210.409144-0.9572zM216.38205 921.95766c-10.21785-10.236-18.57791-19.195-18.57791-19.909 0-0.7138 15.26834-16.5579 33.92966-35.2088 18.66132-18.651 33.73292-34.50122 33.49244-35.22281-0.2873-0.86209-45.81479-1.53568-132.77556-1.9644L0.112335 829.0002l0-26.75038 0-26.75037 132.338345-0.65246c86.96077-0.42871 132.48826-1.10231 132.77556-1.96439 0.24048-0.72159-14.83112-16.57184-33.49244-35.2228-18.66132-18.65096-33.92966-34.50987-33.92966-35.24202 0-0.73215 8.43714-9.75327 18.7492-20.04695 16.19098-16.16209 19.08423-18.53049 21.20458-17.35803 4.35624 2.4088 136.20725 135.27184 136.20725 137.25272 0 2.1097-135.59691 138.30334-137.69737 138.30334-0.71933 0-9.66792-8.375-19.88575-18.6112z"}]]])
"M42.200656 1051.3855C26.72746 1047.706 12.320915 1035.669 4.837135 1020.1676l-4.7248-9.7867 0-61.98274 0-61.9825 27.402824 0 27.402825 0 0.340383 55.1319 0.340395 55.1318 194.415398 0 194.41541 0 0-194.42954 0-194.42956-194.41541 0-194.415398 0-0.340395 55.13186-0.340383 55.13188-27.402825 0-27.402824 0 0-61.98258 0-61.98258 4.7248-9.78672c6.11369-12.6636 14.58156-21.13147 27.245161-27.24517l9.786724-4.72479 208.13099 0 208.13096 0 9.78673 4.72479c12.6636 6.1137 21.13148 14.58157 27.24516 27.24517l4.7248 9.78672 0 208.19866 0 208.1986-4.80498 9.7191c-6.28078 12.7042-14.76269 21.19-27.16498 27.1775l-9.78673 4.7248-205.52117 0.2052c-116.4972 0.1163-207.63847-0.2983-210.409144-0.9572zM216.38205 921.95766c-10.21785-10.236-18.57791-19.195-18.57791-19.909 0-0.7138 15.26834-16.5579 33.92966-35.2088 18.66132-18.651 33.73292-34.50122 33.49244-35.22281-0.2873-0.86209-45.81479-1.53568-132.77556-1.9644L0.112335 829.0002l0-26.75038 0-26.75037 132.338345-0.65246c86.96077-0.42871 132.48826-1.10231 132.77556-1.96439 0.24048-0.72159-14.83112-16.57184-33.49244-35.2228-18.66132-18.65096-33.92966-34.50987-33.92966-35.24202 0-0.73215 8.43714-9.75327 18.7492-20.04695 16.19098-16.16209 19.08423-18.53049 21.20458-17.35803 4.35624 2.4088 136.20725 135.27184 136.20725 137.25272 0 2.1097-135.59691 138.30334-137.69737 138.30334-0.71933 0-9.66792-8.375-19.88575-18.6112z"}]]]))
(def user
[:svg#svg4946
(html
[:svg#svg4946
{:viewBox "0 0 500 500.00001"
:height "500"
:width "500"}
@ -200,7 +204,7 @@
{:transform "translate(0,-552.3622)"}
[:path
{:d
"m246.98504 553.09534c-66.78301 0.80186-129.73641 53.75469-139.48732 120.26494-3.94517 27.51911-1.57685 55.43911-2.75057 83.07676 0.18637 31.93939 7.23559 64.86846 26.38116 91.03913 28.25985 41.2341 78.75186 66.56102 128.8329 62.52062 47.51271-2.8266 92.65669-30.58145 116.34317-71.91822 15.24758-25.79118 21.49277-56.20089 19.98435-85.97243-0.10253-28.64372 0.7058-57.56109-3.72367-85.93119-13.59326-61.99523-71.86598-111.23432-135.52804-112.97951-3.34871-0.10424-6.70168-0.10957-10.05198-0.1001zm5.47784 42.08288c47.85555 0.046 93.12932 38.70134 100.3093 86.1658 2.365 22.65888 0.44593 45.83593 1.17993 68.74511 0.57727 20.6782-0.46138 42.34281-10.70764 60.89494-17.79698 35.84478-57.96103 59.85257-97.74274 57.02092-41.40224-1.43792-80.35819-31.05154-92.82583-70.78064-7.32238-21.29969-5.03536-44.23003-6.15766-66.40317 0.097-22.28446 0.20369-44.85291 6.53499-66.40325 14.25415-40.84453 55.91545-70.60997 99.40965-69.23971zM122.4911 859.98434c-30.979635 7.4646-63.301753 13.30468-91.297903 29.33162-17.3186 11.0876-32.11774037 30.03513-30.50961037 51.59983 0.12954 21.6427-2.97393003 43.9847 3.06465997 65.11511 9.1994904 27.5728 37.9945204 47.8109 67.2932744 44.7204 101.576969 1.621 203.171339 0.457 304.755379 0.7172 24.57904-0.2851 49.3022 0.076 73.76217-2.1874 31.84418-8.1678 53.25119-41.9002 50.00688-74.13581 0.40853-22.1585 2.83878-46.8449-10.4724-66.1076-14.12234-20.95398-39.03435-30.84749-62.73582-36.3913-16.77233-4.63141-33.53451-11.20391-51.09984-11.50774-15.81928 2.31614-22.23166 26.64889-8.39242 35.54553 14.4416 8.85573 31.68278 11.14461 47.61035 16.18011 13.82006 4.0284 29.10882 7.9967 39.2618 18.9045 5.35455 9.5161 1.75305 20.8897 2.92028 31.2422-0.10665 11.916 1.1828 24.2266-3.74186 35.3023-5.91236 9.78921-18.32856 12.43061-28.92455 10.94261-121.119 0-242.23801 0-363.357013 0-12.27499-4.3183-20.98502-17.78691-17.90009-30.78151 0.49941-15.8215-2.9747-32.5176 3.30306-47.241 11.4435-13.1661 29.818413-14.6504 45.345043-20.2942 16.15763-4.5374 33.9686-6.99877 47.43617-17.75882 10.38316-12.2959-0.22569-33.94383-16.32756-33.19603z"}]]])
"m246.98504 553.09534c-66.78301 0.80186-129.73641 53.75469-139.48732 120.26494-3.94517 27.51911-1.57685 55.43911-2.75057 83.07676 0.18637 31.93939 7.23559 64.86846 26.38116 91.03913 28.25985 41.2341 78.75186 66.56102 128.8329 62.52062 47.51271-2.8266 92.65669-30.58145 116.34317-71.91822 15.24758-25.79118 21.49277-56.20089 19.98435-85.97243-0.10253-28.64372 0.7058-57.56109-3.72367-85.93119-13.59326-61.99523-71.86598-111.23432-135.52804-112.97951-3.34871-0.10424-6.70168-0.10957-10.05198-0.1001zm5.47784 42.08288c47.85555 0.046 93.12932 38.70134 100.3093 86.1658 2.365 22.65888 0.44593 45.83593 1.17993 68.74511 0.57727 20.6782-0.46138 42.34281-10.70764 60.89494-17.79698 35.84478-57.96103 59.85257-97.74274 57.02092-41.40224-1.43792-80.35819-31.05154-92.82583-70.78064-7.32238-21.29969-5.03536-44.23003-6.15766-66.40317 0.097-22.28446 0.20369-44.85291 6.53499-66.40325 14.25415-40.84453 55.91545-70.60997 99.40965-69.23971zM122.4911 859.98434c-30.979635 7.4646-63.301753 13.30468-91.297903 29.33162-17.3186 11.0876-32.11774037 30.03513-30.50961037 51.59983 0.12954 21.6427-2.97393003 43.9847 3.06465997 65.11511 9.1994904 27.5728 37.9945204 47.8109 67.2932744 44.7204 101.576969 1.621 203.171339 0.457 304.755379 0.7172 24.57904-0.2851 49.3022 0.076 73.76217-2.1874 31.84418-8.1678 53.25119-41.9002 50.00688-74.13581 0.40853-22.1585 2.83878-46.8449-10.4724-66.1076-14.12234-20.95398-39.03435-30.84749-62.73582-36.3913-16.77233-4.63141-33.53451-11.20391-51.09984-11.50774-15.81928 2.31614-22.23166 26.64889-8.39242 35.54553 14.4416 8.85573 31.68278 11.14461 47.61035 16.18011 13.82006 4.0284 29.10882 7.9967 39.2618 18.9045 5.35455 9.5161 1.75305 20.8897 2.92028 31.2422-0.10665 11.916 1.1828 24.2266-3.74186 35.3023-5.91236 9.78921-18.32856 12.43061-28.92455 10.94261-121.119 0-242.23801 0-363.357013 0-12.27499-4.3183-20.98502-17.78691-17.90009-30.78151 0.49941-15.8215-2.9747-32.5176 3.30306-47.241 11.4435-13.1661 29.818413-14.6504 45.345043-20.2942 16.15763-4.5374 33.9686-6.99877 47.43617-17.75882 10.38316-12.2959-0.22569-33.94383-16.32756-33.19603z"}]]]))
(def image
[:svg#svg4946
@ -228,7 +232,8 @@
"M333.67425 553.74496C222.45047 664.96751 111.22664 776.18999 0.002875 887.41252 54.983009 942.39564 109.96286 997.379 164.94299 1052.3622 276.62769 940.67873 388.31243 828.99533 499.99712 717.31187 445.01698 662.32875 390.03714 607.34533 335.057 552.3622l-0.69145 0.69146-0.6913 0.6913zm54.8788 110.04985c18.01156 18.00709 36.0231 36.01418 54.03466 54.02127C350.21586 810.07342 258.1109 902.59851 165.4281 994.5441 129.16752 958.92345 93.403308 922.80481 57.419936 886.90639c8.858076-8.85807 17.716151-17.71615 26.574226-26.57422 9.263873 8.87855 17.615348 18.79809 27.977998 26.46727 7.4703-1.13808 11.15104-8.91107 16.65806-13.21071 4.00843-3.78397 8.316-7.59774 10.50441-12.79246-5.49084-9.19908-14.29237-15.74039-21.26091-23.68074-1.34566-1.73238-5.6696-3.17213-5.14525-5.64946 7.07631-6.03669 13.6745-14.66405 20.60009-19.61076 9.09844 8.77993 17.34644 18.54622 27.59601 26.05665 7.44495-1.196 11.13335-8.89376 16.61606-13.23746 3.99359-3.78596 8.28746-7.59905 10.47577-12.7829-5.22372-8.96407-13.8455-15.20665-20.49125-22.97409-1.65554-1.96459-5.79266-3.37248-5.84998-6.16703 6.68817-6.73481 13.42464-13.42776 20.13026-20.14745 20.01434 19.61211 39.12764 40.16534 60.06989 58.8132 6.96182 0.111 10.29712-7.39925 15.21992-11.07929 4.13751-4.54479 10.51856-8.80317 11.96739-14.75773-2.69172-7.21207-10.18457-11.08275-14.65665-17.06694-14.58126-14.92054-29.43219-29.57566-44.15465-44.35706 6.95981-6.42426 13.88881-14.94733 20.86748-20.08634 9.1017 8.77482 17.33546 18.55791 27.59411 26.05666 7.45551-1.17718 11.112-8.93766 16.61414-13.24129 4.00232-3.78571 8.30816-7.60161 10.47194-12.80581-5.25029-8.93558-13.83181-15.20068-20.48741-22.94926-1.72275-1.96312-5.76294-3.36443-5.8538-6.1613 6.83462-6.34525 13.68876-14.75955 20.55806-19.79221 9.12743 8.77712 17.33975 18.62135 27.65904 26.07765 7.38351-1.32273 11.10244-8.88042 16.54921-13.26418 4.00144-3.78874 8.29899-7.61031 10.4853-12.80392-5.50086-9.17541-14.29922-15.69412-21.24945-23.633-1.47637-1.74001-5.28036-3.04165-5.23118-5.54632 8.95422-8.5157 17.4966-17.52502 26.29728-26.22471 18.00901 18.00453 36.01801 36.00909 54.027 54.01363z"}]]])
(def grid
[:svg
(html
[:svg
{:viewBox "0 0 500 500.00001"
:height "500"
:width "500"}
@ -236,7 +241,7 @@
{:transform "translate(0,-552.3622)"}
[:path
{:d
"m456.73499 552.40637c-37.03948 0.55553-74.13146-0.0579-111.19268 0.16864-103.75485 0-207.5097 0-311.264546 0-13.378707 4.87752-25.1288586 14.40338-30.965554 27.59878-5.4848905 9.55437-1.8671196 21.00046-2.90252482 31.44964 0 135.52059 0 271.04119 0 406.56177 6.28640122 17.3263 21.49629082 33.3779 40.99047482 33.5963 132.07284 1.2119 264.18356 0.1387 396.27102 0.2146 10.09638-0.5821 20.80251 1.1486 30.50925-0.907 14.91841-6.1906 28.43314-18.8709 31.57859-35.2667 0.11288-143.11195 0.0226-286.31 0.0516-429.4547-5.85142-16.19374-19.35885-30.4674-36.60791-33.81848-2.14743-0.22947-4.31215-0.20837-6.4677-0.14285zM97.272275 593.8968c17.193555 0.44644 34.497565-0.6536 51.588765 1.75977 5.46534 5.38378 2.18232 13.95144 3.48522 20.6441 0.30391 28.0139 1.53524 56.27544-1.31081 84.13248-3.33 5.94455-11.54189 2.74028-16.92404 3.97018-29.26161 0.45356-58.770975 1.68478-87.878338-1.20257-5.932256-3.34253-2.73049-11.53903-3.960263-16.92204-0.45574-29.25904-1.679227-58.76512 1.198599-87.87041 3.325068-5.95374 11.5233-2.69657 16.896671-4.01939 12.29604-0.42155 24.602036-0.45212 36.904196-0.49212zm152.855735 0c17.19355 0.44644 34.49756-0.6536 51.58875 1.75977 5.46434 5.38405 2.1828 13.95126 3.48522 20.6441 0.30391 28.0139 1.53525 56.27544-1.31081 84.13248-3.33006 5.94455-11.5419 2.7403-16.92403 3.97018-29.26162 0.45356-58.77098 1.68478-87.87834-1.20257-5.93082-3.34298-2.73116-11.53915-3.96028-16.92204-0.45846-29.25631-1.67385-58.75535 1.19465-87.86049 3.31705-5.96652 11.52774-2.70656 16.90262-4.02931 12.29538-0.42156 24.60072-0.45212 36.90222-0.49212zm152.85572 0c17.20128 0.45264 34.51487-0.6624 51.61256 1.7677 5.41388 5.4045 2.20292 13.93815 3.46246 20.63421 0.29842 28.0184 1.5392 56.28568-1.31383 84.14634-3.34635 5.92716-11.53861 2.7296-16.92207 3.95757-29.25905 0.45511-58.76527 1.68367-87.87038-1.19987-5.94111-3.33402-2.73896-11.54122-3.96823-16.92403-0.45719-29.25672-1.67637-58.75801 1.19664-87.86248 3.31678-5.9644 11.52676-2.70429 16.90064-4.02732 12.29538-0.42156 24.60071-0.45212 36.90221-0.49212zM97.272275 746.75252c17.193555 0.44645 34.497565-0.6536 51.588765 1.75978 5.46534 5.38377 2.18232 13.95144 3.48522 20.6441 0.30391 28.01388 1.53524 56.27543-1.31081 84.13247-3.33075 5.94485-11.54343 2.73914-16.92603 3.96947-29.26096 0.45323-58.769584 1.68379-87.876348-1.20185-5.931836-3.34263-2.729601-11.53926-3.960263-16.92205-0.45574-29.25904-1.679227-58.76511 1.198599-87.8704 3.325068-5.95374 11.5233-2.69658 16.896671-4.01939 12.29604-0.42155 24.602036-0.45213 36.904196-0.49213zm152.855735 0c17.19355 0.44645 34.49756-0.6536 51.58875 1.75978 5.46434 5.38405 2.1828 13.95126 3.48522 20.6441 0.30391 28.01388 1.53525 56.27543-1.31081 84.13247-3.33084 5.94504-11.54327 2.73954-16.92604 3.96947-29.25839 0.45423-58.76389 1.68166-87.86839-1.19986-5.94217-3.3335-2.73724-11.54157-3.96822-16.92404-0.45846-29.25631-1.67385-58.75534 1.19465-87.86048 3.31705-5.96653 11.52774-2.70657 16.90262-4.02931 12.29538-0.42156 24.60072-0.45213 36.90222-0.49213zm152.85572 0c17.20128 0.45264 34.51487-0.66239 51.61256 1.76771 5.41388 5.4045 2.20292 13.93815 3.46246 20.6342 0.29842 28.0184 1.5392 56.28568-1.31383 84.14634-3.34875 5.93378-11.53227 2.71295-16.92206 3.9563-29.259 0.45697-58.76523 1.68226-87.87039-1.19859-5.94111-3.33402-2.73896-11.54122-3.96823-16.92404-0.45719-29.25672-1.67637-58.758 1.19664-87.86247 3.31678-5.9644 11.52676-2.70429 16.90064-4.02732 12.29538-0.42156 24.60071-0.45213 36.90221-0.49213zM97.272275 899.60825c17.192315 0.44719 34.494715-0.65282 51.584795 1.75977 5.47318 5.37848 2.18417 13.95237 3.48919 20.6441 0.30719 28.0113 1.52877 56.26515-1.30486 84.12258-3.32192 5.9583-11.54623 2.7497-16.92999 3.9801-29.25903 0.4558-58.765115 1.6792-87.870403-1.1986-5.941105-3.334-2.738955-11.54124-3.968198-16.92405-0.453371-29.26202-1.684029-58.77352 1.202567-87.88032 3.333596-5.94075 11.52021-2.69037 16.892703-4.01146 12.296067-0.42133 24.602002-0.45375 36.904196-0.49212zm152.855735 0c17.19355 0.44832 34.49779-0.65503 51.58875 1.76175 5.46502 5.38318 2.1825 13.95011 3.48522 20.64212 0.30601 28.01241 1.53115 56.26886-1.30684 84.12658-3.32378 5.9546-11.54496 2.7453-16.928 3.9761-29.25904 0.4558-58.76512 1.6792-87.8704-1.1986-5.94088-3.3343-2.73915-11.54118-3.96822-16.92405-0.45835-29.25622-1.67401-58.75578 1.19465-87.86048 3.31525-5.96723 11.52783-2.71042 16.90262-4.0313 12.29541-0.42134 24.60068-0.45375 36.90222-0.49212zm152.85572 0c17.2013 0.45298 34.51506-0.66367 51.61256 1.76969 5.41468 5.40339 2.20187 13.93687 3.46246 20.63221 0.30083 28.01544 1.53442 56.27728-1.30987 84.13645-3.33348 5.9431-11.54111 2.737-16.92403 3.9682-29.26202 0.4534-58.77352 1.6841-87.88033-1.2026-5.93062-3.3411-2.73141-11.53805-3.96028-16.92005-0.45834-29.25622-1.674-58.75578 1.19466-87.86048 3.31539-5.96708 11.52777-2.71053 16.90262-4.0313 12.2954-0.42134 24.60068-0.45375 36.90221-0.49212z"}]]])
"m456.73499 552.40637c-37.03948 0.55553-74.13146-0.0579-111.19268 0.16864-103.75485 0-207.5097 0-311.264546 0-13.378707 4.87752-25.1288586 14.40338-30.965554 27.59878-5.4848905 9.55437-1.8671196 21.00046-2.90252482 31.44964 0 135.52059 0 271.04119 0 406.56177 6.28640122 17.3263 21.49629082 33.3779 40.99047482 33.5963 132.07284 1.2119 264.18356 0.1387 396.27102 0.2146 10.09638-0.5821 20.80251 1.1486 30.50925-0.907 14.91841-6.1906 28.43314-18.8709 31.57859-35.2667 0.11288-143.11195 0.0226-286.31 0.0516-429.4547-5.85142-16.19374-19.35885-30.4674-36.60791-33.81848-2.14743-0.22947-4.31215-0.20837-6.4677-0.14285zM97.272275 593.8968c17.193555 0.44644 34.497565-0.6536 51.588765 1.75977 5.46534 5.38378 2.18232 13.95144 3.48522 20.6441 0.30391 28.0139 1.53524 56.27544-1.31081 84.13248-3.33 5.94455-11.54189 2.74028-16.92404 3.97018-29.26161 0.45356-58.770975 1.68478-87.878338-1.20257-5.932256-3.34253-2.73049-11.53903-3.960263-16.92204-0.45574-29.25904-1.679227-58.76512 1.198599-87.87041 3.325068-5.95374 11.5233-2.69657 16.896671-4.01939 12.29604-0.42155 24.602036-0.45212 36.904196-0.49212zm152.855735 0c17.19355 0.44644 34.49756-0.6536 51.58875 1.75977 5.46434 5.38405 2.1828 13.95126 3.48522 20.6441 0.30391 28.0139 1.53525 56.27544-1.31081 84.13248-3.33006 5.94455-11.5419 2.7403-16.92403 3.97018-29.26162 0.45356-58.77098 1.68478-87.87834-1.20257-5.93082-3.34298-2.73116-11.53915-3.96028-16.92204-0.45846-29.25631-1.67385-58.75535 1.19465-87.86049 3.31705-5.96652 11.52774-2.70656 16.90262-4.02931 12.29538-0.42156 24.60072-0.45212 36.90222-0.49212zm152.85572 0c17.20128 0.45264 34.51487-0.6624 51.61256 1.7677 5.41388 5.4045 2.20292 13.93815 3.46246 20.63421 0.29842 28.0184 1.5392 56.28568-1.31383 84.14634-3.34635 5.92716-11.53861 2.7296-16.92207 3.95757-29.25905 0.45511-58.76527 1.68367-87.87038-1.19987-5.94111-3.33402-2.73896-11.54122-3.96823-16.92403-0.45719-29.25672-1.67637-58.75801 1.19664-87.86248 3.31678-5.9644 11.52676-2.70429 16.90064-4.02732 12.29538-0.42156 24.60071-0.45212 36.90221-0.49212zM97.272275 746.75252c17.193555 0.44645 34.497565-0.6536 51.588765 1.75978 5.46534 5.38377 2.18232 13.95144 3.48522 20.6441 0.30391 28.01388 1.53524 56.27543-1.31081 84.13247-3.33075 5.94485-11.54343 2.73914-16.92603 3.96947-29.26096 0.45323-58.769584 1.68379-87.876348-1.20185-5.931836-3.34263-2.729601-11.53926-3.960263-16.92205-0.45574-29.25904-1.679227-58.76511 1.198599-87.8704 3.325068-5.95374 11.5233-2.69658 16.896671-4.01939 12.29604-0.42155 24.602036-0.45213 36.904196-0.49213zm152.855735 0c17.19355 0.44645 34.49756-0.6536 51.58875 1.75978 5.46434 5.38405 2.1828 13.95126 3.48522 20.6441 0.30391 28.01388 1.53525 56.27543-1.31081 84.13247-3.33084 5.94504-11.54327 2.73954-16.92604 3.96947-29.25839 0.45423-58.76389 1.68166-87.86839-1.19986-5.94217-3.3335-2.73724-11.54157-3.96822-16.92404-0.45846-29.25631-1.67385-58.75534 1.19465-87.86048 3.31705-5.96653 11.52774-2.70657 16.90262-4.02931 12.29538-0.42156 24.60072-0.45213 36.90222-0.49213zm152.85572 0c17.20128 0.45264 34.51487-0.66239 51.61256 1.76771 5.41388 5.4045 2.20292 13.93815 3.46246 20.6342 0.29842 28.0184 1.5392 56.28568-1.31383 84.14634-3.34875 5.93378-11.53227 2.71295-16.92206 3.9563-29.259 0.45697-58.76523 1.68226-87.87039-1.19859-5.94111-3.33402-2.73896-11.54122-3.96823-16.92404-0.45719-29.25672-1.67637-58.758 1.19664-87.86247 3.31678-5.9644 11.52676-2.70429 16.90064-4.02732 12.29538-0.42156 24.60071-0.45213 36.90221-0.49213zM97.272275 899.60825c17.192315 0.44719 34.494715-0.65282 51.584795 1.75977 5.47318 5.37848 2.18417 13.95237 3.48919 20.6441 0.30719 28.0113 1.52877 56.26515-1.30486 84.12258-3.32192 5.9583-11.54623 2.7497-16.92999 3.9801-29.25903 0.4558-58.765115 1.6792-87.870403-1.1986-5.941105-3.334-2.738955-11.54124-3.968198-16.92405-0.453371-29.26202-1.684029-58.77352 1.202567-87.88032 3.333596-5.94075 11.52021-2.69037 16.892703-4.01146 12.296067-0.42133 24.602002-0.45375 36.904196-0.49212zm152.855735 0c17.19355 0.44832 34.49779-0.65503 51.58875 1.76175 5.46502 5.38318 2.1825 13.95011 3.48522 20.64212 0.30601 28.01241 1.53115 56.26886-1.30684 84.12658-3.32378 5.9546-11.54496 2.7453-16.928 3.9761-29.25904 0.4558-58.76512 1.6792-87.8704-1.1986-5.94088-3.3343-2.73915-11.54118-3.96822-16.92405-0.45835-29.25622-1.67401-58.75578 1.19465-87.86048 3.31525-5.96723 11.52783-2.71042 16.90262-4.0313 12.29541-0.42134 24.60068-0.45375 36.90222-0.49212zm152.85572 0c17.2013 0.45298 34.51506-0.66367 51.61256 1.76969 5.41468 5.40339 2.20187 13.93687 3.46246 20.63221 0.30083 28.01544 1.53442 56.27728-1.30987 84.13645-3.33348 5.9431-11.54111 2.737-16.92403 3.9682-29.26202 0.4534-58.77352 1.6841-87.88033-1.2026-5.93062-3.3411-2.73141-11.53805-3.96028-16.92005-0.45834-29.25622-1.674-58.75578 1.19466-87.86048 3.31539-5.96708 11.52777-2.71053 16.90262-4.0313 12.2954-0.42134 24.60068-0.45375 36.90221-0.49212z"}]]]))
(def alignment
[:svg
@ -335,7 +340,8 @@
"M249.31931 0.2729147C233.62316 1.7758889 222.62226 14.513416 208.94096 20.9496 141.06479 62.757635 71.994899 102.68273 5.2643896 146.25265c-9.7979734 10.4033-4.5687011 29.56561 8.8007004 34.17351 12.602371 8.04566 25.427072 15.73406 38.196241 23.51001-16.393583 11.43727-35.696112 19.05582-49.56621 33.6899-6.4186198 11.00458-0.4334501 26.5756 11.481305 30.82486 13.579059 8.62581 27.394945 16.86772 41.047931 25.3742-17.515721 12.14489-38.521119 19.88761-52.9052744 36.02095-6.298844 11.38127 1.0109666 26.14004 12.5755334 30.6441 62.424935 38.1462 125.003964 76.09764 187.530074 114.11259 14.53681 8.27858 28.63502 17.84148 43.71502 24.95088 13.17393 1.68464 23.14993-9.20439 34.04692-14.67699 71.58125-43.33778 143.60086-86.05625 214.19758-130.91883 9.49113-9.60539 6.1847-27.54433-6.03996-33.12787-14.11946-9.67282-29.30676-17.94933-43.88457-27.02845 17.36604-12.04925 38.15336-19.76376 52.72217-35.43031 6.27533-10.83718 0.37459-25.88574-10.94786-30.63812-12.64571-8.24391-25.75341-15.67813-38.57306-23.67878 16.79008-12.01353 37.65856-19.10426 50.58013-35.74531 5.2897-11.22863-1.9905-25.21401-13.31213-29.17048C409.86254 93.382686 335.28425 46.732857 259.27743 2.5823033 256.12865 1.280434 252.75771 0.223126 249.31931 0.2729147Zm1.3053 46.8571573C313.33913 83.835209 375.0049 122.29506 437.20075 159.84319 375.19279 198.23022 312.75686 235.91566 250.34307 273.64308 187.19385 236.49004 124.96041 197.82053 62.217492 159.98888 124.84434 122.4421 186.8425 83.87445 249.5969 46.525654l0.86889 0.511014 0.15882 0.0934zM94.629652 229.7017c50.223898 29.67123 99.077888 61.87355 150.303188 89.69799 13.64279 3.57416 24.52116-8.33034 35.65343-13.9659 42.07059-25.25662 83.75029-51.16086 125.90533-76.27153 10.24124 6.00256 20.31329 12.28529 30.33114 18.65229C374.95355 286.39178 312.5991 324.1862 249.98869 361.54947 187.08463 324.52193 125.12805 285.92699 62.794348 247.95237 72.965778 241.50478 83.1967 235.14981 93.601944 229.08547l0.864516 0.51838 0.163192 0.0979zm2.787804 89.69405c49.442164 29.10198 97.453674 60.74038 147.690604 88.3533 12.94756 2.70685 23.3524-7.87321 33.97413-13.36043 41.48097-25.20828 82.86065-50.57982 124.46803-75.58351 11.31406 6.87422 22.63641 13.72784 33.89073 20.69984-62.4284 37.67462-124.3127 76.28654-187.15694 113.28604-63.24792-36.623-125.22726-75.38783-187.72198-113.27422 11.224656-6.99285 22.435195-14.01125 33.823781-20.73528l0.866115 0.5157 0.16553 0.0986z"}]])
(def eye
[:svg#svg2
(html
[:svg#svg2
{:viewBox "0 0 500.00001 500.00001"
:height "500"
:width "500"}
@ -346,10 +352,10 @@
:x "0"
:transform
"matrix(0.48875855,0,0,0.48875855,266.5973,18.208584)"
:xlink:href "#symbol16714"}]
:xlink-href "#symbol16714"}]
[:path
{:d
"m243.65331 99.318667c-58.6229 1.203563-114.03973 26.830353-160.892079 60.648143-28.49997 20.93851-55.37799 44.82049-76.4753523 73.34602-5.96967213 7.87671-9.1263425 19.36935-2.8651823 28.01679 7.6561096 11.91781 18.5354616 21.32952 28.0554606 31.70716 47.572626 47.70802 105.695173 87.87247 172.265653 102.78296 50.37592 11.18535 103.88207 2.66407 150.00762-19.77723 55.1695-26.12751 102.73219-66.57333 141.82927-113.09568 5.99918-7.82735 6.08168-19.58369-0.91195-26.86851-14.0138-18.42516-31.27793-34.09624-48.19789-49.78921-47.2005-42.03741-104.21038-76.31271-167.65131-85.3265-11.6536-1.665903-23.41722-1.779073-35.16424-1.643943zm6.30081 41.864093c57.41171 0.9746 110.71358 29.48214 154.57108 65.18432 16.31355 13.36149 32.05797 27.80961 46.09246 43.71274-41.51276 44.10281-91.00271 83.18559-149.74347 100.769-32.93289 10.06304-68.81615 10.11956-101.92939 0.00077C145.00432 334.95976 98.762382 300.18664 59.40607 260.79296 55.463984 256.74245 51.631034 252.58127 48.013231 248.23731 90.043349 200.80167 144.14033 162.3308 206.07567 146.51172c14.3888-3.44547 29.09394-5.37119 43.87845-5.32896zm-1.411 11.33955c-47.38595-0.36448-91.23918 39.17749-95.51261 86.43562-4.14621 34.84959 12.26204 71.0581 41.19098 90.94325 35.06461 25.31752 87.39078 22.8669 119.40775-6.47225 23.46907-20.17237 36.70443-51.78838 33.28858-82.69913-3.17419-37.84189-30.71923-71.96893-66.86684-83.44561-10.1361-3.3391-20.83286-5.00921-31.50786-4.76188zm2.29693 72.98817c14.47839-0.10852 26.34418 14.89925 23.06478 28.99518-2.28232 17.56617-26.20992 26.32542-39.42588 14.55868-13.36004-10.06302-11.41937-33.26335 3.67166-40.69749 3.86449-2.27868 8.31026-2.70365 12.68944-2.85637z"}]])
"m243.65331 99.318667c-58.6229 1.203563-114.03973 26.830353-160.892079 60.648143-28.49997 20.93851-55.37799 44.82049-76.4753523 73.34602-5.96967213 7.87671-9.1263425 19.36935-2.8651823 28.01679 7.6561096 11.91781 18.5354616 21.32952 28.0554606 31.70716 47.572626 47.70802 105.695173 87.87247 172.265653 102.78296 50.37592 11.18535 103.88207 2.66407 150.00762-19.77723 55.1695-26.12751 102.73219-66.57333 141.82927-113.09568 5.99918-7.82735 6.08168-19.58369-0.91195-26.86851-14.0138-18.42516-31.27793-34.09624-48.19789-49.78921-47.2005-42.03741-104.21038-76.31271-167.65131-85.3265-11.6536-1.665903-23.41722-1.779073-35.16424-1.643943zm6.30081 41.864093c57.41171 0.9746 110.71358 29.48214 154.57108 65.18432 16.31355 13.36149 32.05797 27.80961 46.09246 43.71274-41.51276 44.10281-91.00271 83.18559-149.74347 100.769-32.93289 10.06304-68.81615 10.11956-101.92939 0.00077C145.00432 334.95976 98.762382 300.18664 59.40607 260.79296 55.463984 256.74245 51.631034 252.58127 48.013231 248.23731 90.043349 200.80167 144.14033 162.3308 206.07567 146.51172c14.3888-3.44547 29.09394-5.37119 43.87845-5.32896zm-1.411 11.33955c-47.38595-0.36448-91.23918 39.17749-95.51261 86.43562-4.14621 34.84959 12.26204 71.0581 41.19098 90.94325 35.06461 25.31752 87.39078 22.8669 119.40775-6.47225 23.46907-20.17237 36.70443-51.78838 33.28858-82.69913-3.17419-37.84189-30.71923-71.96893-66.86684-83.44561-10.1361-3.3391-20.83286-5.00921-31.50786-4.76188zm2.29693 72.98817c14.47839-0.10852 26.34418 14.89925 23.06478 28.99518-2.28232 17.56617-26.20992 26.32542-39.42588 14.55868-13.36004-10.06302-11.41937-33.26335 3.67166-40.69749 3.86449-2.27868 8.31026-2.70365 12.68944-2.85637z"}]]))
(def lock
[:svg
@ -363,7 +369,7 @@
:x "0"
:transform
"matrix(0.48875855,0,0,0.48875855,266.5973,18.208584)"
:xlink:href "#symbol16714"}]
:xlink-href "#symbol16714"}]
[:path
{:d
"m110.60416 499.33847c-22.177988-4.50776-39.962038-21.75589-46.405198-45.0068-1.977315-7.13539-2.016513-9.26603-2.016513-109.60819 0-98.645 0.06949-102.60306 1.929042-109.87383 4.423652-17.29632 16.524827-32.63809 31.819424-40.34039l7.825735-3.94103 0.60407-49.32264c0.65846-53.763135 0.62011-53.373185 6.83197-69.481055 8.21794-21.30983 30.46536-44.049766 55.16981-56.391163 10.20624-5.09865 24.27131-9.8702562 37.2909-12.6510232 12.29719-2.62647101 13.38097-2.69147701 45.36838-2.72123901 36.82119-0.03426 43.33148 0.691327 63.09496 7.03207001 22.66364 7.2712112 38.73778 16.8847932 54.33879 32.4988162 11.05888 11.068109 16.97809 19.704479 22.16356 32.337529 5.96869 14.54116 6.15544 16.63373 6.17191 69.157365 0.008 26.25671 0.33839 48.1887 0.73367 48.73773 0.39527 0.54903 4.20746 2.70218 8.47153 4.7848 15.26633 7.45624 27.42013 22.8142 31.8923 40.30023 1.85931 7.2698 1.92905 11.22683 1.92905 109.45314 0 98.71665-0.0614 102.15316-1.95844 109.64831-2.76597 10.92815-7.22084 19.12549-14.77309 27.18364-7.14127 7.61966-13.97588 12.19324-24.11727 16.13877l-6.5947 2.56569-137.92851 0.14728c-75.86068 0.081-139.6893-0.21059-141.84138-0.64801zm275.44488-42.36785c3.21442-1.69982 4.97898-3.57704 7.00136-7.44832l2.70384-5.17574 0-101.43074 0-101.43073-2.51453-5.046c-1.49217-2.99441-3.82602-5.85656-5.74021-7.03959-3.20494-1.98076-4.09399-1.99357-138.31459-1.99357l-135.08891 0-3.61136 3.17081c-7.68721 6.74946-7.17152-1.28062-7.19562 112.04559-0.019 89.01071 0.15867 101.46341 1.49253 104.6558 1.77442 4.24679 4.66753 7.5951 8.75726 10.13513 2.8251 1.7546 7.88585 1.82277 135.57367 1.82629l132.63902 0.004 4.29754-2.2726zM210.87134 414.7115c0-0.81959 3.52158-15.55592 7.82573-32.74738 4.30416-17.19147 7.82573-31.96021 7.82573-32.81943 0-0.85925-2.41047-3.76528-5.3566-6.45788-9.7665-8.92602-14.60162-22.54037-12.4537-35.0661 1.56659-9.13564 4.34066-14.72784 10.7286-21.62759 23.40741-25.28278 65.56256-12.69769 71.62135 21.382 2.17751 12.24808-2.24683 25.13545-11.97693 34.88693l-5.77232 5.785 8.32828 33.30344c4.58055 18.31689 8.11305 33.65168 7.84999 34.07733-0.26305 0.42563-18.0602 0.77387-39.54921 0.77387-34.34393 0-39.07092-0.18029-39.07092-1.49019zM354.66915 143.45686c0-49.238655-0.0768-50.006535-6.08212-60.826955-10.93104-19.69552-35.55506-34.687-65.08507-39.62477-14.60005-2.441306-62.54427-1.62974-74.64943 1.26361-30.35851 7.25623-52.8469 24.27954-61.66065 46.676-2.28452 5.80515-2.31336 6.34422-2.63922 49.320085-0.1812 23.89793-0.0718 44.47715 0.24301 45.73161l0.57244 2.28083 104.65052 0 104.65052 0 0-44.82041z"}]])

View file

@ -1,45 +1,80 @@
(ns uxbox.ui.users
(:require [rum.core :as rum]
(:require [sablono.core :as html :refer-macros [html]]
[cats.labs.lens :as l]
[rum.core :as rum]
[uxbox.router :as r]
[uxbox.state :as s]
[uxbox.util :as util]
;; [uxbox.users.queries :as q]
;; [uxbox.ui.mixins :as mx]
[uxbox.ui.icons :as icons]
[uxbox.ui.navigation :as nav]))
(rum/defc user-menu < rum/static
[open?]
[:ul.dropdown {:class (when-not open?
"hide")}
[:li
icons/page
[:span "Page settings"]]
[:li
icons/grid
[:span "Grid settings"]]
[:li
icons/eye
[:span "Preview"]]
[:li
icons/user
[:span "Your account"]]
[:li
icons/exit
[:span "Save & Exit"]]])
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Menu
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn menu-render
[own open?]
(html
[:ul.dropdown {:class (when-not open?
"hide")}
[:li
icons/page
[:span "Page settings"]]
[:li
icons/grid
[:span "Grid settings"]]
[:li
icons/eye
[:span "Preview"]]
[:li
icons/user
[:span "Your account"]]
[:li
icons/exit
[:span "Save & Exit"]]]))
(def user-menu
(util/component
{:render menu-render
:name "user-menu"
:mixins []}))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; User Widget
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; FIXME this is a temporal
(def current-user (atom {:user/fullname "Cirilla"
:user/avatar "http://lorempixel.com/50/50/"}))
(def menu-open? (atom false))
(rum/defcs user < (rum/local false :menu-open?)
(def ^:static user-state
(as-> (l/in [:user]) $
(l/focus-atom $ s/state)))
(defn user-render
[own]
(let [usr @current-user]
[:div.user-zone {:on-mouse-enter #(reset! menu-open? true)
:on-mouse-leave #(reset! menu-open? false)}
[:span (:user/fullname usr)]
[:img {:border "0"
:src (:user/avatar usr)}]
(user-menu @menu-open?)]))
(let [user (rum/react user-state)
local (:rum/local own)]
(html
[:div.user-zone {:on-mouse-enter #(swap! local assoc :open true)
:on-mouse-leave #(swap! local assoc :open false)}
[:span (:fullname user)]
[:img {:border "0"
:src (:avatar user)}]
(user-menu (:open @local))])))
(def user
(util/component
{:render user-render
:name "user"
:mixins [rum/reactive (rum/local {:open false})]}))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Register
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(rum/defc register-form < rum/static
[]
@ -100,6 +135,10 @@
[:a icons/logo]
(recover-password-form)]])
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Login
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(rum/defc login-form < rum/static
[]
[:div.login-content

View file

@ -21,7 +21,7 @@
cls (rum/build-class (conj mixins spec) name)
ctr (fn self
([] (self {}))
([&props]
([& props]
(let [state {:rum/props props}]
(rum/element cls state nil))))]
(with-meta ctr {:rum/class cls})))
@ -89,6 +89,28 @@
:should-update cursored-should-update
:wrap-render cursored-wrap-render})
(defn local
"Adds an atom to components state that can be used as local state.
Atom is stored under key `:rum/local`.
Component will be automatically re-rendered if atoms value changes"
([]
(local {} :rum/local))
([initial]
(local initial :rum/local))
([initial key]
{:transfer-state
(fn [old new]
(assoc new key (old key)))
:will-mount
(fn [state]
(let [local-state (atom initial)
component (:rum/react-component state)]
(add-watch local-state key
(fn [_ _ _ _]
(rum/request-render component)))
(assoc state key local-state)))
}))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Lenses Helpers
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;