From d1b92cc639f4d25ad31baf4a6579a33c44a0d837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Sun, 10 Oct 2021 21:46:18 +0200 Subject: [PATCH] Styling --- copanier/static/app.css | 24 +++++++++++-------- copanier/templates/base.html | 12 ++++++++-- copanier/templates/delivery/place_order.html | 10 ++++---- .../templates/products/list_products.html | 5 +++- 4 files changed, 34 insertions(+), 17 deletions(-) diff --git a/copanier/static/app.css b/copanier/static/app.css index 055d87a..e362082 100644 --- a/copanier/static/app.css +++ b/copanier/static/app.css @@ -363,9 +363,7 @@ thead tr * { thead th + th { border-left: 1px solid white; } -th, td { - padding: 5px !important; -} + tr .producer { border-bottom: 1px solid #aaa; @@ -382,7 +380,7 @@ article.order { } table th.product { - min-width: 10rem; + min-width: 6rem; width: inherit; max-width: 15em; word-wrap: break-word; @@ -398,11 +396,17 @@ table.order td.quantity { } td.with-input { - padding: 0; + padding: 3em; text-align: left; } -td.with-input input { - text-align: center; + +.product_unit { + font-size: 0.8em; + font-style: italic; +} + +td.with-input > input { + width: 100px; } /* Chrome, Safari, Edge, Opera */ @@ -464,7 +468,6 @@ hr { text-align: center; color: white; line-height: 3rem; - height: 3rem; vertical-align: middle; margin: 1rem; } @@ -541,13 +544,14 @@ ul.delivery > li { margin: 0; } ul.delivery-head { + padding: 0; display: grid; - grid-template-columns: repeat(auto-fit, minmax(300px , 1fr)); + grid-template-columns: repeat(auto-fit, minmax(10em , 1fr)); grid-gap: 10px; } ul.delivery-head li { list-style: none; - padding: 0; + padding: 0.5em; margin: 0; font-size: 0.8em; } diff --git a/copanier/templates/base.html b/copanier/templates/base.html index a1c2fd4..2305b26 100644 --- a/copanier/templates/base.html +++ b/copanier/templates/base.html @@ -75,15 +75,23 @@ + - {% endif %} diff --git a/copanier/templates/delivery/place_order.html b/copanier/templates/delivery/place_order.html index c62b9d8..feb62f9 100644 --- a/copanier/templates/delivery/place_order.html +++ b/copanier/templates/delivery/place_order.html @@ -35,16 +35,18 @@ {% for product in delivery.get_products_by(producer.id) %} {% if not product.rupture %} - {{ product }} {% if product.rupture %}(RUPTURE !){% endif %} - {% if product.description %} -
{{ product.description }} +
{{ product }} {% if product.rupture %}(RUPTURE !){% endif %}
+ {% if product.description and product.description | length > 30 %} + + d'infos… + {% else %} + {{ product.description }} {% endif %} {{ product.price | round(2) }} € {% if producer.has_packing %} {{ product.packing or "—" }}{% if delivery.status == delivery.ADJUSTMENT and delivery.product_missing(product) %} (manque {{ delivery.product_missing(product) }}){% endif %} {% endif %} - {% if not (delivery.status == delivery.ADJUSTMENT or force_adjustments) %} x {{ product.unit }}{% endif %} +
{% if not (delivery.status == delivery.ADJUSTMENT or force_adjustments) %}
x {{ product.unit }}
{% endif %} {% if delivery.status == delivery.ADJUSTMENT or force_adjustments %} x {{ product.unit }} {% endif %} diff --git a/copanier/templates/products/list_products.html b/copanier/templates/products/list_products.html index 10ef1a7..3090637 100644 --- a/copanier/templates/products/list_products.html +++ b/copanier/templates/products/list_products.html @@ -9,7 +9,10 @@  Ajouter un⋅e producteur⋅rice
  • -  Réutiliser les produits d'une autre distrib +  Copier une distribution +
  • +
  • +  Valider tous les prix