#!/bin/bash

source scripts/env

(cat <<EOF
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0">
<title>Ancient Oak</title>
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400italic,700,700italic|Source+Code+Pro:400,400italic&amp;subset=latin-ext,latin">
<style>
body {
font-family: "Source Sans Pro", sans-serif;
font-size: 18px;
max-width: 600px;
margin: 0 auto;
padding: 0 16px;
}
pre, code {
font-family: "Source Code Pro", Consolas, monospace;
}
</style>
</head>
<body>

<p><em>This page has Ancient Oak lib included. Feel free to open your browser developer tools and try it out! :-)</em></p>

EOF
  echo "<ul>"
  echo "<li><a href=\"https://github.com/szywon/ancient-oak\">Project page</a></li>"
  for f in "$STANDALONE" "$MINIFIED" "$MAP"; do
    echo "<li><a href=\"$f\">$f</a></li>"
  done
  echo "</ul>"
  marked README.md
  echo "<script src=\"$STANDALONE\"></script>"
  echo "</body></html>"
) > "$DOC_INDEX"
