From ac33be0a07d80c9aa8f227ff5f55f7c87ef4cc2a Mon Sep 17 00:00:00 2001 From: "Casper V. Kristensen" Date: Mon, 1 Jun 2020 18:07:11 +0200 Subject: [PATCH] Fix columns for small-width displays. --- drakul/raids/forms.py | 10 +++++----- drakul/raids/templates/raids/raid_change.html | 8 ++++---- drakul/raids/templates/raids/raid_detail.html | 8 +++----- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/drakul/raids/forms.py b/drakul/raids/forms.py index 5f6b34b..066d062 100644 --- a/drakul/raids/forms.py +++ b/drakul/raids/forms.py @@ -23,8 +23,8 @@ class RaidResponseForm(ModelForm): self.helper = FormHelper() self.helper.layout = Layout( Row( - Column("character", css_class="col-md-3"), - Column("role", css_class="col-md-2"), + Column("character", css_class="col-12 col-md-3"), + Column("role", css_class="col-12 col-md-2"), Column( StrictButton( "Sign Up" if not is_signed_up else "Change", @@ -33,7 +33,7 @@ class RaidResponseForm(ModelForm): value=RaidResponse.Status.SIGNED_UP, css_class=f"btn-block {'btn-success' if not is_signed_up else 'btn-primary'}" ), - css_class="col-md-3" + css_class="form-group col-md-3" ), Column( StrictButton( @@ -44,7 +44,7 @@ class RaidResponseForm(ModelForm): css_class="btn-warning btn-block", disabled=self.instance.pk and self.instance.status == RaidResponse.Status.BACKUP ), - css_class="col-md-2" + css_class="form-group col-md-2" ), Column( StrictButton( @@ -55,7 +55,7 @@ class RaidResponseForm(ModelForm): css_class="btn-danger btn-block", disabled=self.instance.pk and self.instance.status == RaidResponse.Status.SIGNED_OFF ), - css_class="col-md-2" + css_class="form-group col-md-2" ), css_class="form-row" ) diff --git a/drakul/raids/templates/raids/raid_change.html b/drakul/raids/templates/raids/raid_change.html index 6784672..23aaa87 100644 --- a/drakul/raids/templates/raids/raid_change.html +++ b/drakul/raids/templates/raids/raid_change.html @@ -20,7 +20,7 @@ {% crispy raid_response_formset raid_response_formset_helper %}
-
+
@@ -53,7 +53,7 @@
-
+
@@ -80,7 +80,7 @@

-
+
-
+
{% if response_form %}
-
+
{% crispy response_form %}
@@ -104,10 +104,8 @@
{% for comment in raid.comments.all %}
-
-

- {{ comment.user.main.name }} · {{ comment.date_created }} -

+
+
{{ comment.user.main.name }} · {{ comment.date_created }}

{{ comment.body | linebreaksbr }}