Skip to content

Commit

Permalink
Add a free playground.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wei Wang committed Mar 26, 2013
1 parent ed8f541 commit 171ff70
Showing 1 changed file with 42 additions and 2 deletions.
44 changes: 42 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,14 @@ <h4>Combine Branches</h4>
<a id="open-merge" class="openswitch" href="#">git merge</a>
<a id="open-rebase" class="openswitch" href="#">git rebase</a>
</div>
<div class="fourcol last">
<h4>Interacting with Remote Server</h4>
<div class="twocol">
<h4>Remote Server</h4>
<a id="open-fetch" class="openswitch" href="#">git fetch</a>
</div>
<div>
<h4>Free Play</h4>
<a id="open-freeplay" class="openswitch" href="#">Free Playground</a>
</div>
</div>
<div class="row">
<div id="ExplainGitCommit-Container" class="twelvecol concept-container">
Expand Down Expand Up @@ -172,6 +176,12 @@ <h4>Interacting with Remote Server</h4>
</p>
<div class="playground-container"></div>
</div>
<div id="ExplainGitFree-Container" class="twelvecol concept-container">
<p>
Do whatever you want in this free playground.
</p>
<div class="playground-container"></div>
</div>
</div>
</div>

Expand Down Expand Up @@ -443,5 +453,35 @@ <h4>Interacting with Remote Server</h4>
openSwitch.addEventListener('click', open, false);
});
</script>

<script type="text/javascript">
require(['explaingit'], function (explainGit) {
var openSwitch = document.getElementById('open-freeplay'),
open;

open = function () {
explainGit.reset();
this.classList.add('selected');

explainGit.open({
name: 'Free',
height: 500,
commitData: [
{id: 'e137e9b', tags: ['origin/master', 'master']}
],
originData: [
{id: 'e137e9b'},
{id: '7eb7654', parent: 'e137e9b'},
{id: '090e2b8', parent: '7eb7654'},
{id: 'ee5df4b', parent: '090e2b8', tags: ['master']}
],
initialMessage:
'Have fun.'
});
};

openSwitch.addEventListener('click', open, false);
});
</script>
</body>
</html>

0 comments on commit 171ff70

Please sign in to comment.