kittv
/
prezgen
Archived
1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

109 lines
1.9 KiB
CSS

@font-face {
font-family: "ptserif";
src: url("fonts/PTSerif-Regular.ttf") format("truetype");
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: "ptserif";
src: url("fonts/PTSerif-Italic.ttf") format("truetype");
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: "ptserif";
src: url("fonts/PTSerif-Bold.ttf") format("truetype");
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: "ptserif";
src: url("fonts/PTSerif-BoldItalic.ttf") format("truetype");
font-weight: bold;
font-style: italic;
}
@page {
size: A4;
margin: 0;
}
@media print {
body {
margin: 0;
border: none;
}
}
@media screen {
body {
margin: 5mm;
border: 1px solid #aaa;
}
}
html, body {
width: 210mm;
height: 297mm;
box-sizing: border-box;
}
body {
display: flex;
flex-direction: column;
padding: 6mm 6mm 6mm 12mm;
font-family: ptserif, serif;
counter-reset: list;
}
header {
display: flex;
justify-content: space-between;
}
#meta {
margin: 7mm 0;
width: 100%;
}
table#meta td {
padding: 0 2mm;
}
table#meta td:nth-child(odd) {
text-align: right;
font-style: italic;
}
table#attendance, table#days {
flex-grow: 1;
width: 100%;
height: 100%;
border-collapse: collapse;
}
table#attendance th,
table#attendance td,
table#days th,
table#days td {
border: 1px solid #000
}
table#attendance {
transform: rotate(180deg); /* Hack for rotating a table by 270 degrees */
writing-mode: vertical-rl; /* and scaling it relatively to page size. */
}
table#attendance tr:nth-child(1) { background-color: #ddd }
table#attendance td:nth-child(n+3):nth-child(-n+14) {
width: 8mm;
height: 8mm;
}
table#days th { height: 8mm }
table#days th, table#days td {
padding: 2mm 3mm;
}
table#days th:nth-child(2) { width: 55% }
table#days td:nth-child(2):before {
counter-increment: list;
content: counter(list)'.';
}
#wrap { flex-grow: 1 } /* Needed in order to scale the table in the Y axis */