Fix errant line breaks in landing page announcement view

This commit is contained in:
sudokoko 2024-03-29 23:17:01 -04:00
parent 0ee8970c64
commit da8322e01a
No known key found for this signature in database
GPG key ID: 248D68C664937395

View file

@ -66,19 +66,14 @@
<div>
<h3>@Model.LatestAnnouncement.Title</h3>
<div style="padding-bottom: 2em;">
@if (Model.LatestAnnouncement.Content.Length > 250)
{
<span style="white-space: pre-line">
@Model.LatestAnnouncement.Content[..250]...
<a href="@ServerConfiguration.Instance.ExternalUrl/notifications">read more</a>
</span>
}
else
{
<span style="white-space: pre-line">
@Model.LatestAnnouncement.Content
</span>
}
@if (Model.LatestAnnouncement.Content.Length > 250)
{
<span style="white-space: pre-line">@Model.LatestAnnouncement.Content[..250]...<a href="@ServerConfiguration.Instance.ExternalUrl/notifications">read more</a></span>
}
else
{
<span style="white-space: pre-line">@Model.LatestAnnouncement.Content</span>
}
</div>
@if (Model.LatestAnnouncement.Publisher != null)
{