♻️ Don't embedd svg sprite into the index.html file.

This commit is contained in:
Andrey Antukh 2020-03-30 23:57:53 +02:00
parent d974ed750a
commit 9759cb9fd9
4 changed files with 30 additions and 8 deletions

View file

@ -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 <niwi@niwi.nz>
;; Copyright (c) 2015-2017 Juan de la Cruz <delacruzgarciajuan@gmail.com>
;; 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}]])))

View file

@ -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 <delacruzgarciajuan@gmail.com>
;; Copyright (c) 2015-2020 Andrey Antukh <niwi@niwi.nz>
;; Copyright (c) 2020 UXBOX Labs SL
(ns uxbox.main.ui
(:require