73 lines
2.4 KiB
HTML
73 lines
2.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>THP: Typed Hypertext Processor</title>
|
|
|
|
<!-- Tailwind output -->
|
|
<link href="/css/out.css" rel="stylesheet">
|
|
|
|
<link rel="stylesheet" href="/css/xcode-colors.css">
|
|
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link
|
|
href="https://fonts.googleapis.com/css2?family=Fira+Sans:wght@400;500;600;700;800;900&family=Fira+Code&display=swap"
|
|
rel="stylesheet">
|
|
</head>
|
|
|
|
<body class="bg-c-bg text-c-text">
|
|
<nav class="fixed w-screen top-0 h-12 border-b border-[rgba(150,150,150,0.25)] bg-c-nav-bg backdrop-blur-md z-20">
|
|
<div class="container mx-auto h-full w-full flex items-center">
|
|
<a href="/" class="font-display font-bold text-2xl">
|
|
<span class="text-[#F5A9B8]">t</span><span>h</span><span class="text-[#5BCEFA]">p</span>
|
|
</a>
|
|
</div>
|
|
</nav>
|
|
|
|
<div class="grid grid-cols-[14rem_auto_12rem] container mx-auto">
|
|
<div class="pt-12 h-screen sticky top-0">
|
|
<nav class="py-4 pr-2 overflow-x-scroll"
|
|
style="height: calc(100vh - 3rem);"
|
|
>
|
|
{{pages}}
|
|
</nav>
|
|
</div>
|
|
|
|
<main class="py-[3.5rem] pl-12 pr-4 markdown min-w-0">
|
|
{{markdown}}
|
|
</main>
|
|
|
|
<div class="pt-12 max-h-screen overflow-x-scroll sticky top-0">
|
|
<nav class="rounded-md mt-10">
|
|
<h2 class="font-display font-medium pb-2 text-c-text-2">On this page</h2>
|
|
|
|
{{sidebar}}
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="/js/highlighter.js"></script>
|
|
<script>
|
|
// Add an editor to all code samples
|
|
|
|
const code_elements = document.querySelectorAll(".language-thp");
|
|
|
|
for (const el of [...code_elements]) {
|
|
const pre_parent = el.parentElement;
|
|
const new_div = document.createElement("div");
|
|
const code = el.innerText;
|
|
|
|
el.parentElement.classList.add("language-thp");
|
|
pre_parent.removeChild(el);
|
|
pre_parent.appendChild(new_div);
|
|
|
|
CodeJar(new_div, thp_highlighter, {
|
|
tab: " "
|
|
}).updateCode(code);
|
|
}
|
|
</script>
|
|
</body>
|
|
</html> |