-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.html
115 lines (105 loc) · 3.46 KB
/
template.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!DOCTYPE html>
<html>
<head>
<title>{{.Title}}</title>
<meta name="go-import" content="chitin.io/chitin git https://github.com/chitin-io/chitin">
<style>
body {
background-color: #ffffea;
display: flex;
justify-content: center;
}
body>div {
flex: 1;
}
nav.sidebar>ul {
display: block;
padding: 0;
margin: 0;
margin-top: 40px;
background-color: #f9cc9d;
}
nav.sidebar>ul>li {
display: block;
padding: 0;
margin: 0;
}
nav.sidebar>ul>li>a {
display: block;
text-decoration: none;
overflow-x: hidden;
border-top: 1px solid black;
padding: 0.2em;
}
nav.sidebar>ul>li>a>p {
font-size: 80%;
margin: 0.2em;
}
nav.sidebar>ul>li:first-child>a {
border-top: none;
}
nav.sidebar>ul>li>a:hover {
background-color: #fddd9b;
}
table {
border-spacing: 0;
}
table td, table th {
padding: 0.2em;
}
table th {
border-bottom: 1px solid #aaaaaa;
border-spacing: 0;
}
table td:not(:first-child), table th:not(:first-child) {
border-left: 1px solid #aaaaaa;
border-spacing: 0;
}
{{if (eq .Path "/spec/v1/")}}
/* section numbering */
body {counter-reset: h1}
h1 {counter-reset: h2}
h2 {counter-reset: h3}
h3 {counter-reset: h4}
h4 {counter-reset: h5}
h5 {counter-reset: h6}
h1:not(:first-of-type):before {counter-increment: h1; content: counter(h1) ". "}
h2:before {counter-increment: h2; content: counter(h1) "." counter(h2) ". "}
h3:before {counter-increment: h3; content: counter(h1) "." counter(h2) "." counter(h3) ". "}
h4:before {counter-increment: h4; content: counter(h1) "." counter(h2) "." counter(h3) "." counter(h4) ". "}
h5:before {counter-increment: h5; content: counter(h1) "." counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) ". "}
h6:before {counter-increment: h6; content: counter(h1) "." counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) ". "}
#content nav ul {
counter-reset: toc;
list-style-type: none;
}
#content nav li::before {
counter-increment: toc;
content: counters(toc,".") ". ";
}
{{end}}
</style>
</head>
<body>
<div id="content" style="flex-shrink: 0; flex-basis: 80%; max-width: 30em; margin: 1em;">
<div style="position:relative"><div style="color:#d0d0d0; opacity:0.3; font-family:'Helvetica',sans-serif; font-size:300px; font-weight:700; position:absolute; top: 500px; left:-250px; -webkit-transform:rotate(-45deg); z-index:-1;">DRAFT</div></div>
{{.H1}}
{{.TOC}}
{{.Content}}
</div>
<div style="flex-grow: 1; flex-basis: 0; display: flex;">
<div style="flex: 1; order: 1; flex-grow: 0; flex-basis: 100px; display: flex;">
<nav class="sidebar" style="flex: 1;">
<ul style="">
<li style=""><a href="/">Introduction<p>and motivation</p></a></li>
<li><a href="/spec/v1/">Specification<p>details about the wire format</p></a></li>
<li><a href="/code/">Code<p>to actually get things done</p></a></li>
</ul>
</nav>
</div>
</div>
<div style="order: -1; flex-basis: 0; flex-grow: 1; display: flex; flex-direction: column;">
<img src="/chitin.svg" alt="" style="flex:1; align-self:flex-end; margin:20px; max-height:10em;">
</div>
</body>
</html>