Skip to content

Commit

Permalink
Fix errant line breaks in landing page announcement view
Browse files Browse the repository at this point in the history
  • Loading branch information
sudokoko committed Mar 30, 2024
1 parent 0ee8970 commit da8322e
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions ProjectLighthouse.Servers.Website/Pages/LandingPage.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit da8322e

Please sign in to comment.