Use egon templating for the index page

This commit is contained in:
Ken-Håvard Lieng 2016-03-16 23:23:16 +01:00
parent e5057cf227
commit 240392dcae
6 changed files with 41 additions and 44 deletions

20
server/index.egon Normal file
View file

@ -0,0 +1,20 @@
<%! data *indexData, cssPath, jsPath string %>
<%% import "encoding/json" %%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Dispatch</title>
<link href="/<%== cssPath %>" rel="stylesheet">
</head>
<body>
<div id="root"></div>
<script id="env" type="application/json"><% json.NewEncoder(w).Encode(data) %></script>
<script src="/<%== jsPath %>"></script>
</body>
</html>