Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html> <html lang='en'> <head> <meta charset='utf-8'> <title>Git Playback</title> <style type='text/css'>.container { margin-left: auto; margin-right: auto; width: 1000px; display:none; } .container div { width: 1000px; height: 800px; display:block; } body { background: #272822; } ul { list-style: none; } li { float: left; } pre { min-width: 480px; }</style> <link rel='stylesheet' href='http://yandex.st/highlightjs/6.2/styles/monokai.min.css' type='text/css'> </head> <body> <div id='playback'> <div class='container'>
- <div><ul>
- <li><pre><code>
- # git-playback
- git-playback is a bash script that creates a visual playback of git commits. Run it from your repository like this:
- sh git-playback file1 file2...
- git-playback automatically uses the branch you're currently on. Output will be written to playback.html.
- </code></pre></li>
- </ul></div>
- <div><ul>
- <li><pre><code>
- # git-playback
- git-playback is a bash script that creates a visual playback of git commits. Use it like this:
- git clone git://github.com/mmozuras/git-playback.git
- cd /repository/you/want/to/playback
- sh /path/to/git-playback/git-playback file1 file2
- open playback.html
- git-playback automatically uses the branch you're currently on. Output will be written to playback.html.
- </code></pre></li>
- </ul></div>
- <div><ul>
- <li><pre><code>
- # git-playback
- git-playback is a bash script that creates a visual playback of git commits. Use it like this:
- git clone git://github.com/mmozuras/git-playback.git
- cd /repository/you/want/to/playback
- sh /path/to/git-playback/git-playback file1 file2
- open playback.html
- git-playback automatically uses the branch you're currently on. Output will be written to playback.html.
- </code></pre></li>
- </ul></div>
- <div><ul>
- <li><pre><code>
- # git-playback
- git-playback is a bash script that creates a visual playback of git commits. Use it like this:
- git clone git://github.com/mmozuras/git-playback.git
- cd /repository/you/want/to/playback
- sh /path/to/git-playback/git-playback file1 file2
- open playback.html
- git-playback automatically uses the branch you're currently on. Output will be written to playback.html.
- </code></pre></li>
- </ul></div>
- <div><ul>
- <li><pre><code>
- # git-playback
- git-playback is a bash script that creates a visual playback of git commits. Use it like this:
- git clone git://github.com/mmozuras/git-playback.git
- cd /repository/you/want/to/playback
- sh /path/to/git-playback/git-playback file1 file2
- open playback.html
- git-playback automatically uses the branch you're currently on. Output will be written to playback.html.
- </code></pre></li>
- </ul></div>
- <div><ul>
- <li><pre><code>
- # git-playback
- git-playback is a bash script that creates a visual playback of git commits. Use it like this:
- git clone git://github.com/mmozuras/git-playback.git
- cd /repository/you/want/to/playback
- sh /path/to/git-playback/git-playback file1 file2
- open playback.html
- git-playback automatically uses the branch you're currently on. Output will be written to playback.html.
- </code></pre></li>
- </ul></div>
- <div><ul>
- <li><pre><code>
- # git-playback
- git-playback is a bash script that creates a visual playback of git commits. Use it like this:
- git clone git://github.com/mmozuras/git-playback.git
- cd /repository/you/want/to/playback
- sh /path/to/git-playback/git-playback file1 file2
- open playback.html
- git-playback automatically uses the branch you're currently on. Output will be written to playback.html.
- </code></pre></li>
- </ul></div>
- <div><ul>
- <li><pre><code>
- # git-playback
- git-playback is a bash script that creates a visual playback of git commits. Use it like this:
- git clone git://github.com/mmozuras/git-playback.git
- cd /repository/you/want/to/playback
- sh /path/to/git-playback/git-playback file1 file2
- open playback.html
- git-playback automatically uses the branch you're currently on. Output will be written to playback.html.
- </code></pre></li>
- </ul></div>
- <div><ul>
- <li><pre><code>
- # git-playback
- git-playback is a bash script that creates a visual playback of git commits. Use it like this:
- git clone git://github.com/mmozuras/git-playback.git
- cd /repository/you/want/to/playback
- sh /path/to/git-playback/git-playback file1 file2
- open playback.html
- git-playback automatically uses the branch you're currently on. Output will be written to playback.html.
- </code></pre></li>
- </ul></div>
- <div><ul>
- <li><pre><code>
- # git-playback
- git-playback is a bash script that creates a visual playback of git commits. Use it like this:
- git clone git://github.com/mmozuras/git-playback.git
- cd /repository/you/want/to/playback
- sh /path/to/git-playback/git-playback file1 file2
- open playback.html
- git-playback automatically uses the branch you're currently on. Output will be written to playback.html.
- </code></pre></li>
- </ul></div>
- <div><ul>
- <li><pre><code>
- # git-playback
- git-playback is a bash script that creates a visual playback of git commits. Use it like this:
- git clone git://github.com/mmozuras/git-playback.git
- cd /repository/you/want/to/playback
- sh /path/to/git-playback/git-playback file1 file2
- open playback.html
- git-playback automatically uses the branch you're currently on. Output will be written to playback.html.
- </code></pre></li>
- </ul></div>
- </div> </div> <script src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script> <script src='http://yandex.st/highlightjs/6.2/highlight.min.js'></script> <script type='text/javascript'>(function($){ $.fn.playback = function() { return this.each(function(){ $('.container', $(this)).children().wrapAll('<div class=control/>'); var elem = $(this), control = $('.control', elem), total = control.children().size(), width = control.children().outerWidth(), height = control.children().outerHeight(), start = 0, next = 0, prev = 0, current = 0, active, position, direction; function animate(direction) { if (!active) { active = true; switch(direction) { case 'next': prev = current; next = current + 1; next = total === next ? 0 : next; position = width*2; direction = -width*2; current = next; break; case 'prev': prev = current; next = current - 1; next = next === -1 ? total-1 : next; position = 0; direction = 0; current = next; break; } control.children(':eq('+ next +')').css({ left: position, display: 'block' }); control.animate({ left: direction }, 350, function(){ control.css({ left: -width }); control.children(':eq('+ next +')').css({ left: width, zIndex: 5 }); control.children(':eq('+ prev +')').css({ left: width, display: 'none', zIndex: 0 }); active = false; }); } } if (start > total) { start = total - 1; } $('.container', elem).css({ overflow: 'hidden', position: 'relative' }); control.children().css({ position: 'absolute', top: 0, left: control.children().outerWidth(), zIndex: 0, display: 'none' }); control.css({ position: 'relative', width: (width + width + width), height: height, left: -width }); $('.container', elem).css({ display: 'block' }); control.children(':eq(' + start + ')').show(); $('body').keydown(function(e) { if(e.keyCode == 37) { animate('prev'); } else if(e.keyCode == 39) { animate('next'); } }); }); }; })(jQuery);</script> <script> jQuery(document).ready(function(){ jQuery('#playback').playback(); hljs.initHighlightingOnLoad(); }); </script> </body> </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement