82 lines
3.3 KiB
HTML
82 lines
3.3 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+Condensed:wght@400;500;600;700;800;900&family=Fugaz+One&family=Inconsolata&family=Inter&display=swap" rel="stylesheet">
|
|
|
|
<link href="https://fonts.googleapis.com/css2?family=Fira+Code&family=Josefin+Sans:ital,wght@0,400;1,700&display=swap" rel="stylesheet">
|
|
</head>
|
|
<body class="bg-c-bg text-c-text">
|
|
|
|
<div
|
|
class="max-w-[70rem] mx-auto py-28 grid grid-cols-2 gap-4"
|
|
>
|
|
<div>
|
|
<h1 class="font-display font-bold italic text-[6rem] leading-tight">
|
|
Typed
|
|
<br>
|
|
Hypertext
|
|
<br>
|
|
Processor
|
|
</h1>
|
|
<p class="font-display text-3xl pt-4">
|
|
Syntax, stdlib and types for PHP
|
|
</p>
|
|
</div>
|
|
|
|
<div>
|
|
<div
|
|
class="bg-[var(--code-theme-bg-color)] p-8 rounded-lg"
|
|
>
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg>
|
|
<br>
|
|
<pre
|
|
class="rounded-md bg-c-bg language-misti"
|
|
style="padding: 0 !important;"
|
|
><span class="token keyword">use</span> <span class="token class-name">Globals</span>::<span class="token class-name">POST</span>
|
|
<span class="token keyword">use</span> <span class="token class-name">JSON</span>
|
|
|
|
<span class="token keyword">val</span> person_id = <span class="token class-name">POST</span>::get(<span class="token string">"person_id"</span>) ?: <span class="token keyword">die</span>
|
|
|
|
<span class="token keyword">match</span> <span class="token class-name">Person</span>::find_by_id(person_id) {
|
|
<span class="token class-name">Ok</span>(person) => {
|
|
<span class="token class-name">JSON</span>::encode(person)
|
|
}
|
|
<span class="token class-name">Err</span>(e) => {
|
|
<span class="token class-name">JSON</span>::encode(Obj {<span class="token string">"error"</span>: e})
|
|
}
|
|
}
|
|
</pre>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div
|
|
class="max-w-[70rem] mx-auto text-center"
|
|
>
|
|
<a
|
|
class="inline-block font-display text-2xl border-4 border-[#F5A9B8] py-3 px-8 mx-6 rounded"
|
|
href="/learn/"
|
|
>
|
|
Learn
|
|
</a>
|
|
|
|
<a
|
|
class="inline-block font-display text-2xl border-4 border-[#5BCEFA] py-3 px-8 mx-6 rounded"
|
|
href="/install/"
|
|
>
|
|
Install
|
|
</a>
|
|
</div>
|
|
</body>
|
|
</html> |