diff --git a/biscuit/apps/alsijil/static/css/alsijil/full_register.css b/biscuit/apps/alsijil/static/css/alsijil/full_register.css index 758ff73f17f889b1d60b6343968e9e92fe613d0b..a5fd2014bef7c4673fb2062d1b79e9e6f6476aaf 100644 --- a/biscuit/apps/alsijil/static/css/alsijil/full_register.css +++ b/biscuit/apps/alsijil/static/css/alsijil/full_register.css @@ -1,52 +1,3 @@ -/* paper.css */ - -@page { margin: 0 } -body { margin: 0 } -.sheet { - margin: 0; - overflow: hidden; - position: relative; - box-sizing: border-box; - page-break-after: always; -} -/** Paper sizes **/ -body.A3 .sheet { width: 297mm; height: 419mm } -body.A3.landscape .sheet { width: 420mm; height: 296mm } -body.A4 .sheet { width: 210mm; height: 296mm } -body.A4.landscape .sheet { width: 297mm; height: 209mm } -body.A5 .sheet { width: 148mm; height: 209mm } -body.A5.landscape .sheet { width: 210mm; height: 147mm } -body.letter .sheet { width: 216mm; height: 279mm } -body.letter.landscape .sheet { width: 280mm; height: 215mm } -body.legal .sheet { width: 216mm; height: 356mm } -body.legal.landscape .sheet { width: 357mm; height: 215mm } -/** Padding area **/ -.sheet.padding-10mm { padding: 10mm } -.sheet.padding-15mm { padding: 15mm } -.sheet.padding-20mm { padding: 20mm } -.sheet.padding-25mm { padding: 25mm } -/** For screen preview **/ -@media screen { - body { background: #e0e0e0 } - .sheet { - background: white; - box-shadow: 0 .5mm 2mm rgba(0,0,0,.3); - margin: 5mm auto; - } -} -/** Fix for Chrome issue #273306 **/ -@media print { - body.A3.landscape { width: 420mm } - body.A3, body.A4.landscape { width: 297mm } - body.A4, body.A5.landscape { width: 210mm } - body.A5 { width: 148mm } - body.letter, body.legal { width: 216mm } - body.letter.landscape { width: 280mm } - body.legal.landscape { width: 357mm } -} -/* END paper.css */ - - @page { size: A4; } diff --git a/biscuit/apps/alsijil/static/css/alsijil/paper.css b/biscuit/apps/alsijil/static/css/alsijil/paper.css new file mode 100644 index 0000000000000000000000000000000000000000..8f2ae4a2d898474ad61b2b4fed94c3b2b53ebbbe --- /dev/null +++ b/biscuit/apps/alsijil/static/css/alsijil/paper.css @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2015 Tsutomu Kawamura + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +@page { margin: 0 } +body { margin: 0 } +.sheet { + margin: 0; + overflow: hidden; + position: relative; + box-sizing: border-box; + page-break-after: always; +} +/** Paper sizes **/ +body.A3 .sheet { width: 297mm; height: 419mm } +body.A3.landscape .sheet { width: 420mm; height: 296mm } +body.A4 .sheet { width: 210mm; height: 296mm } +body.A4.landscape .sheet { width: 297mm; height: 209mm } +body.A5 .sheet { width: 148mm; height: 209mm } +body.A5.landscape .sheet { width: 210mm; height: 147mm } +body.letter .sheet { width: 216mm; height: 279mm } +body.letter.landscape .sheet { width: 280mm; height: 215mm } +body.legal .sheet { width: 216mm; height: 356mm } +body.legal.landscape .sheet { width: 357mm; height: 215mm } +/** Padding area **/ +.sheet.padding-10mm { padding: 10mm } +.sheet.padding-15mm { padding: 15mm } +.sheet.padding-20mm { padding: 20mm } +.sheet.padding-25mm { padding: 25mm } +/** For screen preview **/ +@media screen { + body { background: #e0e0e0 } + .sheet { + background: white; + box-shadow: 0 .5mm 2mm rgba(0,0,0,.3); + margin: 5mm auto; + } +} +/** Fix for Chrome issue #273306 **/ +@media print { + body.A3.landscape { width: 420mm } + body.A3, body.A4.landscape { width: 297mm } + body.A4, body.A5.landscape { width: 210mm } + body.A5 { width: 148mm } + body.letter, body.legal { width: 216mm } + body.letter.landscape { width: 280mm } + body.legal.landscape { width: 357mm } +} diff --git a/biscuit/apps/alsijil/templates/alsijil/print/full_register.html b/biscuit/apps/alsijil/templates/alsijil/print/full_register.html index 1227797c39dd9c4d81a039df55db0e36ba7e9d40..c8b656771d19f5efec0355b2d428cabc5f56021a 100644 --- a/biscuit/apps/alsijil/templates/alsijil/print/full_register.html +++ b/biscuit/apps/alsijil/templates/alsijil/print/full_register.html @@ -5,6 +5,8 @@ <head> <meta charset="utf-8" /> + <link rel="stylesheet" + href="{% static 'css/alsijil/paper.css' %}" /> <link rel="stylesheet" href="{% static 'css/alsijil/full_register.css' %}" /> </head>