-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlayout
94 lines (84 loc) · 2.52 KB
/
layout
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
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Cheatsheets by Aashish Koirala- {{range $s := .}}{{$s}}, {{end}}">
<meta name="author" content="Aashish Koirala">
<title>Cheatsheets</title>
<link rel="icon" href="favicon.png">
<style type="text/css">
body {
background-color: darkslategrey;
color: grey;
font-family: Arial, Helvetica, sans-serif;
margin: 0;
}
.flex-container {
display: flex;
background-color: darkslategrey;
}
.flex-left {
flex: 1;
border: 0;
border-right: 1px solid grey;
margin-right: 5px;
padding: 5px;
padding-right: 10px;
background-color: darkslategrey;
}
.flex-right {
flex: 6;
border: 0;
padding: 5px;
background-color: darkslategrey;
}
pre {
font-family: 'Fira Code', 'Consolas', 'Courier New', monospace, serif;
font-size: 12pt;
}
a.section-link, a.section-link:link, a.section-link:visited {
border: 1px solid grey;
padding: 10px;
margin: 10px;
color: grey;
text-decoration: none;
}
a.section-link:hover, a.section-link:active {
background: gray;
color: black;
}
div.section {
display: none;
}
</style>
<script type="text/javascript">
function load(sectionName) {
document.querySelectorAll('.section').forEach(function (s) {
s.style.display = 'none';
});
document.querySelector('.section#' + sectionName).style.display = 'inline';
}
</script>
</head>
<body onload="load('{{ index . 0 }}')">
<div class="flex-container">
<div class="flex-left">
<h2> Cheatsheets</h2><br/>
{{ range $sec := . }}
<a class="section-link" id="{{ $sec }}-link" href="#" onclick="load('{{ $sec }}')">{{ $sec }}</a><br/><br/><br/>
{{ end }}
</div>
<div class="flex-right">
{{ range $sec := . }}
<div id="{{ $sec }}" class="section">
<h1>{{ $sec }}</h1>
<pre>
[[ {{ $sec }} ]]
</pre>
</div>
{{ end }}
</div>
</div>
</body>
</html>