222 lines
5.7 KiB
HTML
222 lines
5.7 KiB
HTML
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-7">
|
|
|
|
<div id='header'>
|
|
<span id='titellabel'>document name:
|
|
<title contenteditable="true">document</title>
|
|
</span>
|
|
</div>
|
|
|
|
<style>
|
|
*{
|
|
font-family:sans;
|
|
box-sizing:border-box;
|
|
}
|
|
html{
|
|
padding-top:50px;
|
|
}
|
|
#header{
|
|
top:0;
|
|
z-index:1;
|
|
position: fixed;
|
|
height: 50px;
|
|
width:100%;
|
|
background-color:rgba(255,255,240,0.9);
|
|
padding:15px;
|
|
display: block;
|
|
}
|
|
#titellabel {
|
|
background-color:#ffa;
|
|
border: 1px solid black;
|
|
padding:6px;
|
|
}
|
|
title{
|
|
position: relative;
|
|
display: inline;
|
|
background-color:#fff;
|
|
border: 1px solid black;
|
|
padding:4px;
|
|
}
|
|
.nsheet {
|
|
margin: 0;
|
|
overflow: hidden;
|
|
position: relative;
|
|
box-sizing: border-box;
|
|
page-break-after: always;
|
|
height: 307mm;
|
|
width: 100%;
|
|
background-color:#fff;
|
|
position:relative;
|
|
border:0;
|
|
display:block;
|
|
}
|
|
.sheet {
|
|
margin: 0;
|
|
overflow: hidden;
|
|
position: relative;
|
|
box-sizing: border-box;
|
|
page-break-after: always;
|
|
height: 307mm;
|
|
width: 100%;
|
|
background-color:#fff;
|
|
position:relative;
|
|
border:0;
|
|
display:block;
|
|
}
|
|
@media print {
|
|
head, #header,title {
|
|
display: none;
|
|
}
|
|
html{
|
|
padding-top:0;
|
|
}
|
|
}
|
|
@page { margin: 0 }
|
|
body { margin: 0 }
|
|
@media print {
|
|
body { width : 210mm; }
|
|
}
|
|
@page { size: 210mm 297mm; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<iframe class='sheet' src='data:text/html;charset=utf-8,
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
</head>
|
|
<body>
|
|
<style>
|
|
* { box-sizing:border-box; font-family:sans; }
|
|
.style {
|
|
display:block ;
|
|
background-color:rgb(255,255,200);
|
|
position:absolute;
|
|
top:0;
|
|
left:0;
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
transform: scale(0.2) translate(-200%,0);
|
|
transition: transform .2s ease;
|
|
z-index:1;
|
|
height:fit-content;
|
|
max-height:90%;
|
|
}
|
|
|
|
.styleCss {
|
|
color:green;
|
|
width:100%;
|
|
min-width:500px;
|
|
display:inline-block;
|
|
max-height:90vh;
|
|
min-height:20vh;
|
|
font-family: monospace;
|
|
white-space: pre;
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
.style:focus-within {
|
|
transform: translate(0,0) scale(1);
|
|
color:blue;
|
|
}
|
|
.style:focus-within + .sheet {
|
|
ingnore-margin-left:50%;
|
|
transform: translate(80%,0%);
|
|
color:blue;
|
|
}
|
|
html { width: 100%; margin:0; padding:0;background-color:rgb(150,150,150); }
|
|
body { width: 100%; overflow:auto; margin:0;}
|
|
body { color:green; width: var(--page-width); height:var(--page-height)}
|
|
.sheet {
|
|
overflow: hidden;
|
|
margin:0cm 1cm;
|
|
box-sizing: border-box;
|
|
page-break-after: always;
|
|
height: 297mm;
|
|
height: var(--page-height);
|
|
width: 210mm;
|
|
width: var(--page-width);
|
|
flex:0 0 var(--page-width);
|
|
display:block;
|
|
padding: 2cm;
|
|
transition: transform .2s ease;
|
|
}
|
|
@media screen {
|
|
body { width:100%; background: rgb(150,150,150); }
|
|
.sheet {
|
|
box-shadow: 0 .5mm 2mm rgba(0,0,0,.3);
|
|
/* margin: 5mm auto;*/
|
|
}
|
|
}
|
|
@media print {
|
|
.style, style { display: none;}
|
|
body { width : 210mm; width: var(--page-width);margin:0; }
|
|
.sheet { margin:0; }
|
|
}
|
|
@page { margin: 0 }
|
|
</style>
|
|
<div class="style"><style class="styleCss" contenteditable="true">
|
|
/* set page size */
|
|
:root {
|
|
--page-width: 210mm;
|
|
--page-height: 297mm;
|
|
}
|
|
/* becuase stupid browsers https://stackoverflow.com/a/44738574 need to set -again- */
|
|
@page { size: var(--page-width,210mm) var(--page-height,297mm) }
|
|
.sheet {
|
|
background-color:white;
|
|
}
|
|
</style></div>
|
|
<div class="sheet" contenteditable="true">sheet</div>
|
|
<div style="flex:0 0 0;width:0px;height:0px"></div>
|
|
</body>
|
|
</html>
|
|
'></iframe>
|
|
<iframe class='newsheet' src='data:text/html;charset=utf-8,
|
|
|
|
'></iframe>
|
|
<iframe class='sheet' src='data:text/html;charset=utf-8,
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<style>
|
|
* { box-sizing:border-box; font-family:sans; }
|
|
html { height:100%; margin:0; padding:0;background-color:rgb(150,150,150); }
|
|
body { overflow:hidden; min-height:100%; background-color:rgb(100,100,100); margin:0px;}
|
|
@media print {
|
|
body { width : 210mm; }
|
|
}
|
|
@page { margin: 0 }
|
|
body { margin: auto }
|
|
@page { size: 210mm 297mm; }
|
|
.sheet {
|
|
margin: auto;
|
|
overflow: hidden;
|
|
box-sizing: border-box;
|
|
page-break-after: always;
|
|
background-color:white;
|
|
padding: 2cm;
|
|
height: 297mm;
|
|
width: 210mm;
|
|
display:block;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body><div class="sheet" contenteditable="true">sheet</div></body>
|
|
</html>
|
|
'></iframe>
|
|
<script>
|
|
window.addEventListener("load",function(){
|
|
|
|
}, false);
|
|
window.addEventListener("beforeunload",function(event){
|
|
event.returnValue = "You have unsaved changes.";
|
|
return false;
|
|
}, false);
|
|
|
|
</script>
|
|
|
|
|
|
</body></html>
|