mirror of
https://github.com/penpot/penpot.git
synced 2025-05-25 06:36:12 +02:00
♻️ Icons and Styles build refactor.
This commit is contained in:
parent
83e33ed00b
commit
ecde4493e0
459 changed files with 5343 additions and 5631 deletions
25
frontend/src/uxbox/builtins/icons.clj
Normal file
25
frontend/src/uxbox/builtins/icons.clj
Normal file
|
@ -0,0 +1,25 @@
|
|||
;; This Source Code Form is subject to the terms of the Mozilla Public
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) 2015-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
;; Copyright (c) 2015-2017 Juan de la Cruz <delacruzgarciajuan@gmail.com>
|
||||
|
||||
(ns uxbox.builtins.icons
|
||||
(:require [rumext.alpha]))
|
||||
|
||||
(defmacro inline-icon
|
||||
[id]
|
||||
(let [href (str "#icon-" (name id))]
|
||||
`(rumext.alpha/html
|
||||
[:svg {:width 500 :height 500}
|
||||
[:use {:xlinkHref ~href}]])))
|
||||
|
||||
|
||||
(defmacro icon-xref
|
||||
[id]
|
||||
(let [href (str "#icon-" (name id))]
|
||||
`(rumext.alpha/html
|
||||
[:svg {:width 500 :height 500}
|
||||
[:use {:xlinkHref ~href}]])))
|
||||
|
File diff suppressed because one or more lines are too long
|
@ -12,7 +12,7 @@
|
|||
(:require
|
||||
[lentes.core :as l]
|
||||
[rumext.alpha :as mf]
|
||||
[uxbox.builtins.icons :as i]
|
||||
[uxbox.builtins.icons :as i :include-macros true]
|
||||
[uxbox.config :as cfg]
|
||||
[uxbox.main.data.history :as udh]
|
||||
[uxbox.main.data.undo :as udu]
|
||||
|
@ -102,7 +102,8 @@
|
|||
{:alt (tr "workspace.header.rect")
|
||||
:class (when (= selected-drawtool :rect) "selected")
|
||||
:on-click (partial select-drawtool :rect)}
|
||||
i/box]
|
||||
i/box
|
||||
]
|
||||
[:li.tooltip.tooltip-bottom
|
||||
{:alt (tr "workspace.header.circle")
|
||||
:class (when (= selected-drawtool :circle) "selected")
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
:dragging (:dragging? dprops))
|
||||
:on-click navigate-fn
|
||||
:on-double-click on-double-click}
|
||||
[:div.page-icon i/page]
|
||||
[:div.page-icon i/file-html]
|
||||
(if (:edition @local)
|
||||
[:*
|
||||
[:input.element-name {:type "text"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
{:alt (tr "viewer.sitemap")
|
||||
:class (when sitemap? "selected")
|
||||
:on-click toggle-sitemap}
|
||||
i/project-tree]
|
||||
i/tree]
|
||||
[:li.tooltip.tooltip-right
|
||||
{:alt (tr "viewer.interactions")
|
||||
:class (when interactions? "selected")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue