From b70aa27a1368b01e0d2aaa3624849e574a64258b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniele=20Vigan=C3=B2?= Date: Wed, 4 Jan 2023 15:14:30 +0100 Subject: [PATCH] Add cover to consist page --- ram/portal/static/css/main.css | 4 ---- ram/portal/templates/base.html | 2 +- ram/portal/templates/consist.html | 13 +++++++++++++ .../templates/{page.html => rollingstock.html} | 2 +- ram/portal/views.py | 2 +- 5 files changed, 16 insertions(+), 7 deletions(-) rename ram/portal/templates/{page.html => rollingstock.html} (99%) diff --git a/ram/portal/static/css/main.css b/ram/portal/static/css/main.css index b8910f6..6b52701 100644 --- a/ram/portal/static/css/main.css +++ b/ram/portal/static/css/main.css @@ -11,10 +11,6 @@ a.badge, a.badge:hover { color: #fff; } -.tab-pane { - min-height: 300px; -} - .img-thumbnail { padding: 0; } diff --git a/ram/portal/templates/base.html b/ram/portal/templates/base.html index 3a7de0e..ade8b52 100644 --- a/ram/portal/templates/base.html +++ b/ram/portal/templates/base.html @@ -98,9 +98,9 @@
- {% block carousel %} {% endblock %} + {% block cards_layout %} {% endblock %}
diff --git a/ram/portal/templates/consist.html b/ram/portal/templates/consist.html index 90a2fdb..9735278 100644 --- a/ram/portal/templates/consist.html +++ b/ram/portal/templates/consist.html @@ -10,6 +10,19 @@ Updated {{ consist.updated_time | date:"M d, Y H:i" }} {% endif %} {% endblock %} + {% block carousel %} + {% if consist.image %} +
+ +
+ {% endif %} + {% endblock %} {% block cards %} {% for r in rolling_stock %}
diff --git a/ram/portal/templates/page.html b/ram/portal/templates/rollingstock.html similarity index 99% rename from ram/portal/templates/page.html rename to ram/portal/templates/rollingstock.html index 909bac8..3ab775a 100644 --- a/ram/portal/templates/page.html +++ b/ram/portal/templates/rollingstock.html @@ -11,7 +11,7 @@ Updated {{ rolling_stock.updated_time | date:"M d, Y H:i" }} {% endblock %} {% block carousel %} -