From 0b3f9c58454a7be4d50b79963c060a86469b7524 Mon Sep 17 00:00:00 2001 From: bburgess19 Date: Tue, 5 Dec 2023 11:22:43 -0600 Subject: [PATCH 01/10] Small push -- helping to fix merge conflict --- src/templates/forum/board_base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/templates/forum/board_base.html b/src/templates/forum/board_base.html index 538aed97..b36717a9 100644 --- a/src/templates/forum/board_base.html +++ b/src/templates/forum/board_base.html @@ -19,7 +19,7 @@ {% endblock css %} {% block body %} -
+
{% block breadcrumb %} From 95b22e0a31683d4bcec30362b5141caf5944ba0a Mon Sep 17 00:00:00 2001 From: giovannimhern Date: Tue, 5 Dec 2023 12:23:26 -0600 Subject: [PATCH 02/10] Redid the vote buttons --- .../0021_alter_tournament_matches.py | 17 +++++++++++++ .../migrations/0005_alter_user_username.py | 25 +++++++++++++++++++ .../forum_conversation/topic_detail.html | 18 ++++++++++--- 3 files changed, 56 insertions(+), 4 deletions(-) create mode 100644 src/chigame/games/migrations/0021_alter_tournament_matches.py create mode 100644 src/chigame/users/migrations/0005_alter_user_username.py diff --git a/src/chigame/games/migrations/0021_alter_tournament_matches.py b/src/chigame/games/migrations/0021_alter_tournament_matches.py new file mode 100644 index 00000000..a0cf1e24 --- /dev/null +++ b/src/chigame/games/migrations/0021_alter_tournament_matches.py @@ -0,0 +1,17 @@ +# Generated by Django 4.2.4 on 2023-12-05 04:24 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("games", "0020_merge_20231204_1517"), + ] + + operations = [ + migrations.AlterField( + model_name="tournament", + name="matches", + field=models.ManyToManyField(blank=True, related_name="tournament", to="games.match"), + ), + ] diff --git a/src/chigame/users/migrations/0005_alter_user_username.py b/src/chigame/users/migrations/0005_alter_user_username.py new file mode 100644 index 00000000..4124706c --- /dev/null +++ b/src/chigame/users/migrations/0005_alter_user_username.py @@ -0,0 +1,25 @@ +# Generated by Django 4.2.4 on 2023-12-05 04:24 + +import chigame.users.models +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("users", "0004_user_username"), + ] + + operations = [ + migrations.AlterField( + model_name="user", + name="username", + field=models.CharField( + blank=True, + max_length=255, + null=True, + unique=True, + validators=[chigame.users.models.validate_username], + verbose_name="username", + ), + ), + ] diff --git a/src/templates/forum_conversation/topic_detail.html b/src/templates/forum_conversation/topic_detail.html index cb811b33..b89fc8a8 100644 --- a/src/templates/forum_conversation/topic_detail.html +++ b/src/templates/forum_conversation/topic_detail.html @@ -77,13 +77,23 @@

