refactor: move script into head
parent
a89cf7d7a4
commit
73f7906357
|
@ -15,45 +15,47 @@ def baseHtmlArray (title : String) (site : Array Html) : HtmlM Html := do
|
||||||
pure
|
pure
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
|
<title>{title}</title>
|
||||||
|
|
||||||
|
<meta charset="UTF-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||||
|
|
||||||
<link rel="stylesheet" href={s!"{←getRoot}style.css"}/>
|
<link rel="stylesheet" href={s!"{←getRoot}style.css"}/>
|
||||||
<link rel="stylesheet" href={s!"{←getRoot}pygments.css"}/>
|
<link rel="stylesheet" href={s!"{←getRoot}pygments.css"}/>
|
||||||
<link rel="shortcut icon" href={s!"{←getRoot}favicon.ico"}/>
|
<link rel="shortcut icon" href={s!"{←getRoot}favicon.ico"}/>
|
||||||
<link rel="prefetch" href={s!"{←getRoot}searchable-data.json"}/>
|
<link rel="prefetch" href={s!"{←getRoot}searchable-data.json"}/>
|
||||||
<title>{title}</title>
|
|
||||||
<meta charset="UTF-8"/>
|
<script defer="true" src={s!"{←getRoot}site-root.js"}></script>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
<script defer="true" src={s!"{←getRoot}nav.js"}></script>
|
||||||
|
<script defer="true" src={s!"{←getRoot}search.js"}></script>
|
||||||
|
<script defer="true" src={s!"{←getRoot}mathjax-config.js"}></script>
|
||||||
|
<script defer="true" src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
|
||||||
|
<script defer="true" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<input id="nav_toggle" type="checkbox"/>
|
<input id="nav_toggle" type="checkbox"/>
|
||||||
|
|
||||||
<header>
|
<header>
|
||||||
<h1><label «for»="nav_toggle"></label>Documentation</h1>
|
<h1><label «for»="nav_toggle"></label>Documentation</h1>
|
||||||
<p «class»="header_filename break_within">{title}</p>
|
<p «class»="header_filename break_within">{title}</p>
|
||||||
-- TODO: Replace this form with our own search
|
-- TODO: Replace this form with our own search
|
||||||
<form action="https://google.com/search" method="get" id="search_form">
|
<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="hidden" name="sitesearch" value="https://leanprover-community.github.io/mathlib_docs"/>
|
||||||
<input type="text" name="q" autocomplete="off"/>
|
<input type="text" name="q" autocomplete="off"/>
|
||||||
<button>Google site search</button>
|
<button>Google site search</button>
|
||||||
</form>
|
</form>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
[site]
|
[site]
|
||||||
|
|
||||||
{←navbar}
|
{←navbar}
|
||||||
|
|
||||||
-- Lean in JS in HTML in Lean...very meta
|
|
||||||
<script src={s!"{←getRoot}site-root.js"}></script>
|
|
||||||
|
|
||||||
-- TODO Add more js stuff
|
|
||||||
<script src={s!"{←getRoot}nav.js"}></script>
|
|
||||||
<script src={s!"{←getRoot}search.js"}></script>
|
|
||||||
-- mathjax
|
|
||||||
<script src={s!"{←getRoot}mathjax-config.js"}></script>
|
|
||||||
<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>
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue