-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
visualization.html
181 lines (154 loc) · 5.79 KB
/
visualization.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
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<script async custom-element="amp-ad" src="https://cdn.ampproject.org/v0/amp-ad-0.1.js"></script>
<script async custom-element="amp-auto-ads" src="https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js"></script>
<script data-ad-client="ca-pub-1011007638245293" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-1011007638245293",
enable_page_level_ads: true
});
</script>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>Git Playground</title>
<script src="js/vendor/jquery.js"></script>
<script src="js/vendor/jquery-ui.min.js"></script>
<script data-main="js/main" src="js/vendor/require.min.js"></script>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/1140.css">
<link rel="stylesheet" href="css/explaingit.css">
<link rel="stylesheet" href="css/jquery-ui.min.css">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-D0C92NC6MW"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-D0C92NC6MW');
</script>
<!-- Facebook OpenGraph tags -->
<meta property="og:title" content="Git Playground" />
<meta property="og:description" content="Testar, estudar e aprender os commados do git.">
<meta property="og:type" content="website" />
<meta property="og:url" content="https://mariojp.com.br/visualization.html" />
<link rel="canonical" href="https://mariojp.com.br/" />
<meta property="og:image" content="https://mariojp.com.br/img/avatar-icon.png" />
<!-- Twitter summary cards -->
<meta name="twitter:card" content="Testar, estudar e aprender os commados do git " />
<meta name="twitter:site" content="https://mariojp.com.br/visualization.html" />
<meta name="twitter:creator" content="@mariojp" />
<meta name="twitter:title" content="Git Playground " />
<meta name="twitter:description" content="Testar, estudar e aprender os commados do git">
<meta name="twitter:image" content="https://mariojp.com.br/img/avatar-icon.png" />
</head>
<body>
<amp-auto-ads type="adsense"
data-ad-client="ca-pub-1011007638245293">
</amp-auto-ads>
<amp-ad width="100vw" height="320"
type="adsense"
data-ad-client="ca-pub-1011007638245293"
data-ad-slot="7137855543"
data-auto-format="rspv"
data-full-width="">
<div overflow=""></div>
</amp-ad>
<div id="ExplainGitInicial-Container" style="display:none">
<div class="playground-container">
<pre id='last-command' style='display: none;'></pre>
</div>
</div>
<svg version="1.1" baseProfile="full"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:ev="http://www.w3.org/2001/xml-events"
width="0" height="0">
<marker id="triangle" refX="5" refY="5" markerUnits="strokeWidth" fill="rgba(100,100,100,0.8)"
markerWidth="4" markerHeight="3" orient="auto" viewBox="0 0 10 10">
<path d="M 0 0 L 10 5 L 0 10 z"/>
</marker>
<marker id="faded-triangle" refX="5" refY="5" markerUnits="strokeWidth" fill="#DDD"
markerWidth="4" markerHeight="3" orient="auto" viewBox="0 0 10 10">
<path d="M 0 0 L 10 5 L 0 10 z"/>
</marker>
<marker id="brown-triangle" refX="5" refY="5" markerUnits="strokeWidth" fill="rgba(100,100,100,0.8)"
markerWidth="4" markerHeight="3" orient="auto" viewBox="0 0 10 10">
<path d="M 0 0 L 10 5 L 0 10 z"/>
</marker>
</svg>
<script type="text/javascript">
require(['explaingit', 'demos'], function (explainGit, demos) {
function ready(fn) {
if (document.readyState != 'loading'){
fn();
} else {
document.addEventListener('DOMContentLoaded', fn);
}
}
function clearSavedState () {
if (window.localStorage) {
window.localStorage.removeItem('git-viz-snapshot')
}
}
function cleanupDom () {
$('.svg-container.remote-container').remove()
}
function clean () {
clearSavedState()
cleanupDom()
}
function cleanHash (hash) {
return hash.replace(/^#/, '')
}
function findDemo (demos, name) {
return demos.filter(function (d) {
return d.key === name
})[0]
}
function copyDemo (demo) {
// make a deep copy
return JSON.parse(JSON.stringify(demo))
}
var lastDemo = findDemo(demos, cleanHash(window.location.hash)) || demos[0]
ready(function () {
window.onhashchange = function () {
var demo = findDemo(demos, cleanHash(window.location.hash)) || lastDemo
if (demo) {
lastDemo = demo
document.getElementById('last-command').textContent = ""
clean()
open()
}
}
open()
})
function open() {
explainGit.reset();
var savedState = null
if (window.localStorage) {
savedState = JSON.parse(window.localStorage.getItem('git-viz-snapshot') || 'null')
}
var initial = Object.assign(copyDemo(lastDemo), {
name: 'Inicial',
height: '100%',
initialMessage: lastDemo.message,
undoHistory: savedState,
hvSavedState: savedState && savedState.stack[savedState.pointer].hv,
ovSavedState: savedState && savedState.stack[savedState.pointer].ov
})
explainGit.open(initial);
}
window.resetVis = function () {
if (confirm('Isso vai reinicializar sua visualização. Você tem certeza?')) {
clean()
open()
}
}
window.pres = function () {
document.getElementById('last-command').style.display = 'block'
}
});
</script>
</body>
</html>