(Created page with "{{Team:Judd_UK/TEMPLATE}}") |
|||
Line 1: | Line 1: | ||
− | {{Team:Judd_UK/ | + | <html> |
+ | <!-- | ||
+ | * Judd iGEM Wiki Main HTML Page | ||
+ | * | ||
+ | * Copyright Aleksandur Murfitt | ||
+ | * Released under the MIT license | ||
+ | * | ||
+ | * https://2017.igem.org/Judd_UK/license | ||
+ | * | ||
+ | * Date: 2017-10-01T12:38Z | ||
+ | --> | ||
+ | <div class="JC"> | ||
+ | <script src="/Template:Judd_UK/pagelist?action=raw&ctype=text/javascript" async></script> | ||
+ | <link rel="stylesheet" href="/Template:Judd_UK/Stylesheets/main?action=raw&ctype=text/css"> | ||
+ | <script src="/Template:Judd_UK/Scripts/wiki?action=raw&ctype=text/javascript" async></script> | ||
+ | <style id="topstyles"></style> | ||
+ | <div id="loadbar"></div> | ||
+ | <header id="Header"> | ||
+ | <img id="handle" href="#" onclick="editable()" src="/wiki/images/c/c8/T--Judd_UK--iGEMLogo-Handle.png" /> | ||
+ | <img id="sprite" href="#" onclick="editable()" src="/wiki/images/9/9e/T--Judd_UK--iGEMLogo-sprite.png" /> | ||
+ | <img id="main-img" href="#"onclick="editable()" alt="iGEM Logo" src="/wiki/images/8/85/T--Judd_UK--iGEMLogo-small.png" /> | ||
+ | <span id="O1"> | ||
+ | <a href="£Page-13">Home</a> | ||
+ | </span> | ||
+ | <div id="D2" class="D"></div> | ||
+ | <span id="O2"> | ||
+ | <a>Project</a> | ||
+ | <ul style="left:-25%"></ul> | ||
+ | </span> | ||
+ | <div id="D3" class="D"></div> | ||
+ | <span id="O3"> | ||
+ | <a>Human Practices</a> | ||
+ | <ul style="left:25%"></ul> | ||
+ | </span> | ||
+ | <div id="D4" class="D"></div> | ||
+ | <span id="O4"> | ||
+ | <a>Team</a> | ||
+ | <ul style="left:75%"></ul> | ||
+ | </span> | ||
+ | </header> | ||
+ | <div id="content-container"> | ||
+ | <div id="content-index"> | ||
+ | <h4>Contents</h4> | ||
+ | <ol> | ||
+ | </ol> | ||
+ | </div> | ||
+ | <div id="content-body"> | ||
+ | </div> | ||
+ | </div> | ||
+ | <footer id="Footer"> | ||
+ | <h4>Designed by Aleksandur Murfitt</h4> | ||
+ | </footer> | ||
+ | <div id="ting"></div> | ||
+ | <template></template> | ||
+ | <div id="content-template" style="display:none"></div> | ||
+ | <script> | ||
+ | function editable(){ | ||
+ | qs(".JC #content-body").contentEditable = 'true'; | ||
+ | qs(".JC #content-body").oninput = function(){ | ||
+ | qs('textarea').value = "<div" + (qs("#content-index").style.display=="none"?' data-wiki="false" data-templated="false"':"")+">" + qs('.JC #content-body').innerHTML+"<\/div><html><script>window.location='/Team:Judd_UK/" + page.replace("*", "/") + "'<\/script><\/html>"; | ||
+ | qsa("img").forEach(function(e){e.oncontextmenu = function(o){o.target.classList.toggle("left");o.preventDefault()}}); | ||
+ | if(qs(".JC #content-body").innerHTML.includes("#TABLE!")){ | ||
+ | qs(".JC #content-body").innerHTML = qs(".JC #content-body").innerHTML.replace("#TABLE!","<table style='width:100%'><tr><td>Heading 1</td><td>Heading 2</td><td>Heading 3</td></tr><tr><td>Data 1</td><td>Data 2</td><td>Data 3</td></tr><tr><td>Data 4</td><td>Data 5</td><td>Data 6</td></tr></table>");} | ||
+ | }; | ||
+ | var safety = page; | ||
+ | AJAX('https://2017.igem.org/Team:Judd_UK/Pages/' + safety +'?action=edit', function(e){ | ||
+ | qs('#ting').innerHTML=e.responseText; | ||
+ | qs('textarea').rows = "10"; | ||
+ | qs('#wpSummary').style.display = "none"; | ||
+ | qs('.editCheckboxes').style.display = "none"; | ||
+ | qs('#editpage-copywarn').style.display = "none"; | ||
+ | qs('#wpPreview').style.display = "none"; | ||
+ | qs('#wpDiff').style.display = "none"; | ||
+ | qs('.cancelLink').style.display = "none"; | ||
+ | qs('.editHelp').style.display = "none"; | ||
+ | qsa("label")[1].innerHTML="Editing " + safety; | ||
+ | qsa("img").forEach(function(e){e.oncontextmenu = function(o){o.target.classList.toggle("left");o.preventDefault()}}); | ||
+ | qs("textarea").oninput = function(){ | ||
+ | qs('.JC #content-body').innerHTML = qs('textarea').value; | ||
+ | qsa("img").forEach(function(e){e.oncontextmenu = function(o){o.target.classList.toggle("left");o.preventDefault()}}); | ||
+ | }; | ||
+ | document.body.onkeydown = function(e){if (e.keyCode == 27){html.innerHTML = qs("textarea").value;renderPage();qs("#ting").contentEditable="true"}} | ||
+ | }) | ||
+ | } | ||
+ | </script> | ||
+ | </div> | ||
+ | </html> |
Revision as of 03:42, 30 October 2017