2021-12-15 08:24:49 +00:00
|
|
|
/-
|
|
|
|
Copyright (c) 2021 Henrik Böving. All rights reserved.
|
|
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
|
|
Authors: Henrik Böving
|
|
|
|
-/
|
|
|
|
import DocGen4.ToHtmlFormat
|
|
|
|
import DocGen4.Output.Navbar
|
|
|
|
|
|
|
|
namespace DocGen4
|
|
|
|
namespace Output
|
|
|
|
|
|
|
|
open scoped DocGen4.Jsx
|
|
|
|
|
2022-01-07 16:43:49 +00:00
|
|
|
def baseHtmlArray (title : String) (site : Array Html) : HtmlM Html := do
|
2022-02-12 14:09:13 +00:00
|
|
|
pure
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<link rel="stylesheet" href={s!"{←getRoot}style.css"}/>
|
|
|
|
<link rel="stylesheet" href={s!"{←getRoot}pygments.css"}/>
|
|
|
|
<link rel="shortcut icon" href={s!"{←getRoot}favicon.ico"}/>
|
2022-02-20 15:05:35 +00:00
|
|
|
<link rel="prefetch" href={s!"{←getRoot}searchable_data.json"}/>
|
2022-02-12 14:09:13 +00:00
|
|
|
<title>{title}</title>
|
|
|
|
<meta charset="UTF-8"/>
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<input id="nav_toggle" type="checkbox"/>
|
|
|
|
|
|
|
|
<header>
|
|
|
|
<h1><label «for»="nav_toggle"></label>Documentation</h1>
|
|
|
|
<p «class»="header_filename break_within">{title}</p>
|
|
|
|
-- TODO: Replace this form with our own search
|
|
|
|
<form action="https://google.com/search" method="get" id="search_form">
|
|
|
|
<input type="hidden" name="sitesearch" value="https://leanprover-community.github.io/mathlib_docs"/>
|
|
|
|
<input type="text" name="q" autocomplete="off"/>
|
|
|
|
<button>Google site search</button>
|
|
|
|
</form>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
[site]
|
|
|
|
|
|
|
|
{←navbar}
|
|
|
|
|
|
|
|
-- Lean in JS in HTML in Lean...very meta
|
|
|
|
<script>
|
|
|
|
siteRoot = "{←getRoot}";
|
|
|
|
</script>
|
|
|
|
|
|
|
|
-- TODO Add more js stuff
|
|
|
|
<script src={s!"{←getRoot}nav.js"}></script>
|
2022-02-13 14:03:49 +00:00
|
|
|
<script src={s!"{←getRoot}search.js"}></script>
|
2022-02-17 19:10:48 +00:00
|
|
|
-- mathjax
|
2022-02-17 19:27:00 +00:00
|
|
|
<script src={s!"{←getRoot}mathjax-config.js"}></script>
|
2022-02-17 19:10:48 +00:00
|
|
|
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
2022-02-12 14:09:13 +00:00
|
|
|
</body>
|
|
|
|
</html>
|
2021-12-15 08:24:49 +00:00
|
|
|
|
2022-01-07 16:43:49 +00:00
|
|
|
|
|
|
|
def baseHtml (title : String) (site : Html) : HtmlM Html := baseHtmlArray title #[site]
|
|
|
|
|
2021-12-15 08:24:49 +00:00
|
|
|
end Output
|
|
|
|
end DocGen4
|