-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.hbt
146 lines (142 loc) · 7.98 KB
/
template.hbt
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Clarity Smart Contract Language Cheat Sheet">
<meta name="author" content="Kay Anar">
<title>(((CCS))) Clarity Cheat Sheet</title>
<link href="bootstrap.5.2.2.min.css" rel="stylesheet">
<link rel="apple-touch-icon" sizes="57x57" href="apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
<link rel="manifest" href="manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<style>
body {
padding-bottom: 4em;
}
</style>
</head>
<body>
<main class="container">
<div id="masonry" class="row">
{{#each this}}
<div class="col-12 col-sm-6 col-md-4 col-lg-3 p-3 bg-body rounded">
<div class="card">
<h5 class="card-header">{{name}}</h5>
<ul class="list-group list-group-flush">
{{#each entries}}
<button type="button" class="btn list-group-item list-group-item-action" data-bs-toggle="modal"
data-bs-target="#{{../id}}_{{id}}_modal">
<span class="font-monospace">{{name}}</span>{{#if byname}} <small
class="text-secondary">({{byname}})</small>{{/if}}
</button>
{{/each}}
</ul>
</div>
</div>
{{/each}}
</div>
{{#each this}}
{{#each entries}}
<div class="modal fade" id="{{../id}}_{{id}}_modal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-body">
<ul class="nav nav-tabs justify-content-end" id="{{../id}}_{{id}}_tabs" role="tablist">
<li class="nav-item flex-sm-fill">
<p class="nav-link disabled"><span class="font-monospace">{{name}}</span>{{#if byname}}
<small class="text-secondary">({{byname}})</small>{{/if}}
</p>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link active" id="{{../id}}_{{id}}_info_tab" data-bs-toggle="tab"
data-bs-target="#{{../id}}_{{id}}_info_pane" type="button" role="tab"
aria-controls="{{../id}}_{{id}}_info_pane" aria-selected="true">Information</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="{{../id}}_{{id}}_example_tab" data-bs-toggle="tab"
data-bs-target="#{{../id}}_{{id}}_example_pane" type="button" role="tab"
aria-controls="{{../id}}_{{id}}_example_pane"
aria-selected="false">Examples</button>
</li>
</ul>
<div class="tab-content" id="{{../id}}_{{id}}_tab_content">
<div class="tab-pane fade show active" id="{{../id}}_{{id}}_info_pane" role="tabpanel"
aria-labelledby="{{../id}}_{{id}}_info_tab" tabindex="0">
{{#if signature}}
<p class="pt-1"><strong>Signature :</strong></p>
<p class="font-monospace">{{{signature}}}</p>
{{/if}}
{{#if input}}
<p class="pt-1"><strong>Input :</strong></p>
<p class="font-monospace">{{{input}}}</p>
{{/if}}
{{#if output}}
<p class="pt-1"><strong>Output :</strong></p>
<p class="font-monospace">{{{output}}}</p>
{{/if}}
{{#if description}}
<p class="pt-1"><strong>Description :</strong></p>
<p class="lead">{{{description}}}</p>
{{/if}}
</div>
<div class="tab-pane fade" id="{{../id}}_{{id}}_example_pane" role="tabpanel"
aria-labelledby="{{../id}}_{{id}}_example_tab" tabindex="0">
<div class="bg-secondary bg-gradient mt-3 p-3 pb-1 text-dark bg-opacity-10">
<p class="font-monospace overflow-auto text-primary">
{{#each examples}}
{{#if command}}<span class="text-muted">> </span>{{command}}<br />{{/if}}
{{#if comment}}<span class="text-muted">;; {{comment}}<br /></span>{{/if}}
{{#if error}}<span class="text-danger fw-light">error{{else}}{{#if output}}<span class="text-success fw-light">{{output}}</span>{{/if}}{{/if}}
<br />
{{/each}}
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{{/each}}
{{/each}}
<div class="fixed-bottom text-bg-light border-top border-secondary border-2 border-opacity-10 p-1">
<span class="font-monospace text-secondary">(((CCS))) Clarity Cheat Sheet for Stacks 2.1. Based on <a href="https://book.clarity-lang.org">Clarity of Mind</a> & <a href="https://docs.stacks.co/docs/write-smart-contracts/clarity-language/">Stacks Docs</a>. © Copyright 2022 <a href="//CompanyLX.com">CompanyLX</a>. All rights reserved.</span>
</div>
</main>
<script src="bootstrap.5.2.2.min.js"></script>
<script src="masonry.4.2.2.min.js"></script>
<script>
(function () {
var msnry = new Masonry("#masonry", {
percentPosition: true
});
const collapseElements = document.querySelectorAll(".collapse");
collapseElements.forEach(function (elementObj) {
[
"hidden.bs.collapse",
"shown.bs.collapse",
].forEach(function (eventName) {
elementObj.addEventListener(eventName, (event) => {
msnry.layout();
});
});
});
})();
</script>
</body>
</html>