<html>
  <head>
    <meta charset="UTF-8">
    <link rel="icon" type="image/png" href="https://github.com/mikebowler/jirametrics/blob/main/favicon.png?raw=true" />
    <script src="https://cdn.jsdelivr.net/npm/moment@2.29.1/moment.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/chartjs-adapter-moment@^1"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/chartjs-plugin-annotation/3.1.0/chartjs-plugin-annotation.min.js"></script>
    <script type="text/javascript">
<%= javascript %>
    </script>
    <style>
<%= css %>
    </style>
    <script type="text/javascript">
      Chart.defaults.color = getComputedStyle(document.documentElement).getPropertyValue('--default-text-color');
    </script>
  </head>
  <body>
    <noscript>
      <div style="padding: 1em; background: red; color: white; font-size: 2em;">
        Javascript is currently disabled and that means that almost all of the charts in this report won't render. If you've loaded this from a folder on SharePoint then save it locally and load it again.
      </div>
    </noscript>
    <%= "\n" + @sections.collect { |text, type| text if type == :header }.compact.join("\n\n") %>
    <%= "\n" + @sections.collect { |text, type| text if type == :body }.compact.join("\n\n") %>
  </body>
</html>
