From 9759cb9fd9bee7fbabe3b5c1bdece94580fca996 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 30 Mar 2020 23:57:53 +0200 Subject: [PATCH] :recycle: Don't embedd svg sprite into the index.html file. --- frontend/resources/templates/index.mustache | 8 +++++--- frontend/resources/templates/view.mustache | 22 +++++++++++++++++++++ frontend/src/uxbox/builtins/icons.clj | 5 ++--- frontend/src/uxbox/main/ui.cljs | 3 +-- 4 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 frontend/resources/templates/view.mustache diff --git a/frontend/resources/templates/index.mustache b/frontend/resources/templates/index.mustache index 4d9ae3b00e..cbb80b00f3 100644 --- a/frontend/resources/templates/index.mustache +++ b/frontend/resources/templates/index.mustache @@ -4,11 +4,12 @@ UXBOX - The Open-Source prototyping tool - + + + - {{& ic }}
@@ -16,7 +17,8 @@ window.uxboxConfig = JSON.parse({{& config }}); window.uxboxTranslations = JSON.parse({{& translations }}); - + + diff --git a/frontend/resources/templates/view.mustache b/frontend/resources/templates/view.mustache new file mode 100644 index 0000000000..ee2c376526 --- /dev/null +++ b/frontend/resources/templates/view.mustache @@ -0,0 +1,22 @@ + + + + + + UXBOX View + + + + +
+
+ + + + + + + diff --git a/frontend/src/uxbox/builtins/icons.clj b/frontend/src/uxbox/builtins/icons.clj index 869cd50f51..179919fc89 100644 --- a/frontend/src/uxbox/builtins/icons.clj +++ b/frontend/src/uxbox/builtins/icons.clj @@ -2,15 +2,14 @@ ;; 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 -;; Copyright (c) 2015-2017 Juan de la Cruz +;; Copyright (c) 2020 UXBOX Labs SL (ns uxbox.builtins.icons (:require [rumext.alpha])) (defmacro icon-xref [id] - (let [href (str "#icon-" (name id))] + (let [href (str "/images/svg-sprite/symbol/svg/sprite.symbol.svg#icon-" (name id))] `(rumext.alpha/html [:svg {:width 500 :height 500} [:use {:xlinkHref ~href}]]))) diff --git a/frontend/src/uxbox/main/ui.cljs b/frontend/src/uxbox/main/ui.cljs index 38d44ccf9c..d9f95d47e7 100644 --- a/frontend/src/uxbox/main/ui.cljs +++ b/frontend/src/uxbox/main/ui.cljs @@ -5,8 +5,7 @@ ;; This Source Code Form is "Incompatible With Secondary Licenses", as ;; defined by the Mozilla Public License, v. 2.0. ;; -;; Copyright (c) 2015-2017 Juan de la Cruz -;; Copyright (c) 2015-2020 Andrey Antukh +;; Copyright (c) 2020 UXBOX Labs SL (ns uxbox.main.ui (:require