basic behavior of filtering users added
This commit is contained in:
+4
-2
@@ -109,6 +109,7 @@
|
||||
{{ post_overrideLine := "" }}
|
||||
{{ post_overrideLink := "" }}
|
||||
{{ post_attach := nil }}
|
||||
{{ post_bozo := false }}
|
||||
{{ range i, p := posts }}
|
||||
{{ post_cur = p }}
|
||||
{{ post_userName = post_getUserName(p, .) }}
|
||||
@@ -116,6 +117,7 @@
|
||||
{{ post_overrideLine = post_getOverrideLine(p, .) }}
|
||||
{{ post_overrideLink = post_getOverrideLink(p, post_topicPermalink) }}
|
||||
{{ post_attach = post_getAttachmentInfo(p, .) }}
|
||||
{{ post_bozo = post_isBozo(p, post_topic, .) }}
|
||||
{{ include "singlepost.jet" }}
|
||||
{{ if advancedControls }}
|
||||
<div class="flex flex-col gap-2">
|
||||
@@ -129,8 +131,8 @@
|
||||
<a href="{{ topicListLink }}/op/{{ topicNum }}/scribble/{{ p.Num }}"
|
||||
class="bg-yellow-600 hover:bg-yellow-700 text-white px-3 py-2 rounded text-sm font-medium transition-colors whitespace-nowrap">Scribble</a>
|
||||
{{ end }}
|
||||
{{ if false }}{* TODO *}
|
||||
<a href="/TODO"
|
||||
{{ if !isAnon }}
|
||||
<a href="{{ post_stem }}?r={{ p.Num }}&ac=1&bozo=1"
|
||||
class="bg-blue-600 hover:bg-blue-700 text-white px-3 py-2 rounded text-sm font-medium transition-colors whitespace-nowrap">Filter User</a>
|
||||
{{ end }}
|
||||
{{ if canNuke }}
|
||||
|
||||
+30
-22
@@ -15,29 +15,37 @@
|
||||
title="Permalink to this post">🔗<{{ post_confRef }}.{{ post_cur.Num }}></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-2">
|
||||
<strong class="text-lg">{{ post_cur.Pseud | raw }}</strong>
|
||||
<span class="text-gray-600 text-sm ml-2">(<em>
|
||||
<a href="/user/{{ post_userName }}" target="_blank" class="text-blue-700 hover:text-blue-900">{{ post_userName }}</a>,
|
||||
{{ DisplayDateTime(post_cur.Posted, .) }}</em>)
|
||||
{{ if post_attach.Filename != "" }}
|
||||
<a href="/attachment/{{ post_cur.PostId }}" title="(Attachment {{ post_attach.Filename }} - {{ post_attach.Length }} bytes)"
|
||||
{{ if hasPrefix(post_attach.MIMEType, "text/") || hasPrefix(post_attach.MIMEType, "image/" )}}
|
||||
target="_blank"
|
||||
{{ end }}
|
||||
class="text-lg">📎</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
</div>
|
||||
{{ if post_overrideLine != "" }}
|
||||
<div class="mb-2">
|
||||
{{ if post_overrideLink != "" }}
|
||||
<a href="{{ post_overrideLink }}" target="_blank" class="text-blue-700 hover:text-blue-900"><span class="italic font-bold">{{ post_overrideLine }}</span></a>
|
||||
{{ else }}
|
||||
<span class="italic text-bold">{{ post_overrideLine }}</span>
|
||||
{{ end }}
|
||||
{{ if post_bozo }}
|
||||
<div class="mt-4 mb-2">
|
||||
<span class="italic font-bold">
|
||||
(User filtered; <a class="text-blue-700 hover:text-blue-900" href="{{ post_stem }}?r={{ post_cur.Num }}&ac=1&bozo=0">remove filter</a>)
|
||||
</span>
|
||||
</div>
|
||||
{{ else }}
|
||||
<pre class="amsPost font-mono text-sm whitespace-pre-wrap bg-gray-50 p-4 rounded border border-gray-200">{{ post_text | postRewrite | raw }}</pre>
|
||||
<div class="mb-2">
|
||||
<strong class="text-lg">{{ post_cur.Pseud | raw }}</strong>
|
||||
<span class="text-gray-600 text-sm ml-2">(<em>
|
||||
<a href="/user/{{ post_userName }}" target="_blank" class="text-blue-700 hover:text-blue-900">{{ post_userName }}</a>,
|
||||
{{ DisplayDateTime(post_cur.Posted, .) }}</em>)
|
||||
{{ if post_attach.Filename != "" }}
|
||||
<a href="/attachment/{{ post_cur.PostId }}" title="(Attachment {{ post_attach.Filename }} - {{ post_attach.Length }} bytes)"
|
||||
{{ if hasPrefix(post_attach.MIMEType, "text/") || hasPrefix(post_attach.MIMEType, "image/" )}}
|
||||
target="_blank"
|
||||
{{ end }}
|
||||
class="text-lg">📎</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
</div>
|
||||
{{ if post_overrideLine != "" }}
|
||||
<div class="mb-2">
|
||||
{{ if post_overrideLink != "" }}
|
||||
<a href="{{ post_overrideLink }}" target="_blank" class="text-blue-700 hover:text-blue-900"><span class="italic font-bold">{{ post_overrideLine }}</span></a>
|
||||
{{ else }}
|
||||
<span class="italic text-bold">{{ post_overrideLine }}</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ else }}
|
||||
<pre class="amsPost font-mono text-sm whitespace-pre-wrap bg-gray-50 p-4 rounded border border-gray-200">{{ post_text | postRewrite | raw }}</pre>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
@@ -25,15 +25,15 @@
|
||||
{{ post_overrideLine := "" }}
|
||||
{{ post_overrideLink := "" }}
|
||||
{{ post_attach := nil }}
|
||||
{{ post_bozo := false }}
|
||||
{{ range i, p := posts }}
|
||||
{{ m = map("post_cur", p, "post_userName", post_getUserName(p, .), "post_text", post_getText(p, .),
|
||||
"post_overrideLine", post_getOverrideLine(p, .), "post_overrideLink", post_getOverrideLink(p, post_topicPermalink)) }}
|
||||
{{ post_cur = p }}
|
||||
{{ post_userName = post_getUserName(p, .) }}
|
||||
{{ post_text = post_getText(p, .) }}
|
||||
{{ post_overrideLine = post_getOverrideLine(p, .) }}
|
||||
{{ post_overrideLink = post_getOverrideLink(p, post_topicPermalink) }}
|
||||
{{ post_attach = post_getAttachmentInfo(p, .) }}
|
||||
{{ post_bozo = post_isBozo(p, post_topic, .) }}
|
||||
{{ include "singlepost.jet" }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user