Commit af8ffe35 authored by julien's avatar julien

added a button to be able to launch the rendering

parent 0f37e042
......@@ -22,26 +22,33 @@
// waiting for the before everything hook for that one
window.onload = function () {
noteNumbering();
/* render pagedjs after a first render in the browser (need to calculate the computed line-height and font-metrics */
setTimeout(pagedjs, 1000);
setTimeout(addingNumToOl, 3000);
}
// after the layout, add the start property to each ol element
addingNumToOl();
</script>
<style>
#render {
position: fixed;
right: 3em;
top: 3em;
background: black;
color: white;
border: 3px solid white;
padding: 0.45em 1em 0.5em;
text-transform: uppercase;
}
#render:hover {
box-shadow: 0 0 0 4px black;
}
</style>
</head>
<body>
<button id="render">paginate</button>
<ol>
<li>item #001</li>
<li>item #002</li>
......@@ -349,5 +356,13 @@
<li>item #100</li>
</ol>
<script>
function show() {
pagedjs();
setTimeout(addingNumToOl, 3000);
document.querySelector("#render").style.display = "none";
}
document.querySelector("#render").addEventListener('click', show)
</script>
</body>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment