@if (showOpenThread)
{
[
- (@post.Comments.Count) View Thread
- ]
+ @toggleText
+ ]
}
- else
+ @post.Title
+ @post.Username
+ @if (post.User.Role != "User")
+ {
+ ##@post.User.Role
+ }
+
+ @getTimeFromUnix(post.CreatedAt)
+ No.@post.GET
+ @if (post.IsSticky)
{
- [
- @post.Comments.Count Comments
- ]
+
+ }
+ @if (post.IsLocked)
+ {
+
}
-}
+ @if (opened)
+ {
+
+
+
+ }
+
+ @if (@post.Image != null)
+ {
+ string isActiveClass = isActive ? "active" : "";
+ isActive = !isActive" class="@isActiveClass" src="@($"{@post.Image.ImageLocation}?size=258x258")" alt="No Image found" />
+ }
+ else
+ {
+ [No Image]
+ }
+
+
+ @if (showOpenThread)
+ {
+ @foreach (string s in post.Content.Split("\n").ToList().Take(6))
+ {
+ var className = "";
+ @if (s.StartsWith(">") && !Regex.IsMatch(s, "^>{2,}"))
+ {
+ className = "greenText";
+ }
+
+ @s
+ }
+ @if (post.Content.Split("\n").Length > 6)
+ {
+
+ [Open Thread to read more...] + } + } + else + { + @foreach (string s in post.Content.Split("\n")) + { + var className = ""; + @if (s.StartsWith(">") && !Regex.IsMatch(s, "^>{2,}")) + { + className = "greenText"; + } + + @s + } + } +
+ + [Open Thread to read more...] + } + } + else + { + @foreach (string s in post.Content.Split("\n")) + { + var className = ""; + @if (s.StartsWith(">") && !Regex.IsMatch(s, "^>{2,}")) + { + className = "greenText"; + } + + @s + } + } +