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