user tables: add float plus margins to replace whitespace (#130)

Kindly,

In most pages where there are tables containing usernames, there is a space between the user icon and the username that gets underlined on hover. It happens in most tables in this app (applies both to rdrama and WPD). That automatic whitepace appears to come from the usual HTML default space between inline elements. The alternative is to change inheritence but appears cumbersome.

This PR fixes that.

Affected pages (those that render user_in_table.html):

./files/templates/admin/alts.html
./files/templates/admin/loggedin.html
./files/templates/admin/lottery.html
./files/templates/admin/patrons.html
./files/templates/admin/shadowbanned.html
./files/templates/admins.html
./files/templates/banned.html
./files/templates/chuds.html
./files/templates/grassed.html
./files/templates/hats.html
./files/templates/leaderboard.html
./files/templates/marseys.html
./files/templates/poll_votes.html
./files/templates/settings/security.html
./files/templates/special/worldcup22_leaderboard.html
./files/templates/sub/blockers.html
./files/templates/sub/exilees.html
./files/templates/sub/mods.html
./files/templates/userpage/blockers.html
./files/templates/userpage/followers.html
./files/templates/userpage/following.html
./files/templates/userpage/views.html
./files/templates/userpage/voters.html
./files/templates/votes.html

Thanks,
Granny

Reviewed-on: #130
Co-authored-by: mummified-corroding-granny <mummified-corroding-granny@noreply.fsdfsd.net>
Co-committed-by: mummified-corroding-granny <mummified-corroding-granny@noreply.fsdfsd.net>
pull/131/head
mummified-corroding-granny 2023-02-21 14:21:45 +00:00 committed by Aevann
parent c31019e65a
commit c51261aab3
2 changed files with 4 additions and 1 deletions

View File

@ -2360,6 +2360,9 @@ a.bg-light:hover, a.bg-light:focus, button.bg-light:hover, button.bg-light:focus
.float-right {
float: right !important;
}
.float-left {
float: left !important;
}
.overflow-auto {
overflow: auto !important;
}

View File

@ -1,7 +1,7 @@
{%- include 'admin/shadowbanned_tooltip.html' -%}
{% if user %}
<a data-sort-key="{{user.username.lower()}}" style="color:#{{user.name_color}};font-weight:bold" href="/@{{user.username}}">
<div class="profile-pic-20-wrapper mb-2">
<div class="profile-pic-20-wrapper mb-2 mr-1 float-left">
<img loading="lazy" src="{{user.profile_url}}" class="pp20">
{% if user.hat_active(v)[0] -%}
<img class="profile-pic-20-hat hat" loading="lazy" src="{{user.hat_active(v)[0]}}?h=7" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{user.hat_active(v)[1]}}">