forked from khoinguyen/gist-embed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
102 lines (83 loc) · 3.48 KB
/
test.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
<!DOCTYPE html>
<html>
<head>
<title>gist-embed tests</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="Ultra powered gist embedding for your website" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="gist-embed.js"></script>
<style>
body, html{
margin: 0;
padding: 0;
background-color: #fff;
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-weight: 300;
color: #333;
}
p{
font-size: 18px;
margin: 0 0 5px 0;
}
code{
margin: 0 0 30px 0;
display: block;
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
}
</style>
<script>
$(function() {
var $afterPageLoadTest = $('#after-page-load-test');
var $code = $('<code data-gist-id="474f6d7839fccffc4b2a"/>');
var s = 6;
var interval;
$afterPageLoadTest.text(s);
interval = setInterval(function() {
s--;
if (s >= 0) {
$afterPageLoadTest.text(s);
} else {
$afterPageLoadTest.text('');
$code.appendTo($afterPageLoadTest).gist();
clearInterval(interval);
}
}, 1000);
});
</script>
</head>
<body>
<p>Loading a gist</p>
<code data-gist-id="5457595"></code>
<p>Loading a gist with all line numbers removed</p>
<code data-gist-id="5457605" data-gist-hide-line-numbers="true"></code>
<p>Loading a gist with footer removed</p>
<code data-gist-id="5457619" data-gist-hide-footer="true"></code>
<p>Loading a gist with both footer and line numbers removed</p>
<code data-gist-id="5457629" data-gist-hide-footer="true" data-gist-hide-line-numbers="true"></code>
<p>Loading a gist with multiple files</p>
<code data-gist-id="5457635"></code>
<p>Loading a single file from a gist (example-file2.html)</p>
<code data-gist-id="5457644" data-gist-file="example-file2.html"></code>
<p>Loading a single line number from a gist (line 2)</p>
<code data-gist-id="5457662" data-gist-line="2"></code>
<p>Loading a range of line numbers from a gist (line 2 through 4)</p>
<code data-gist-id="5457652" data-gist-line="2-4"></code>
<p>Loading a single line and a range of line numbers from a gist (line 1 and line 3 through 4)</p>
<code data-gist-id="5457665" data-gist-line="1,3-4"></code>
<p>Loading a list of line numbers from a gist (line 2, 3, 4)</p>
<code data-gist-id="5457668" data-gist-line="2,3,4"></code>
<p>Highlighting a list of line numbers from a gist (line 1, 3, 5)</p>
<code data-gist-id="7922593" data-gist-highlight-line="1,3,5"></code>
<p>Loading a private gist</p>
<code data-gist-id="a85770344febb8e30935"></code>
<p>Loading a gist without the loading text</p>
<code data-gist-id="f847e6866e13ed607f49" data-gist-show-loading="false"></code>
<p>Loading a gist after the page has loaded</p>
<code id="after-page-load-test"></code>
<p>Loading a code element without a gist id data attribute</p>
<code>
This is the content of a code element. It has no gist id data attribute, so it's not parsed.
</code>
</body>
</html>