Advertisement
Guest User

Untitled

a guest
May 14th, 2012
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 4.28 KB | None | 0 0
  1.  
  2. <!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'>
  3. <div><ul>
  4. <li><pre><code>
  5. </code></pre></li>
  6. </ul></div>
  7. <div><ul>
  8. <li><pre><code>
  9. </code></pre></li>
  10. </ul></div>
  11. <div><ul>
  12. <li><pre><code>
  13. </code></pre></li>
  14. </ul></div>
  15. <div><ul>
  16. <li><pre><code>
  17. </code></pre></li>
  18. </ul></div>
  19. <div><ul>
  20. <li><pre><code>
  21. </code></pre></li>
  22. </ul></div>
  23. <div><ul>
  24. <li><pre><code>
  25. </code></pre></li>
  26. </ul></div>
  27. <div><ul>
  28. <li><pre><code>
  29. </code></pre></li>
  30. </ul></div>
  31. <div><ul>
  32. <li><pre><code>
  33. </code></pre></li>
  34. </ul></div>
  35. <div><ul>
  36. <li><pre><code>
  37. </code></pre></li>
  38. </ul></div>
  39. <div><ul>
  40. <li><pre><code>
  41. # git-playback
  42.  
  43. git-playback is a bash script that creates a visual playback of git commits. Run it from your repository like this:
  44.  
  45.     sh git-playback file1 file2...
  46.  
  47. git-playback automatically uses the branch you're currently on. Output will be written to playback.html.
  48. </code></pre></li>
  49. </ul></div>
  50. <div><ul>
  51. <li><pre><code>
  52. # git-playback
  53.  
  54. git-playback is a bash script that creates a visual playback of git commits. Use it like this:
  55.  
  56.     git clone git://github.com/mmozuras/git-playback.git
  57.     cd /repository/you/want/to/playback
  58.     sh /path/to/git-playback/git-playback file1 file2
  59.     open playback.html
  60.  
  61. git-playback automatically uses the branch you're currently on. Output will be written to playback.html.
  62. </code></pre></li>
  63. </ul></div>
  64. <div><ul>
  65. <li><pre><code>
  66. # git-playback
  67.  
  68. git-playback is a bash script that creates a visual playback of git commits. Use it like this:
  69.  
  70.     git clone git://github.com/mmozuras/git-playback.git
  71.     cd /repository/you/want/to/playback
  72.     sh /path/to/git-playback/git-playback file1 file2
  73.     open playback.html
  74.  
  75. git-playback automatically uses the branch you're currently on. Output will be written to playback.html.
  76. </code></pre></li>
  77. </ul></div>
  78. </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