0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-06 14:50:20 -05:00

Add new pages.

This commit is contained in:
Andrey Antukh 2015-12-15 11:22:04 +02:00
parent ebec1eb268
commit 1cee1f4b01
4 changed files with 66 additions and 7 deletions

View file

@ -60,6 +60,9 @@
["auth/register" :auth/register]
["auth/recover" :auth/recover-password]
["dashboard" :main/dashboard]
["elements" :main/elements]
["icons" :main/icons]
["colors" :main/colors]
["workspace/" [[project-route :main/project]
[page-route :main/page]]]]])

View file

@ -7,9 +7,10 @@
[uxbox.util :as util]
[uxbox.data.projects :as dp]
[uxbox.ui.lightbox :as ui.lb]
[uxbox.ui.users :as ui.u]
[uxbox.ui.users :as ui.users]
[uxbox.ui.elements :as ui.elements]
[uxbox.ui.workspace :as ui.w]
[uxbox.ui.dashboard :as ui.d]))
[uxbox.ui.dashboard :as ui.dashboard]))
(def ^:static state
(as-> (l/select-keys [:location :location-params]) $
@ -22,11 +23,11 @@
[:section
(ui.lb/lightbox)
(case location
:auth/login (ui.u/login)
;; :auth/register (u/register)
;; :auth/recover (u/recover-password)
:main/dashboard (ui.d/dashboard)
;; :main/project (ui.w/workspace (:project-uuid location-params))
:auth/login (ui.users/login)
:main/dashboard (ui.dashboard/dashboard)
:main/elements (ui.elements/elements)
:main/icons (ui.elements/icons)
:main/colors (ui.elements/colors)
:main/page (let [projectid (:project-uuid location-params)
pageid (:page-uuid location-params)]
(rs/emit! (dp/initialize-workspace projectid pageid))

View file

@ -0,0 +1,52 @@
(ns uxbox.ui.elements
(:require [sablono.core :as html :refer-macros [html]]
[rum.core :as rum]
[uxbox.ui.header :as ui.header]
[uxbox.util :as util]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Elements
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn elements-render
[own]
(html
[:main.dashboard-main
(ui.header/header)
[:p "FOOO"]]))
(def elements
(util/component
{:render elements-render
:name "elements"
:mixins [rum/static]}))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Icons
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn icons-render
[own]
(html
[:p "hello icons"]))
(def icons
(util/component
{:render icons-render
:name "icons"
:mixins [rum/static]}))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Colors
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn colors-render
[own]
(html
[:p "hello colors"]))
(def colors
(util/component
{:render colors-render
:name "colors"
:mixins [rum/static]}))

View file

@ -13,6 +13,9 @@
[:header#main-bar.main-bar
[:div.main-logo
(nav/link "/" i/logo)]
[:ul
[:li "foo"]
[:li "bar"]]
(ui.u/user)]))
(def ^:static header