From c25ba8f974632c83f46d30a6598bae68806a869c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Fri, 20 Nov 2020 00:36:12 +0100 Subject: [PATCH] A few style changes for better display. --- copanier/static/landscape.css | 7 +++++++ copanier/static/order-summary.css | 4 ++++ copanier/static/side-menu.css | 8 ++++++-- copanier/templates/base.html | 3 ++- copanier/templates/delivery/compute_balance.html | 11 +++-------- copanier/templates/delivery/show_delivery.html | 2 +- copanier/views/products.py | 1 + 7 files changed, 24 insertions(+), 12 deletions(-) create mode 100644 copanier/static/landscape.css diff --git a/copanier/static/landscape.css b/copanier/static/landscape.css new file mode 100644 index 0000000..1bcd6f5 --- /dev/null +++ b/copanier/static/landscape.css @@ -0,0 +1,7 @@ +body { + padding: 5em; +} + +@page { + size: landscape !important; +} \ No newline at end of file diff --git a/copanier/static/order-summary.css b/copanier/static/order-summary.css index 281cb37..c1a6886 100644 --- a/copanier/static/order-summary.css +++ b/copanier/static/order-summary.css @@ -1,3 +1,7 @@ +body { + padding: 5em; +} + @page { size: portrait !important; } \ No newline at end of file diff --git a/copanier/static/side-menu.css b/copanier/static/side-menu.css index d468949..c1659d4 100644 --- a/copanier/static/side-menu.css +++ b/copanier/static/side-menu.css @@ -40,13 +40,17 @@ This is the parent `
` that contains the menu and the content area. The content `
` is where all your content goes. */ .content { - margin: 0 auto; padding: 0 2em; - max-width: 800px; + margin-bottom: 50px; line-height: 1.6em; } +.narrow { + margin: 0 auto; + max-width: 800px; +} + .header { margin: 0; color: #333; diff --git a/copanier/templates/base.html b/copanier/templates/base.html index 024e914..910c3a7 100644 --- a/copanier/templates/base.html +++ b/copanier/templates/base.html @@ -1,3 +1,4 @@ + {% import "includes/macros.html" as macros %} @@ -51,7 +52,7 @@ {% block toplink %}{% endblock %}
-
+
{% block body %} {% endblock body %}
diff --git a/copanier/templates/delivery/compute_balance.html b/copanier/templates/delivery/compute_balance.html index 3edd02d..efd0509 100644 --- a/copanier/templates/delivery/compute_balance.html +++ b/copanier/templates/delivery/compute_balance.html @@ -1,14 +1,9 @@ {% extends "base.html" %} +{% block is_wide %}{% endblock %} {% block body %}
-

  {{ delivery.name }} : Répartition des paiements

-
- -
+

{{ delivery.name }}

+

  Répartition des paiements

diff --git a/copanier/templates/delivery/show_delivery.html b/copanier/templates/delivery/show_delivery.html index 1cff3f2..6a07f7d 100644 --- a/copanier/templates/delivery/show_delivery.html +++ b/copanier/templates/delivery/show_delivery.html @@ -1,5 +1,5 @@ {% extends "base.html" %} - +{% block is_wide %}{% endblock %} {% block body %}
diff --git a/copanier/views/products.py b/copanier/views/products.py index ac58d40..9ef4dfa 100644 --- a/copanier/views/products.py +++ b/copanier/views/products.py @@ -23,6 +23,7 @@ async def list_products(request, response, id): response.pdf( template_name, template_params, + css="landscape.css", filename=utils.prefix("producteurices.pdf", delivery), ) else: