Update repo, fix #3

This commit is contained in:
Jaan Janesmae 2020-03-11 21:31:38 +02:00
parent d118329d8c
commit 4471d6ab3c
No known key found for this signature in database
GPG Key ID: 107973F4AE61D099
3 changed files with 100 additions and 82 deletions

View File

@ -12,12 +12,12 @@
</head>
<body>
<section class="sheet padding-10mm">
<section class="sheet">
<div class="logo"><img src="https://media.k-space.ee/logo/K-space_logotype_black.svg" draggable="false"></div>
<div class="main"><div class="editable" contenteditable="true">Hack<br>the<br>planet!</div></div>
<div class="main"><div id="editable" class="editable" contenteditable="true">Hack<br>the<br>planet!</div></div>
<div class="subline"><div class="editable" contenteditable="true">Never stop learning!<br>And have fun while doing it.</div></div>
</section>
</body>
<script src="signs.js" type="text/javascript"></script>
</html>

View File

@ -1,115 +1,121 @@
@page {
margin: 0;
size: A4 landscape;
margin: 0;
size: A4 landscape;
}
html {
font-family: 'Orbitron', sans-serif;
font-family: 'Orbitron', sans-serif;
}
body {
margin: 0
margin: 0
}
.sheet {
display: table;
margin: 0;
position: relative;
box-sizing: border-box;
page-break-after: always;
padding: 10mm;
padding-top: 5mm;
width: 297mm;
height: 209mm
display: table;
margin: 0;
position: relative;
box-sizing: border-box;
page-break-after: always;
padding: 10mm;
padding-top: 5mm;
width: 297mm;
height: 209mm
border-spacing: 0;
}
/* Put everything in the correct location */
.logo {
display: table-row;
font-size: 15mm;
display: table-row;
}
.logo img {
height:35mm;
pointer-events: none;
float:inline-start;
height:35mm;
pointer-events: none;
float:inline-start;
}
.main {
display: table-row;
font-size: 25mm;
width: 100%;
height: 12.5cm;
margin: 1cm 0;
text-align: center;
margin-top: 0px;
position:relative;
top:-7.5mm;
display: table-row;
font-size: 25mm;
width: 100%;
height: 12.5cm;
max-height: 12.5cm;
margin: 0;
text-align: center;
}
.subline {
display: table-row;
font-size: 12mm;
text-align: center;
position:relative;
top:-3.75mm;
display: table-row;
font-size: 12mm;
text-align: center;
}
.editable {
display: table-cell;
vertical-align: middle;
-webkit-user-modify: read-write;
-moz-user-modify: read-write;
user-modify: read-write;
border: none;
outline: none;
display: table-cell;
vertical-align: middle;
-webkit-user-modify: read-write;
-moz-user-modify: read-write;
user-modify: read-write;
border: none;
outline: none;
}
/** Screen **/
@media screen {
body {
background: #eee
}
.sheet {
background: white;
box-shadow: 0 .5mm 2mm rgba(0, 0, 0, .3);
margin: 20mm auto;
}
.sheet, .sheet::before, .sheet::after {
box-shadow: 1px 1px 1px rgba(0, 0, 0, .4);
border: 1px solid #bbb;
}
.sheet::before, .sheet::after {
content: "";
position: absolute;
width: 297mm;
height: 210mm;
background-color: #eee;
}
.sheet::before {
right: 15px;
top: 0;
transform: rotate(-1deg);
z-index: -1;
}
.sheet::after {
top: 5px;
right: -5px;
transform: rotate(1deg);
z-index: -2;
}
body {
background: #eee
}
.sheet {
background: white;
box-shadow: 0 .5mm 2mm rgba(0, 0, 0, .3);
margin: 20mm auto;
}
.sheet, .sheet::before, .sheet::after {
box-shadow: 1px 1px 1px rgba(0, 0, 0, .4);
border: 1px solid #bbb;
}
.sheet::before, .sheet::after {
content: "";
position: absolute;
width: 297mm;
height: 210mm;
background-color: #eee;
}
.sheet::before {
right: 15px;
top: 0;
transform: rotate(-1deg);
z-index: -1;
}
.sheet::after {
top: 5px;
right: -5px;
transform: rotate(1deg);
z-index: -2;
}
}
@media print {
body {
width: 297mm
}
.sheet {
overflow: hidden;
/* Make input caret transparent */
color: transparent;
text-shadow: 0 0 0 #000;
}
body {
width: 297mm
}
.sheet {
overflow: hidden;
/* Make input caret transparent */
color: transparent;
text-shadow: 0 0 0 #000;
}
}

12
public/signs.js Normal file
View File

@ -0,0 +1,12 @@
(function(){
"use strict";
var t,s,r=6;
h = function() {
this.offsetHeight > t && (r+=1),
s = t/r,
this.style.fontSize = s+'px'
};
var b = document.getElementById("editable");
t = b.offsetHeight;
b.addEventListener("input", h);
})();