🚜 show avatar or icon

* If no image exists show fontawesome user icon
* Center controls

Issue: #438
This commit is contained in:
Greg Newman
2023-06-20 10:21:34 -04:00
parent b51ad7c781
commit 0d93a638a0
2 changed files with 37 additions and 2 deletions

View File

@@ -1283,6 +1283,22 @@ input[type=file] {
margin-left: 1rem;
}
.-mt-2 {
margin-top: -0.5rem;
}
.-mt-4 {
margin-top: -1rem;
}
.-mb-2 {
margin-bottom: -0.5rem;
}
.-mb-4 {
margin-bottom: -1rem;
}
.block {
display: block;
}
@@ -1824,6 +1840,14 @@ input[type=file] {
border-width: 0px;
}
.border-2 {
border-width: 2px;
}
.border-4 {
border-width: 4px;
}
.border-b {
border-bottom-width: 1px;
}
@@ -2129,6 +2153,11 @@ input[type=file] {
padding-bottom: 3.5rem;
}
.px-1 {
padding-left: 0.25rem;
padding-right: 0.25rem;
}
.pl-11 {
padding-left: 2.75rem;
}

View File

@@ -14,7 +14,7 @@
<!-- General filters, by news type -->
<div>
<div class="py-5 text-right w-[90%] mx-auto space-x-2">
<div class="py-5 text-center w-[90%] mx-auto space-x-2">
<div class="inline-block py-5">
{% url 'news' as target_url %}
<a href="{{ target_url }}" title="All News">
@@ -115,7 +115,13 @@
{% endif %}
</div>
<div class="mt-4 text-xs text-center w-[150px]">
<img src="{{ entry.author.image.url }}" alt="user" class="inline rounded-sm cursor-pointer w-[30px]" />
{% if entry.author.image.url %}
<img src="{{ entry.author.image.url }}" alt="user" class="inline rounded-sm w-[30px]" />
{% else %}
<span class="inline px-2 pt-3 pb-1 bg-white rounded-sm">
<i class="text-2xl fas fa-user"></i>
</span>
{% endif %}
</div>
{% if user.image %}
<div class="mt-4 text-xs text-center w-[150px]">