mirror of
https://github.com/penpot/penpot.git
synced 2025-06-07 11:21:37 +02:00
♻️ Don't embedd svg sprite into the index.html file.
This commit is contained in:
parent
d974ed750a
commit
9759cb9fd9
4 changed files with 30 additions and 8 deletions
|
@ -4,11 +4,12 @@
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta http-equiv="x-ua-compatible" content="ie=edge" />
|
<meta http-equiv="x-ua-compatible" content="ie=edge" />
|
||||||
<title>UXBOX - The Open-Source prototyping tool</title>
|
<title>UXBOX - The Open-Source prototyping tool</title>
|
||||||
<link href="css/main.css?ts={{& ts}}" rel="stylesheet" type="text/css" />
|
<link href="/css/main.css?ts={{& ts}}" rel="stylesheet" type="text/css" />
|
||||||
<link rel="icon" href="/images/favicon.png" />
|
<link rel="icon" href="/images/favicon.png" />
|
||||||
|
<!-- <link rel="preload" as="image" type="image/svg+xml" -->
|
||||||
|
<!-- href="/images/svg-sprite/symbol/svg/sprite.symbol.svg" /> -->
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{{& ic }}
|
|
||||||
<section id="app" tabindex="1"></section>
|
<section id="app" tabindex="1"></section>
|
||||||
<section id="loader"></section>
|
<section id="loader"></section>
|
||||||
<section id="modal"></section>
|
<section id="modal"></section>
|
||||||
|
@ -16,7 +17,8 @@
|
||||||
window.uxboxConfig = JSON.parse({{& config }});
|
window.uxboxConfig = JSON.parse({{& config }});
|
||||||
window.uxboxTranslations = JSON.parse({{& translations }});
|
window.uxboxTranslations = JSON.parse({{& translations }});
|
||||||
</script>
|
</script>
|
||||||
<script src="js/main.js?ts={{& ts}}"></script>
|
<script src="/js/shared.js?ts={{& ts}}"></script>
|
||||||
|
<script src="/js/main.js?ts={{& ts}}"></script>
|
||||||
<script>uxbox.main.init()</script>
|
<script>uxbox.main.init()</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
22
frontend/resources/templates/view.mustache
Normal file
22
frontend/resources/templates/view.mustache
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="x-ua-compatible" content="ie=edge" />
|
||||||
|
<title>UXBOX View</title>
|
||||||
|
<link href="/css/view.css?ts={{& ts}}" rel="stylesheet" type="text/css" />
|
||||||
|
<link rel="icon" href="/images/favicon.png" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<section id="app" tabindex="1"></section>
|
||||||
|
<section id="loader"></section>
|
||||||
|
<section id="modal"></section>
|
||||||
|
<script>
|
||||||
|
window.uxboxConfig = JSON.parse({{& config }});
|
||||||
|
window.uxboxTranslations = JSON.parse({{& translations }});
|
||||||
|
</script>
|
||||||
|
<script src="/js/shared.js?ts={{& ts}}"></script>
|
||||||
|
<script src="/js/view.js?ts={{& ts}}"></script>
|
||||||
|
<script>uxbox.view.init()</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -2,15 +2,14 @@
|
||||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
;; 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/.
|
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
;;
|
;;
|
||||||
;; Copyright (c) 2015-2017 Andrey Antukh <niwi@niwi.nz>
|
;; Copyright (c) 2020 UXBOX Labs SL
|
||||||
;; Copyright (c) 2015-2017 Juan de la Cruz <delacruzgarciajuan@gmail.com>
|
|
||||||
|
|
||||||
(ns uxbox.builtins.icons
|
(ns uxbox.builtins.icons
|
||||||
(:require [rumext.alpha]))
|
(:require [rumext.alpha]))
|
||||||
|
|
||||||
(defmacro icon-xref
|
(defmacro icon-xref
|
||||||
[id]
|
[id]
|
||||||
(let [href (str "#icon-" (name id))]
|
(let [href (str "/images/svg-sprite/symbol/svg/sprite.symbol.svg#icon-" (name id))]
|
||||||
`(rumext.alpha/html
|
`(rumext.alpha/html
|
||||||
[:svg {:width 500 :height 500}
|
[:svg {:width 500 :height 500}
|
||||||
[:use {:xlinkHref ~href}]])))
|
[:use {:xlinkHref ~href}]])))
|
||||||
|
|
|
@ -5,8 +5,7 @@
|
||||||
;; This Source Code Form is "Incompatible With Secondary Licenses", as
|
;; This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||||
;; defined by the Mozilla Public License, v. 2.0.
|
;; defined by the Mozilla Public License, v. 2.0.
|
||||||
;;
|
;;
|
||||||
;; Copyright (c) 2015-2017 Juan de la Cruz <delacruzgarciajuan@gmail.com>
|
;; Copyright (c) 2020 UXBOX Labs SL
|
||||||
;; Copyright (c) 2015-2020 Andrey Antukh <niwi@niwi.nz>
|
|
||||||
|
|
||||||
(ns uxbox.main.ui
|
(ns uxbox.main.ui
|
||||||
(:require
|
(:require
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue