mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 10:02:59 +08:00
refactor(share): don't load boxicons if not needed
This commit is contained in:
parent
d68d0b5dd8
commit
18e6981e9a
@ -1,9 +1,14 @@
|
||||
import "normalize.css";
|
||||
import "@triliumnext/ckeditor5/content.css";
|
||||
import "boxicons/css/boxicons.min.css";
|
||||
import "@triliumnext/share-theme/styles/index.css";
|
||||
import "@triliumnext/share-theme/scripts/index.js";
|
||||
|
||||
async function loadIcons() {
|
||||
if (document.getElementById("menu")) {
|
||||
await import("boxicons/css/boxicons.min.css");
|
||||
}
|
||||
}
|
||||
|
||||
async function ensureJQuery() {
|
||||
const $ = (await import("jquery")).default;
|
||||
(window as any).$ = $;
|
||||
@ -38,6 +43,7 @@ document.addEventListener(
|
||||
"DOMContentLoaded",
|
||||
() => {
|
||||
formatCodeBlocks();
|
||||
loadIcons();
|
||||
|
||||
const toggleMenuButton = document.getElementById("toggleMenuButton");
|
||||
const layout = document.getElementById("layout");
|
||||
|
2
apps/client/src/types-assets.d.ts
vendored
2
apps/client/src/types-assets.d.ts
vendored
@ -7,3 +7,5 @@ declare module "@triliumnext/ckeditor5/emoji_definitions/en.json?url" {
|
||||
var path: string;
|
||||
export default path;
|
||||
}
|
||||
|
||||
declare module "boxicons/css/boxicons.min.css" { }
|
||||
|
Loading…
x
Reference in New Issue
Block a user