<!-- prettier-disable -->
[%#
   # This helper should be included in files which will be served as
   # top-level responses (i.e. documents on their own); this includes
   # UI/login.html, UI/logout.html, UI/main.html and various UI/setup/ pages

   # Most LedgerSMB responses are handled by the 'xhr' Dojo module, which
   # *only* needs opening and closing BODY tags to be there (for now).
   #
   # Note: To keep some comments as is and control pre or post white space
   #       chomping, we make use of '+' or '-' beside the introducers in
   #       comments like this one.
-%]
<!DOCTYPE html>
<html lang="[% USER.language %]">
<head>
    <title>[% title %]</title>
    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
    [%-#
        # source comment only!
        #
        # don't specify a title on the stylesheets: we want them to be
        # *persistent*
        # http://www.w3.org/TR/html401/present/styles.html#h-14.3.1
    -%]
    <%= htmlWebpackPlugin.tags.headTags %>
    <link href="js/dojo/resources/dojo.css" rel="stylesheet">
    <link href="js/css/[% dojo_theme %].css" rel="stylesheet">
    <link href="js/css/quasar.css" rel="stylesheet">
    [%- IF stylesheet %]
    <link href="js/css/[% stylesheet %]" rel="stylesheet">
    [%- END %]
    [%- FOREACH s = include_stylesheet %]
    <link href="js/css/[% s %]" rel="stylesheet">
    [%- END %]
    <script>
        var pw_expiration = {
            "warn": [% warn_expire || 0 %],
            "years": [% pw_expires.years || 0 %],
            "months": [% pw_expires.months || 0 %],
            "weeks": [% pw_expires.weeks || 0 %],
            "days": [% pw_expires.days || 0 %]
        };
        var dojoConfig = {
            async: 1,
            parseOnLoad: false,
            locale: "[% USER.language %]",
            packages: [{"name":"lsmb","location":"../lsmb"}],
            mode: "<%= htmlWebpackPlugin.options.mode %>"
        };
        var lsmbConfig = {
            company: "[% company %]",
            language: "[% USER.language %]",
            login: "[% login %]",
            [% IF USER.dateformat %]
            "dateformat": '[% USER.dateformat %]',
            [% END %]
            version: "[% version %]"
        };
    </script>
    <style>
/* Undo Quasar messing with elements they have no business messing with */
h1, h2, h3, h4, h5, h6, p, blockquote, pre, ul, ol, dl, figure, hr, fieldset, legend {
  margin: revert;
  font-weight: revert;
  line-height: revert;
}
h1 { font-size: 2em; }
h2 { font-size: 1.5em; }
h3 { font-size: 1.17em; }
h4 { font-size: 1em; }
h5 { font-size: 0.83em; }
h6 { font-size: 0.67em; }
    </style>
    <meta name="robots" content="noindex,nofollow" />
</head>
[% content %]
</html>
