dev-e2h-toc2
WRITTEN FOR SPHERE 3!
HAPPY CONGRESS!

by:
    +dcht00
    [...]

[xx]


WORK

needs:
    * >matic two frame thing:
        * adopted from 🔗dev-e2h-split
        * [...]



SPECS

two frames:
    * ONLY TOC ON RIGHT:
        "karaoke ball" feature would be great (show where you are in TOC)
    * ONLY VIEWER ON LEFT:
        for now!
    * [...]

todos:
    * >matic umesti v 🔗index
    * >matic daj gor view link:
        zacniva 🔗TEMPLATE
    * [...]




MERGING: MATIC CODE ORIGINAL (to work on)

from: 🔗dev-e2h-split

"""
<html>
<body style="overflow: hidden; border: 0; margin: 0; padding: 0" onresize="onResize()">

<div style="display: flex; scroll: none; height: 100%">
  <iframe id="editor" style="flex: 0 0 50%; height: 100%; scroll: none; border: 0"></iframe>
  <div style="flex: 1; height: 100%; scroll: none; border: 0">
    <div style="height: 37px; border-bottom: 1px solid #BBB; width: 100%; text-align: center; background: #f7f7f7;"><span style="position: relative; top: 25%; transform: translateY(-50%); color: #555;" onclick="reloadViewer()">Reload</span></div>
    <iframe id="viewer" style="width: 100%; height: 100%; scroll: none; border: 0"></iframe>
  </div>
</div>

<script>
if (!Array.prototype.last){
    Array.prototype.last = function(){
        return this[this.length - 1];
    };
};

var link = location.search.split('link=')[1];
document.title = link.split('/').last();

document.getElementById("editor").src = link;
document.getElementById("viewer").src = "http://totalism.org/E2H/e2h.php?link=" + link.replace(/.*?:\/\//g, "") + "&STYLE";

// TODO Add communication support from E2H side: http://stackoverflow.com/a/31601295/293115
function reloadViewer() {
  document.getElementById("viewer").src = document.getElementById("viewer").src;
  onResize();
}

function onResize() {
  document.getElementById("viewer").style.height = (window.innerHeight - 38) + "px";
}

onResize();

</script>

</body>
</html>
"""



EOF


JavaScript license information


(Site generated by E2H, an "Etherpad hypermedia" project by @dcht00). Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.


Edit Site

Talk