diff --git a/aleksis/core/static/print_landscape.css b/aleksis/core/static/print_landscape.css new file mode 100644 index 0000000000000000000000000000000000000000..a348ddff6268f56a1f4fa82eac240d6c9823e14c --- /dev/null +++ b/aleksis/core/static/print_landscape.css @@ -0,0 +1,19 @@ +@page { + size: A4 landscape; +} + +header { + width: 277mm; +} + + +.print-layout-table, .print-layout-td { + width: 277mm; + max-width: 277mm; + min-width: 277mm; +} + + +footer { + width: 277mm; +} diff --git a/aleksis/core/templates/core/base_print.html b/aleksis/core/templates/core/base_print.html index a229d723ed2afa4ec8ad1e7fa0e775889c9d9990..37868f6f3e2de5d0ca2df6e57d4e111f1e7f1747 100644 --- a/aleksis/core/templates/core/base_print.html +++ b/aleksis/core/templates/core/base_print.html @@ -18,11 +18,13 @@ {% include_css "paper-css" %} <link rel="stylesheet" href="{% sass_src 'style.scss' %}"/> <link rel="stylesheet" href="{% static "print.css" %}"/> - + {% if landscape %} + <link rel="stylesheet" href="{% static 'print_landscape.css' %}"/> + {% endif %} {% block extra_head %}{% endblock %} </head> -<body class="A4 print-body"> +<body class="A4 {% if landscape %}landscape{% endif %} print-body"> <main class="sheet infinite"> <div style="margin-top: -10mm;"></div>