mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 07:38:01 +08:00
DEV: Moves SVG sprite to <discourse-assets>
element (#17148)
Similar to #17145 This commit moves the SVG sprite container to the <discourse-assets> element. There is 0 visual or functional changes in this PR. It just tidies up the element view in devTools.
This commit is contained in:
parent
9d86a2b567
commit
93b8811f08
|
@ -28,6 +28,7 @@
|
|||
<discourse-assets-json>
|
||||
<bootstrap-content key="preloaded">
|
||||
</discourse-assets-json>
|
||||
<discourse-assets-icons></discourse-assets-icons>
|
||||
</discourse-assets>
|
||||
|
||||
<bootstrap-content key="body">
|
||||
|
|
|
@ -7,7 +7,8 @@ export function loadSprites(spritePath, spriteName) {
|
|||
if (!spriteContainer) {
|
||||
spriteContainer = document.createElement("div");
|
||||
spriteContainer.id = SVG_CONTAINER_ID;
|
||||
document.body.appendChild(spriteContainer);
|
||||
const spriteWrapper = document.querySelector("discourse-assets-icons");
|
||||
spriteWrapper?.appendChild(spriteContainer);
|
||||
}
|
||||
|
||||
let sprites = spriteContainer.querySelector(`.${spriteName}`);
|
||||
|
|
|
@ -78,6 +78,7 @@
|
|||
<discourse-assets-json>
|
||||
<div class="hidden" id="data-preloaded" data-preloaded="<%= preloaded_json %>"></div>
|
||||
</discourse-assets-json>
|
||||
<discourse-assets-icons></discourse-assets-icons>
|
||||
</discourse-assets>
|
||||
|
||||
<%- if allow_plugins? %>
|
||||
|
|
Loading…
Reference in New Issue
Block a user