<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <link rel="shortcut icon" href="favicon.ico">
    <meta name="mobile-web-app-capable" content="yes">
	  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
	  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, viewport-fit=cover" />
    <link rel="manifest" crossorigin="use-credentials" href="manifest.webmanifest">
    <title>Trilium Notes</title>
    <script src="<%= appPath %>/runtime.js" crossorigin type="module"></script>
</head>
<body
  id="trilium-app"
  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' %>"
>
<noscript><%= t("javascript-required") %></noscript>

<script>
    // hide body to reduce flickering on the startup. This is done through JS and not CSS to not hide <noscript>
    document.getElementsByTagName("body")[0].style.display = "none";
</script>

<div class="dropdown-menu dropdown-menu-sm" id="context-menu-container" style="display: none"></div>

<%- include("./partials/windowGlobal.ejs", locals) %>

<!-- Required for match the PWA's top bar color with the theme -->
<!-- This works even when the user directly changes --root-background in CSS -->
<div id="background-color-tracker" style="position: absolute; visibility: hidden; color: var(--root-background); transition: color 1ms;"></div>

<!-- Required for correct loading of scripts in Electron -->
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>

<link href="<%= assetPath %>/stylesheets/ckeditor-theme.css" rel="stylesheet">
<link href="api/fonts" rel="stylesheet">
<link href="<%= assetPath %>/stylesheets/theme-light.css" rel="stylesheet">

<% if (themeCssUrl) { %>
<link href="<%= themeCssUrl %>" rel="stylesheet">
<% } %>

<% if (themeUseNextAsBase === "next") { %>
  <link href="<%= assetPath %>/stylesheets/theme-next.css" rel="stylesheet">
<% } else if (themeUseNextAsBase === "next-dark") { %>
  <link href="<%= assetPath %>/stylesheets/theme-next-dark.css" rel="stylesheet">
<% } else if (themeUseNextAsBase === "next-light") { %>
  <link href="<%= assetPath %>/stylesheets/theme-next-light.css" rel="stylesheet">
<% } %>

<link href="<%= assetPath %>/stylesheets/style.css" rel="stylesheet">
<link href="<%= assetPath %>/src/boxicons.css" rel="stylesheet">

<script src="<%= appPath %>/desktop.js" crossorigin type="module"></script>

</body>
</html>
