[frontend/components] Vertically align file attachments

This commit is contained in:
pancakes 2024-12-15 12:28:42 +10:00 committed by Laura Hausmann
parent 9499ee825b
commit 465d0b4c8b
No known key found for this signature in database
GPG key ID: D044E84C5BE01605
2 changed files with 11 additions and 8 deletions

View file

@ -27,12 +27,14 @@
} }
else else
{ {
<span class="attachment file @(BlurImage ? "blur-image" : "")"> <div class="attachment file @(BlurImage ? "blur-image" : "")">
<div class="contents">
<Icon Name="Icons.FileArrowDown" Size="3em"/> <Icon Name="Icons.FileArrowDown" Size="3em"/>
<a href="@Attachment.Url" target="_blank"> <a href="@Attachment.Url" target="_blank">
@Attachment.Url.Split("/").Last() @Attachment.Url.Split("/").Last()
</a> </a>
</span> </div>
</div>
} }
@if (!string.IsNullOrWhiteSpace(Attachment.AltText)) @if (!string.IsNullOrWhiteSpace(Attachment.AltText))

View file

@ -26,11 +26,12 @@ audio.attachment {
} }
.file { .file {
display: block; display: flex;
align-items: center;
padding: 1rem; padding: 1rem;
white-space: normal; white-space: normal;
> a { a {
text-decoration: none; text-decoration: none;
color: var(--notice-color); color: var(--notice-color);
word-break: break-word; word-break: break-word;