-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
46 lines (43 loc) · 1.4 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
<!DOCTYPE html>
<html>
<head>
<title>Can I Email?</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.3/handlebars.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-sheetrock/1.0.0/dist/sheetrock.min.js"></script>
</head>
<body>
<h1>CSS Support for <code>resolution</code></h1>
<table id="support">
<script id="support-template" type="text/x-handlebars-template">
<tr>
{{#each cells}}
<td {{{when this 'style="background: green"' 'style="background: red"'}}}>
{{@key}}
</td>
{{/each}}
</tr>
</script>
</ol>
<script>
$(document).ready(function() {
Handlebars.registerHelper('when', function(conditional, thenClause, elseClause) {
if (conditional) {
return thenClause;
} else {
return elseClause;
}
});
Handlebars.registerHelper('not', function(conditional) {
return !conditional;
});
var SupportTemplate = Handlebars.compile($('#support-template').html());
$('#support').sheetrock({
url: 'https://docs.google.com/spreadsheets/d/18zHVSZDzp5ZMXWGwohTIFVTZ3e1SMiicYvWBBmQbkzk/edit#gid=167645803',
query: "select * where A = 'resolution'",
rowTemplate: SupportTemplate
});
});
</script>
</body>
</html>