Disable wrapping in table cells, prefer ellipsis
This commit is contained in:
parent
b144efaa9b
commit
43f339e32b
@ -19,6 +19,10 @@
|
||||
border-radius: 0 0 var(--border-radius-lg,.5rem) var(--border-radius-lg,.5rem);
|
||||
}
|
||||
|
||||
.max-w-0 {
|
||||
max-width: 0;
|
||||
}
|
||||
|
||||
:root {
|
||||
--color-neutral-000: white;
|
||||
--color-neutral-50: #F8FAFC;
|
||||
|
@ -109,7 +109,7 @@
|
||||
<tbody>
|
||||
{% for location in stats.locations %}
|
||||
<tr>
|
||||
<td>{{location.location|default:"Unknown"|urldisplay}}</td>
|
||||
<td class="truncate w-full max-w-0">{{location.location|default:"Unknown"|urldisplay}}</td>
|
||||
<td class="rf">{{location.count|intcomma}}</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
@ -131,7 +131,7 @@
|
||||
<tbody>
|
||||
{% for referrer in stats.referrers %}
|
||||
<tr>
|
||||
<td>{{referrer.referrer|default:"Direct"|urldisplay}}</td>
|
||||
<td class="truncate w-full max-w-0">{{referrer.referrer|default:"Direct"|urldisplay}}</td>
|
||||
<td class="rf">{{referrer.count|intcomma}}</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
@ -153,7 +153,9 @@
|
||||
<tbody>
|
||||
{% for country in stats.countries %}
|
||||
<tr>
|
||||
<td><span class="{{country.country|flag_class}}"></span></span>{{country.country|country_name}}</td>
|
||||
<td class="truncate w-full max-w-0" title="{{country.country|country_name}}">
|
||||
<span class="{{country.country|flag_class}}"></span> {{country.country|country_name}}
|
||||
</td>
|
||||
<td class="rf">{{country.count|intcomma}}</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
@ -175,7 +177,9 @@
|
||||
<tbody>
|
||||
{% for os in stats.operating_systems %}
|
||||
<tr>
|
||||
<td class="flex items-center">{{os.os|iconify}}<span>{{os.os|default:"Unknown"}}</span></td>
|
||||
<td class="flex items-center truncate w-full max-w-0" title="{{os.os|default:'Unknown'}}">
|
||||
{{os.os|iconify}}<span>{{os.os|default:"Unknown"}}</span>
|
||||
</td>
|
||||
<td class="rf">{{os.count|intcomma}}</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
@ -197,7 +201,7 @@
|
||||
<tbody>
|
||||
{% for browser in stats.browsers %}
|
||||
<tr>
|
||||
<td class="flex items-center">
|
||||
<td class="flex items-center truncate w-full max-w-0" title="{{browser.browser|default:'Unknown'}}">
|
||||
{{browser.browser|iconify}}<span>{{browser.browser|default:"Unknown"}}</span></td>
|
||||
<td class="rf">{{browser.count|intcomma}}</td>
|
||||
</tr>
|
||||
@ -220,7 +224,7 @@
|
||||
<tbody>
|
||||
{% for device_type in stats.device_types %}
|
||||
<tr>
|
||||
<td>{{device_type.device_type|default:"Unknown"|title}}</td>
|
||||
<td class="truncate w-full max-w-0">{{device_type.device_type|default:"Unknown"|title}}</td>
|
||||
<td class="rf">{{device_type.count|intcomma}}</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
|
@ -181,7 +181,7 @@ def urldisplay(url):
|
||||
if url.startswith("http"):
|
||||
display_url = url.replace("http://", "").replace("https://", "")
|
||||
return SafeString(
|
||||
f"<a href='{url}' title='{url}' rel='nofollow' class='flex items-center'>{iconify(url)} {escape(display_url if len(display_url) < 40 else display_url[:40] + '...')}</a>"
|
||||
f"<a href='{url}' title='{url}' rel='nofollow' class='flex items-center mr-1'>{iconify(url)}<span class='truncate'>{escape(display_url)}</span></a>"
|
||||
)
|
||||
else:
|
||||
return url
|
||||
|
Loading…
Reference in New Issue
Block a user