From 08aeac7c97f7d5b3d15b663c9dd509e16568bf26 Mon Sep 17 00:00:00 2001 From: ffont Date: Tue, 4 Jun 2024 16:12:33 +0200 Subject: [PATCH] Add ellipsis and word-wrap-break-word in a number of places This fixes some bugs with unusually long words. Closes #1758 --- freesound/static/bw-frontend/styles/modifiers/text.scss | 4 ++++ templates/forum/display_forum.html | 2 +- templates/forum/display_post.html | 2 +- templates/forum/display_thread.html | 2 +- templates/moderation/assign_sounds.html | 2 +- templates/moderation/display_ticket.html | 2 +- templates/sounds/pack.html | 4 ++-- templates/sounds/sound.html | 8 ++++---- 8 files changed, 15 insertions(+), 11 deletions(-) diff --git a/freesound/static/bw-frontend/styles/modifiers/text.scss b/freesound/static/bw-frontend/styles/modifiers/text.scss index 04373cef1..337702192 100644 --- a/freesound/static/bw-frontend/styles/modifiers/text.scss +++ b/freesound/static/bw-frontend/styles/modifiers/text.scss @@ -90,6 +90,10 @@ letter-spacing: 0; } +.word-wrap-break-word{ + word-wrap: break-word; +} + @for $i from 14 through 50 { .text-#{$i} { font-size: #{$i}px; diff --git a/templates/forum/display_forum.html b/templates/forum/display_forum.html index 7f0a852af..05f7fa5f0 100644 --- a/templates/forum/display_forum.html +++ b/templates/forum/display_forum.html @@ -20,7 +20,7 @@
{{ forum.name }}
{% bw_user_avatar forum.last_post.author.profile.locations.avatar.M.url forum.last_post.author.username 30 %}
-

by {{ forum.last_post.author.username }}

+

by {{ forum.last_post.author.username }}

{% endif %} diff --git a/templates/forum/display_post.html b/templates/forum/display_post.html index f6ddbbb4b..9065f85cd 100644 --- a/templates/forum/display_post.html +++ b/templates/forum/display_post.html @@ -18,7 +18,7 @@
{{ post. -
+
{% if show_post_location %}
diff --git a/templates/forum/display_thread.html b/templates/forum/display_thread.html index fba63d12c..0fdb43adb 100644 --- a/templates/forum/display_thread.html +++ b/templates/forum/display_thread.html @@ -12,7 +12,7 @@
{{ thread.title|safe }}
-

Started by {{ thread.author.username }} {{thread.first_post.created|timesince}} ago · {{ thread.num_posts|bw_intcomma }} repl{{ thread.num_posts|pluralize:"y,ies" }}

+

Started by {{ thread.author.username }} {{thread.first_post.created|timesince}} ago · {{ thread.num_posts|bw_intcomma }} repl{{ thread.num_posts|pluralize:"y,ies" }}

{% cache 86400 bw_thread_common_commenters thread.id %} diff --git a/templates/moderation/assign_sounds.html b/templates/moderation/assign_sounds.html index fc47e2fc7..71810fc0e 100644 --- a/templates/moderation/assign_sounds.html +++ b/templates/moderation/assign_sounds.html @@ -28,7 +28,7 @@

Unassigned sound tickets ({{ num_sounds_pending }})

{% bw_user_avatar item.user.profile.locations.avatar.L.url item.user.username 70 %}
-
+ -
+
diff --git a/templates/sounds/pack.html b/templates/sounds/pack.html index cc558fffa..2b34e61bc 100644 --- a/templates/sounds/pack.html +++ b/templates/sounds/pack.html @@ -16,7 +16,7 @@