|
|
(227 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
| <html> | | <html> |
− | | + | <head> |
− | <!-- >>>>> Meta <<<<< --> | + | |
− | | + | |
− | <meta name="viewport" content="width=device-width, initial-scale=1.0">
| + | |
− | | + | |
− | <!-- >>>>> Link References <<<<< -->
| + | |
− | <!-- Template CSS file -->
| + | |
− | <link rel="stylesheet" type="text/css" href="https://2017.igem.org/Template:Greece/CSS?action=raw&ctype=text/css" />
| + | |
− | | + | |
− | <!-- Vis.css -->
| + | |
− | <link rel='stylesheet' type='text/css' href='https://cdnjs.cloudflare.com/ajax/libs/vis/4.20.1/vis.min.css' />
| + | |
− | | + | |
− | <!-- >>>>> Scripts <<<<< -->
| + | |
− | | + | |
− | <!-- Call Jquery -->
| + | |
− | <script src='https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script>
| + | |
− | | + | |
− | <!-- Vis.js Library -->
| + | |
− | <script src='https://cdnjs.cloudflare.com/ajax/libs/vis/4.20.1/vis.min.js'></script>
| + | |
− | | + | |
− | <!-- Call Template Scrips -->
| + | |
− | <script type="text/javascript" src="https://2017.igem.org/Template:Greece/Javascript?
| + | |
− | action=raw&ctype=text/javascript"></script>
| + | |
− | | + | |
− | <!-- On document.ready -->
| + | |
− | <script>
| + | |
− | $( document ).ready(function(){
| + | |
− | void(window.document.title = 'PROJECT');
| + | |
− | | + | |
− | //HIDE
| + | |
− | void(document.getElementById('loading-background').style.display = 'none');
| + | |
− | | + | |
− | //SHOW
| + | |
− | void(document.getElementById('main-wraper').style.display = 'block');
| + | |
− | void(document.getElementById('svg_graphics_box').style.display = 'block');
| + | |
− | void(document.getElementById('video').style.display = 'block');
| + | |
− |
| + | |
− | // Change color of current link
| + | |
− | $('a[href*="' +window.location.href+'"]').each(function() { $(this).css('color', '#000000'); });
| + | |
− | });
| + | |
− | </script>
| + | |
− | | + | |
− | </head>
| + | |
− | <body>
| + | |
− | | + | |
− | <div id="mynetwork"></div>
| + | |
− | | + | |
− | <script>
| + | |
− | | + | |
− | var nodes = new vis.DataSet([
| + | |
− | {id: 1, label: 'Node 1'},
| + | |
− | {id: 2, label: 'Node 2'},
| + | |
− | {id: 4, label: 'Node 4'},
| + | |
− | {id: 5, label: 'Node 5'}
| + | |
− | ]);
| + | |
− | | + | |
− | var edges = new vis.DataSet([
| + | |
− | {from: 1, to: 2},
| + | |
− | {from: 2, to: 4},
| + | |
− | {from: 2, to: 5}
| + | |
− | ]);
| + | |
− | | + | |
− | var container = document.getElementById('mynetwork');
| + | |
− | | + | |
− | | + | |
− | var data = {
| + | |
− | nodes: nodes,
| + | |
− | edges: edges
| + | |
− | };
| + | |
− | | + | |
− | var options = {
| + | |
− | interaction: { hover:true },
| + | |
− | nodes: { font: { size: 14 }}
| + | |
− | };
| + | |
− | | + | |
− | var network = new vis.Network(container, data, options);
| + | |
− | | + | |
− | network.canvasToDOM({ x: -300, y: -200 });
| + | |
− | | + | |
− | network.on("selectNode", function (params) {
| + | |
− | var selectedNodeId = params.nodes[0];
| + | |
− | var node = network.body.nodes[selectedNodeId];
| + | |
− | node.setOptions({
| + | |
− | font: {
| + | |
− | size: 20
| + | |
− | }
| + | |
− | });
| + | |
− | });
| + | |
− | | + | |
− | network.on("deselectNode", function (params) {
| + | |
− | var deselectedNodeId = params.previousSelection.nodes[0];
| + | |
− | var node = network.body.nodes[deselectedNodeId];
| + | |
− | node.setOptions({
| + | |
− | font: {
| + | |
− | size: options.nodes.font.size
| + | |
− | }
| + | |
− | });
| + | |
− | });
| + | |
− | | + | |
− | </script>
| + | |
− | | + | |
| <style> | | <style> |
− | #mynetwork { | + | div#content{ display: none; } |
− | position: fixed;
| + | |
− | width: 99%;
| + | |
− | height: 90%;
| + | |
− | border: 1px solid lightgray;
| + | |
− | z-index: 1000;
| + | |
− | } | + | |
| </style> | | </style> |
− | | + | <script> |
− | <!-- Styling Script -->
| + | sessionStorage.setItem('LINK', 'Collaborations'); |
− | <script> | + | window.location.href = 'https://2017.igem.org/Team:Greece/Achievements'; |
− | //Changes shall apply under void()
| + | </script> |
− | // Upper black toolbar stays there id = 'top_menu_14' -> Could be display:block
| + | </head> |
− | // Main div wrapper contains code and all other stuff id = 'content' -> Change id to 'content2'
| + | |
− | // Reason: iGEM puts everything in document.getElementById('content') - change id - cause element 404
| + | |
− | void(document.getElementById('content').id = 'content0')
| + | |
− | | + | |
− | // Div (placeholder) containing the iGEM logo and some text id = 'top_title' -> Apply display: none | + | |
− | void(document.getElementById('top_title').style.display = 'none');
| + | |
− | | + | |
− | // Small icon in the top black toolbar id = 'bars_item' -> Apply display: none | + | |
− | void(document.getElementById('bars_item').style.display = 'none');
| + | |
− | // Same application for it's side effect (display an ugly div by default) | + | |
− | | + | |
− | void(document.getElementById('user_item').style.display = 'none');
| + | |
− | void(document.getElementById('sideMenu').style.display = 'none');
| + | |
− | var element = document.getElementById('home_logo');
| + | |
− | element.outerHTML = '';
| + | |
− | delete element;
| + | |
− | </script> | + | |
− | </body> | + | |
| </html> | | </html> |