Reference implementation for HTTP/Minima;
1<!DOCTYPE html>
2<html lang="{{.Lang}}">
3<head>
4 <meta charset="utf-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1">
6 <title>{{.Title}}</title>
7 <!-- OpenGraph -->
8 <meta property="og:title" content="{{.Title}}">
9 <meta property="og:type" content="article">
10 {{if .URL}}<meta property="og:url" content="{{.URL}}">{{end}}
11 {{if .Description}}<meta property="og:description" content="{{.Description}}">{{end}}
12 <meta property="og:locale" content="{{.Lang}}">
13 {{if .Author}}<meta name="author" content="{{.Author}}">{{end}}
14 <style>
15 :root {
16 --text: #1a1a1a;
17 --bg: #fefefe;
18 --link: #0066cc;
19 --code-bg: #f4f4f4;
20 }
21 @media (prefers-color-scheme: dark) {
22 :root {
23 --text: #e0e0e0;
24 --bg: #1a1a1a;
25 --link: #6db3f2;
26 --code-bg: #2d2d2d;
27 }
28 }
29 * { box-sizing: border-box; }
30 body {
31 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
32 font-size: 18px;
33 line-height: 1.6;
34 color: var(--text);
35 background: var(--bg);
36 max-width: 65ch;
37 margin: 0 auto;
38 padding: 2rem 1rem;
39 }
40 h1, h2, h3, h4, h5, h6 { line-height: 1.2; margin-top: 1.5em; }
41 a { color: var(--link); }
42 pre, code {
43 font-family: "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
44 font-size: 0.9em;
45 background: var(--code-bg);
46 }
47 pre { padding: 1rem; overflow-x: auto; }
48 code { padding: 0.1em 0.3em; border-radius: 3px; }
49 pre code { padding: 0; background: none; }
50 blockquote {
51 border-left: 3px solid var(--link);
52 margin-left: 0;
53 padding-left: 1rem;
54 font-style: italic;
55 }
56 img { max-width: 100%; height: auto; }
57 hr { border: none; border-top: 1px solid var(--text); opacity: 0.2; }
58 table { border-collapse: collapse; width: 100%; }
59 th, td { border: 1px solid var(--text); padding: 0.5rem; text-align: left; }
60 th { opacity: 0.8; }
61 </style>
62</head>
63<body>
64{{.Content}}
65</body>
66</html>