forked from vintasoftware/python-api-checklist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
254 lines (219 loc) · 7.37 KB
/
index.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
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<title>Python API Checklist</title>
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-44982831-5', 'auto');
ga('send', 'pageview');
</script>
<!-- End Google Analytics -->
<link rel="shortcut icon" href="/assets/favicon.png" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/markdown-it/8.3.1/markdown-it.min.js"></script>
<script src="/markdown-it-task-lists.min.js"></script>
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">
<style type="text/css">
body {
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
background-color: #eee;
padding-top: 0px;
font-size: 18px;
line-height: 1.42857143;
color: #333;
}
.special-bg {
background: inherit;
padding: 0;
margin: 0;
}
.special-bg .task-list li {
padding: 0;
margin: 2rem 0
}
input[type=checkbox], input[type=radio] {
margin: 4px 0 0;
margin-top: 1px\9;
line-height: normal;
}
.checklist {
display: inline-block;
}
.checklist .description p {
font-size: 20px;
margin-bottom: 1rem;
}
.checklist p {
margin-bottom: 0;
}
.checklist .task-list {
list-style-type: none;
padding-left: 0;
}
.checklist .task-list .task-list-item-checkbox {
height: 18px;
margin-right: 0.3em;
}
.logo {
margin: 6rem 0 3rem;
text-align: center;
}
.logo img {
max-width: 380px;
width: 100%;
}
footer {
margin-top: 4rem;
background: #646464;
}
footer a {
color: #ff9800;
}
footer p {
text-align: center;
color: #eeeeee;
margin-top: 1rem;
font-size: 14px;
}
h1, h2, p {
color: #356f9f;
}
li {
list-style: none;
margin-bottom: 2rem;
}
p {
font-size: 25px;
}
a {
color: #ca6509;
text-decoration: underline;
cursor: pointer;
}
h1 {
font-size: 40px;
text-align: center;
margin-bottom: 5rem;
}
h2 {
font-size: 30px;
border-bottom: 4px solid #356f9f;
padding-bottom: 0;
margin-bottom: 3rem;
margin-top: 4rem;
}
ul li ul li {
background-color: rgba(0, 0, 0, 0.10);
padding: 2rem 3rem;
margin-top: 2rem;
}
.task-list-item {
background-color: inherit;
}
</style>
</head>
<body>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5XC946B"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<a href="https://github.com/vintasoftware/python-api-checklist/"><img style="position: absolute; top: 0; right: 0; border: 0; z-index: 1000;" src="https://camo.githubusercontent.com/652c5b9acfaddf3a9c326fa6bde407b87f7be0f4/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6f72616e67655f6666373630302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png"></a>
<main role="main">
<div class="container">
<section class="checklist col-xs-12">
<div class="logo">
<img src="/assets/python-api-checklist.png" alt="Python API checklist">
</div>
<div class="row">
<div class="description col-md-offset-1 col-md-10">
<h1>
Checklist for<br/>
Python libraries APIs
</h1>
<p>Useful checklist for build good Python libraries APIs. Based on "<a href="https://www.youtube.com/watch?v=4mkFfce46zE" target="_blank">How to make a good library API</a>" PyCon 2017 talk.</p>
<p>Checkboxes below are saved in localStorage. You can mark what you have and come back later.</p>
</div>
</div>
<div class="row">
<div class="checklist-content col-md-offset-1 col-md-10">
<article class="markdown-body entry-content" itemprop="text">
<div>Loading...</div>
</article>
</div>
</div>
</section>
</div>
</main>
<footer>
<div class="container">
<div class="col-xs-12">
<p>© 2017 - Maintained by <a href="https://www.vinta.com.br" target="_blank">Vinta Sofware</a> - Feel free to <a href="https://github.com/vintasoftware/python-api-checklist" target="_blank">contribute</a></p>
</div>
</div>
</footer>
</body>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
crossorigin="anonymous"></script>
<script type="text/javascript">
$(function() {
function bindCheckBehavior() {
var checkedsDict = localStorage.getItem('checkedsDict');
if (!checkedsDict || checkedsDict === '') {
checkedsDict = {};
localStorage.setItem('checkedsDict', JSON.stringify(checkedsDict));
} else {
checkedsDict = JSON.parse(checkedsDict);
}
var $items = $('.entry-content input.task-list-item-checkbox');
$items.each(function (i, item) {
var itemKey = $(item).parent().text();
if (checkedsDict[itemKey]) {
$(item).attr('checked', 'checked');
}
});
$('.entry-content input').on('change', function() {
var $items = $('.entry-content input');
var updatedCheckedsDict = {};
$items.each(function (i, item) {
var itemKey = $(item).parent().text();
if (this.checked) {
updatedCheckedsDict[itemKey] = true;
}
});
localStorage.setItem('checkedsDict', JSON.stringify(updatedCheckedsDict));
});
}
var md = window.markdownit({
'breaks': true,
'linkify': false
}).use(window.markdownitTaskLists, {enabled: true});
function renderChecklist() {
$.ajax('/checklist.md', {
method: 'GET',
dataType: 'text'
}).done(function (text) {
$('article.entry-content').html(md.render(text));
bindCheckBehavior();
$('li ul.task-list').parent().addClass('special-bg')
}).fail(function () {
console.error("Failed to GET checklist.md, trying again in 1 sec...")
setTimeout(renderChecklist, 1000)
});
}
renderChecklist();
});
</script>
</html>