From aaaa49c1e269b62e01d6e55a698e4d0273b9a215 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Thu, 10 Jun 2021 17:30:37 -0500 Subject: [PATCH] Make ticket more mobile friendly --- templates/ticket/list.html | 2 +- templates/ticket/message.html | 22 ++++++---- templates/ticket/ticket.html | 83 +++++++++++++++++++++-------------- 3 files changed, 63 insertions(+), 44 deletions(-) diff --git a/templates/ticket/list.html b/templates/ticket/list.html index 4ec384c..9c5b3fd 100644 --- a/templates/ticket/list.html +++ b/templates/ticket/list.html @@ -254,7 +254,7 @@ {% if page_obj.num_pages > 1 %}
{% include "list-pages.html" %}
{% endif %} - +
diff --git a/templates/ticket/message.html b/templates/ticket/message.html index 0638e08..50954c2 100644 --- a/templates/ticket/message.html +++ b/templates/ticket/message.html @@ -1,15 +1,19 @@
- +
-
-
{{ message.time|date('DATE_FORMAT') }}
-
{{ message.time|time('TIME_FORMAT') }}
+ +
+
+
+
{{ message.time|date('DATE_FORMAT') }}
+
{{ message.time|time('TIME_FORMAT') }}
+
{{ message.body|markdown('ticket', MATH_ENGINE)|reference|str|safe }} diff --git a/templates/ticket/ticket.html b/templates/ticket/ticket.html index 760f0ca..6fd3c2b 100644 --- a/templates/ticket/ticket.html +++ b/templates/ticket/ticket.html @@ -24,13 +24,15 @@ width: 100%; margin: 0 auto; display: flex; - flex-direction: row-reverse; + flex-direction: row; + flex-wrap: wrap-reverse; max-width: 1000px; } .ticket-sidebar { flex: 1; padding: 10px 0 0 10px; + min-width: 150px; max-width: 200px; } @@ -103,13 +105,11 @@ } .message { - display: flex; margin-top: -40px; padding-top: 55px; } .message .info { - width: 130px; } .message .username { @@ -117,7 +117,8 @@ } .message .gravatar { - width: 80px; + width: 40px; + border-radius: 4px; display: block; margin: 0 auto; } @@ -130,6 +131,7 @@ border: 1px #999 solid; border-radius: 5px; flex: 1; + min-width: 200px; } .message .header { @@ -138,6 +140,11 @@ border-bottom: 1px solid #999; border-radius: 5px 5px 0 0; padding: 2px 7px; + display: inline-flex; + width: -webkit-fill-available; + } + + .message .send-time { text-align: right; } @@ -160,6 +167,15 @@ .new-message .submit, #edit-notes .submit { margin: 10px 0 0 auto; } + + .user-container { + display: inline-flex; + } + + .user-container .username { + padding-left: 0.5em; + padding-top: 1.65em; + } {% endblock %} @@ -316,6 +332,35 @@ {% block body %}
+
+
+ {% for message in ticket_messages %} + {% include "ticket/message.html" %} + {% endfor %} +
+
+
+ +
+
+ {% csrf_token %} + {% if form.non_field_errors() or form.body.errors %} +
+ {{ form.non_field_errors() }} + {{ form.body.errors }} +
+ {% endif %} +
{{ form.body }}
+ + +
+
+
- -
-
- {% for message in ticket_messages %} - {% include "ticket/message.html" %} - {% endfor %} -
-
-
- -
-
- {% csrf_token %} - {% if form.non_field_errors() or form.body.errors %} -
- {{ form.non_field_errors() }} - {{ form.body.errors }} -
- {% endif %} -
{{ form.body }}
- - -
-
-
{% endblock %}