mirror of
https://github.com/zadam/trilium.git
synced 2026-01-12 01:24:29 +01:00
chore(client): get icons to load
This commit is contained in:
parent
047b5a85d2
commit
b745fb476e
@ -28,7 +28,8 @@
|
||||
<script>
|
||||
async function bootstrap() {
|
||||
await setupGlob();
|
||||
await loadStylesheets();
|
||||
loadStylesheets();
|
||||
loadIcons();
|
||||
await loadScripts();
|
||||
}
|
||||
|
||||
@ -43,7 +44,7 @@
|
||||
};
|
||||
}
|
||||
|
||||
async function loadStylesheets() {
|
||||
function loadStylesheets() {
|
||||
const { assetPath, themeCssUrl, themeUseNextAsBase } = window.glob;
|
||||
const cssToLoad = [];
|
||||
cssToLoad.push(`${assetPath}/stylesheets/theme-light.css`);
|
||||
@ -67,6 +68,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
function loadIcons() {
|
||||
const styleEl = document.createElement("style");
|
||||
styleEl.innerText = window.glob.iconPackCss;
|
||||
document.head.appendChild(styleEl);
|
||||
}
|
||||
|
||||
async function loadScripts() {
|
||||
const assetPath = glob.assetPath;
|
||||
await import(`./${assetPath}/runtime.js`);
|
||||
|
||||
@ -1,10 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<style id="trilium-icon-packs">
|
||||
<%- iconPackCss %>
|
||||
</style>
|
||||
</head>
|
||||
<body
|
||||
class="desktop heading-style-<%= headingStyle %> layout-<%= layoutOrientation %> platform-<%= platform %> <%= isElectron ? 'electron' : '' %> <%= hasNativeTitleBar ? 'native-titlebar' : '' %> <%= hasBackgroundEffects ? 'background-effects' : '' %>"
|
||||
lang="<%= currentLocale.id %>" dir="<%= currentLocale.rtl ? 'rtl' : 'ltr' %>"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user