diff --git a/aleksis/core/static/print-simple.css b/aleksis/core/static/print-simple.css new file mode 100644 index 0000000000000000000000000000000000000000..f0e6536b4d835b67ab0d519de13c561953be4ea5 --- /dev/null +++ b/aleksis/core/static/print-simple.css @@ -0,0 +1,21 @@ +@page { + padding: 0; + margin: 0; +} + +table.small-print, td.small-print, th.small-print { + font-size: 10pt; +} + +tr { + border-bottom: 1px solid rgba(0, 0, 0, 0.3); +} + +td, th { + padding: 1px; +} + +td.rotate, th.rotate { + text-align: center; + transform: rotate(-90deg); +} diff --git a/aleksis/core/templates/core/base_simple_print.html b/aleksis/core/templates/core/base_simple_print.html new file mode 100644 index 0000000000000000000000000000000000000000..6e66e28983679acebdd2df0993ae7b5fdf64e621 --- /dev/null +++ b/aleksis/core/templates/core/base_simple_print.html @@ -0,0 +1,52 @@ +{% load static i18n any_js sass_tags %} +{% get_current_language as LANGUAGE_CODE %} + +<!DOCTYPE html> +<html lang="{{ LANGUAGE_CODE }}"> +<head> + {% include "core/partials/meta.html" %} + + <title> + {% block no_browser_title %} + {% block browser_title %}{% endblock %} — + {% endblock %} + {{ SITE_PREFERENCES.general__title }} + </title> + + {% include_css "material-design-icons" %} + {% include_css "Roboto100" %} + {% include_css "Roboto300" %} + {% include_css "Roboto400" %} + {% include_css "Roboto500" %} + {% include_css "Roboto700" %} + {% include_css "Roboto900" %} + {% include_css "paper-css" %} + <link rel="stylesheet" href="{% sass_src 'public/style.scss' %}"/> + <link rel="stylesheet" href="{% static "print-simple.css" %}"/> + + {% block size %} + <style> + @page { + size: {{ width }}mm {{ height }}mm; + } + + @media print { + html, body { + width: {{ width }}mm; + } + } + + .sheet { + width: {{ width }}mm; + height: {{ height|add:-1 }}.83mm; + } + </style> + {% endblock %} + + {% block extra_head %}{% endblock %} +</head> + +<body> +{% block content %}{% endblock %} +</body> +</html>