feat: added anker tags for posts and comments

Signed-off-by: limited_dev <loginakkisativ@gmail.com>
This commit is contained in:
limited_dev 2023-06-12 22:29:32 +02:00
parent 7f5a282058
commit 304c24f755
2 changed files with 35 additions and 5 deletions

View file

@ -71,9 +71,15 @@
}
else
{
<span class="threadMsg">
@line
</span>
@if (line.StartsWith("https://") || line.StartsWith("http://"))
{
<a href="@line" target="_blank">@line</a>
}
else
{
<span class="threadMsg">@line</span>
}
<span >&nbsp;</span>
}
<span>&nbsp;</span>
}

View file

@ -57,7 +57,19 @@
{
className = "greenText";
}
<span class='threadText @className'>@s&nbsp;</span>
@foreach (string s2 in s.Split(" "))
{
@if (s2.StartsWith("https://") || s.StartsWith("http://"))
{
<a href="@s2" target="_blank">@s2</a>
}
else
{
<span class="@className">@s2</span>
}
<span class="@className">&nbsp;</span>
}
<br/>
}
@if (post.Content.Split("\n").Length > 6)
{
@ -74,7 +86,19 @@
{
className = "greenText";
}
<span class='threadText @className'>@s&nbsp;</span>
@foreach (string s2 in s.Split(" "))
{
@if (s2.StartsWith("https://") || s2.StartsWith("http://"))
{
<a href="@s2" target="_blank">@s2</a>
}
else
{
<span class="@className">@s2</span>
}
<span class="@className">&nbsp;</span>
}
<br/>
}
}
</div>