Files
pezkuwi-subxt/substrate/.maintain/docs-index-tpl.ejs
T
2021-09-20 18:50:15 +08:00

56 lines
1.3 KiB
Plaintext

<%
const capFirst = s => (s && s[0].toUpperCase() + s.slice(1)) || "";
%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><%= capFirst(repo_name) %> Rustdocs</title>
<meta name="description" content="Nothing here." />
<meta name="robots" content="noindex">
<style>
body {
font-family: Helvetica, Arial, Sans Serif;
margin: 0;
}
.center-me {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.content {
display: block;
}
.content li {
font-size: 1em;
line-height: .4em;
padding: .8em 0;
}
</style>
</head>
<body>
<div class="center-me">
<div class="content">
<h1><%= capFirst(repo_name) %> Rustdocs</h1>
<section>
<ul>
<%_ deploy_refs.split(/\s+/).forEach(ref => { _%>
<li>
<a href="/<%= repo_name _%>/<%= ref _%>"><%- ref -%></a>
<%_ if (latest && latest.trim() !== '' && latest === ref) { _%>
(<a href="/<%= repo_name _%>/latest">latest</a>)
<%_ } _%>
</li>
<%_ }) _%>
</ul>
</section>
</div>
</div>
</body>
</html>