Current section
Files
Jump to
Current section
Files
lib/ex_teal/templates/index.html.eex
<!DOCTYPE html>
<html lang=en class="font-sans bg-gray-lightest antialiased">
<head>
<meta charset=utf-8>
<meta http-equiv=X-UA-Compatible content="IE=edge">
<meta name=viewport content="width=device-width,initial-scale=1">
<meta name="csrf-token" content="<%= @csrf_token %>">
<link rel=icon href=<%= @config.path %>/favicon.ico>
<title><%= @title %></title>
<style>
:root{
<%= @colors %>
}
</style>
<%= if @assets.compiled_assets do %>
<%= for style <- @assets.styles do %>
<link href="<%= @config.path %><%= style %>" rel="stylesheet" type="text/css">
<% end %>
<% else %>
<link href="http://localhost:8080/teal/js/main.js" rel="preload" as="script"></head>
<% end %>
<%= for style <- @plugin_styles do %>
<link href="<%= @config.path %>/plugins/<%= style.plugin_uri %>/<%= style.path %>" rel="stylesheet" type="text/css">
<% end %>
</head>
<body class="font-normal text-black leading-normal">
<noscript>
<strong>
We're sorry but assets doesn't work properly without JavaScript enabled. Please enable it to continue.
</strong>
</noscript>
<div id="app"></div>
<script type="text/javascript">
window.config = <%= Jason.encode!(@config) %>;
window.config.currentUser = <%= Jason.encode!(@user) %>;
window.config.dropdown = <%= Jason.encode!(@dropdown) %>;
</script>
<%= if @assets.compiled_assets do %>
<%= for asset <- @assets.scripts do %>
<script src="<%= @config.path %><%= asset %>"></script>
<% end %>
<% else %>
<script src="http://localhost:8080/teal/js/runtime.js" type="text/javascript"></script>
<script src="http://localhost:8080/teal/js/polyfill.js" type="text/javascript"></script>
<script src="http://localhost:8080/teal/js/vendors.js" type="text/javascript"></script>
<script src="http://localhost:8080/teal/js/main.js" type="text/javascript"></script>
<% end %>
<!-- Build ExTeal Instance -->
<script>
window.ExTeal = new CreateExTeal(config)
</script>
<%= for script <- @plugin_scripts do %>
<script src="<%= @config.path %>/plugins/<%= script.plugin_uri %>/<%= script.path %>" type="text/javascript"></script>
<% end %>
<!-- Start ExTeal -->
<script>
ExTeal.beamMeUp();
</script>
</body>
</html>