{{ post.poster.forum_profile.signature.rendered }}
{% endif %} {# Vote buttons #} -
- - - + + +
{% if post.updates_count %}
From 7b118e6b42677a842382d1f641abb3f342409175 Mon Sep 17 00:00:00 2001 From: giovannimhern Date: Tue, 5 Dec 2023 12:25:42 -0600 Subject: [PATCH 03/10] Small syntax error fix --- src/templates/forum_conversation/topic_detail.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/templates/forum_conversation/topic_detail.html b/src/templates/forum_conversation/topic_detail.html index b89fc8a8..f53919dd 100644 --- a/src/templates/forum_conversation/topic_detail.html +++ b/src/templates/forum_conversation/topic_detail.html @@ -87,7 +87,7 @@

value="like"> Like - + - -

{% if post.updates_count %} @@ -152,6 +154,66 @@

+ {% endblock content %} From f2daceed3c1ba365e15d1b5e381e6b012c263d26 Mon Sep 17 00:00:00 2001 From: giovannimhern Date: Tue, 5 Dec 2023 14:57:49 -0600 Subject: [PATCH 05/10] Active selecting on buttons --- src/templates/forum_conversation/topic_detail.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/templates/forum_conversation/topic_detail.html b/src/templates/forum_conversation/topic_detail.html index 821fde01..298be654 100644 --- a/src/templates/forum_conversation/topic_detail.html +++ b/src/templates/forum_conversation/topic_detail.html @@ -266,7 +266,7 @@

{% endblock content %} From da437c19d0ea165899959dc9a6f5cda388d5dbfb Mon Sep 17 00:00:00 2001 From: bburgess19 Date: Tue, 5 Dec 2023 18:35:27 -0600 Subject: [PATCH 09/10] Use FA5 icons for Firefox compatability --- .../forum_conversation/topic_detail.html | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/templates/forum_conversation/topic_detail.html b/src/templates/forum_conversation/topic_detail.html index d891d06b..40d2e12a 100644 --- a/src/templates/forum_conversation/topic_detail.html +++ b/src/templates/forum_conversation/topic_detail.html @@ -84,14 +84,14 @@

data-user-rating="{{ post.user_rating }}" data-rating="{{ post.rating }}">

{% if post.updates_count %} @@ -159,9 +159,9 @@

resetVoteIconStyles(dislikeIcon); if (userRating === 1) { - updateUI(voteContainer, likeIcon, 'fa-regular', '', 0); + updateUI(voteContainer, likeIcon, 'far', '', 0); } else { - updateUI(voteContainer, likeIcon, 'fa-solid', 'rgb(53, 121, 246)', 1); + updateUI(voteContainer, likeIcon, 'fas', 'rgb(53, 121, 246)', 1); } } @@ -173,19 +173,19 @@

resetVoteIconStyles(likeIcon); if (userRating === -1) { - updateUI(voteContainer, dislikeIcon, 'fa-regular', '', 0); + updateUI(voteContainer, dislikeIcon, 'far', '', 0); } else { - updateUI(voteContainer, dislikeIcon, 'fa-solid', 'rgb(203, 68, 74)', -1); + updateUI(voteContainer, dislikeIcon, 'fas', 'rgb(203, 68, 74)', -1); } } function resetVoteIconStyles(button) { - button.removeClass('fa-solid').addClass('fa-regular').css('color', ''); + button.removeClass('fas').addClass('far').css('color', ''); } function updateUI(voteContainer, button, iconClass, color, rating) { - button.removeClass('fa-solid fa-regular').addClass(iconClass).css('color', color); + button.removeClass('fas far').addClass(iconClass).css('color', color); voteContainer.data('user-rating', rating); } @@ -237,13 +237,13 @@

if (userRating === 1) { updateUI(container, $(this).find('.like-button').find('i'), - 'fa-solid', + 'fas', 'rgb(53, 121, 246)', 1); } else if (userRating === -1) { updateUI(container, $(this).find('.dislike-button').find('i'), - 'fa-solid', + 'fas', 'rgb(203, 68, 74)', -1); } else { From 6b50ffcf1efef35215f22b6abec7a57a3bdc9db0 Mon Sep 17 00:00:00 2001 From: bburgess19 Date: Tue, 5 Dec 2023 19:11:12 -0600 Subject: [PATCH 10/10] Prevent like buttons from shifting (for reasonable vote numbers) --- src/templates/forum/board_base.html | 2 +- src/templates/forum_conversation/topic_detail.html | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/templates/forum/board_base.html b/src/templates/forum/board_base.html index b36717a9..538aed97 100644 --- a/src/templates/forum/board_base.html +++ b/src/templates/forum/board_base.html @@ -19,7 +19,7 @@ {% endblock css %} {% block body %} -
+
{% block breadcrumb %} diff --git a/src/templates/forum_conversation/topic_detail.html b/src/templates/forum_conversation/topic_detail.html index 40d2e12a..d73f28db 100644 --- a/src/templates/forum_conversation/topic_detail.html +++ b/src/templates/forum_conversation/topic_detail.html @@ -7,6 +7,15 @@ {% load forum_member_tags %} {% load forum_permission_tags %} +{% block css %} + {{ block.super }} + +{% endblock css %} {% block sub_title %} {{ topic.subject }} {% endblock sub_title %} @@ -86,7 +95,7 @@

- +