Difference between revisions of "Team:Cambridge-JIC/Notebook"
(Prototype team page) |
|||
Line 1: | Line 1: | ||
− | {{Cambridge-JIC}} | + | {{:Team:Cambridge-JIC/Templates/Menu}} |
<html> | <html> | ||
− | <h2>Notebook</h2> | + | <section style="background-color: #ebe5dc"> |
+ | <div class="slide-team" style="background-color: inherit"> | ||
+ | <h2>Notebook</h2> | ||
+ | <canvas id="notebook"></canvas> | ||
+ | <noscript> | ||
+ | <h3>Please enable javascript to view our notebook.</h3> | ||
+ | </noscript> | ||
+ | </div> | ||
+ | </section> | ||
− | < | + | <script src="//2015.igem.org/Team:Cambridge-JIC/Assets/Notebook.js?action=raw&ctype=text/javascript"></script> |
+ | <script> | ||
+ | //<![CDATA[ | ||
+ | /* documentation: | ||
+ | * var g = new notebookGraph( $ ) -- instantiate a new notebook using the canvas jquery element, `$` | ||
+ | * g.branch( head, name, colour ) -- create a new branch from the branch named `head` with name `name` and colour `colour` | ||
+ | * g.commit( branch, subject[, $] ) -- create a new entry ('commit') in branch `branch` with subject `subject` and optional associated jquery content `$` | ||
+ | * g.merge( branch, into, subject[, $] ) -- merge branch `branch` into the branch `into`; also creates an entry at the branch point with subject `subject` and content `$` | ||
+ | * g.adopt( parent, child ) -- let the branch `parent` adopt the branch `child` such that child is now a branch of parent instead; recommended to first merge child before adopting it anew | ||
+ | */ | ||
− | + | // instantiate our notebook | |
− | + | graph = new notebookGraph($('#notebook')); | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
+ | // establish the branches and their respective colours | ||
+ | graph.branch(undefined, 'meta', '#e25b22'); | ||
+ | graph.branch('meta', 'optics', '#89cace'); | ||
+ | graph.branch('meta', 'design', '#ffb347'); | ||
+ | graph.branch('meta', 'sw', '#dea584'); | ||
+ | graph.branch('meta', 'bio', '#57cda7'); | ||
− | + | // notebook content | |
− | < | + | graph.commit('meta', 'init'); |
+ | graph.commit('optics', "Alors c'est qui le papa?"); | ||
+ | graph.commit('design', 'lol'); | ||
+ | graph.commit('sw', 'heh'); | ||
+ | graph.merge('sw', 'optics', 'merge branch'); | ||
+ | graph.adopt('design', 'sw'); | ||
+ | graph.commit('bio', 'kek'); | ||
+ | graph.commit('bio'); | ||
+ | graph.commit('design', 'lel'); | ||
+ | graph.merge('bio', 'optics', 'done'); | ||
+ | graph.commit('sw', 'hi'); | ||
+ | graph.merge('sw', 'meta'); | ||
+ | graph.merge('design'); | ||
+ | graph.adopt('optics', 'design'); | ||
+ | graph.commit('design', 'testing'); | ||
+ | graph.commit('meta', 'test', $('<div>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sint, ducimus, qui fuga corporis veritatis doloribus iure nulla optio dolores maiores dolorum ullam alias cum libero obcaecati cupiditate sit illo aperiam possimus voluptatum similique neque explicabo quibusdam aspernatur dolorem. Quod, corrupti magni explicabo nam sequi nesciunt accusamus aliquam dolore! Cumque, quam fugiat ab veritatis. Quia, maxime quas perferendis cupiditate explicabo at atque iusto accusamus. Nesciunt veniam quidem nemo doloribus! Dolore, cupiditate, adipisci, voluptate quam nihil ipsa placeat dolor possimus minus quas nostrum eaque in dicta autem eligendi rerum facilis nesciunt sunt doloremque suscipit enim iure vitae eius voluptates tempora tenetur hic</div>')); | ||
+ | graph.adopt('meta','bio'); | ||
+ | graph.commit('bio', 'testing 1..2...3'); | ||
+ | graph.commit('sw', 'foobar'); | ||
+ | graph.merge('design', 'meta', 'blah'); | ||
+ | graph.merge('optics', 'meta', 'complete!'); | ||
− | + | //]]> | |
− | + | </script> | |
− | + | ||
− | + | ||
− | + | ||
− | </ | + | |
− | |||
</html> | </html> | ||
+ | {{:Team:Cambridge-JIC/Templates/Footer}} |
Revision as of 17:38, 15 July 2015