aboutsummaryrefslogtreecommitdiff
path: root/static/posts.html
diff options
context:
space:
mode:
authorKushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com>2021-08-18 17:34:12 -0300
committerKushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com>2021-08-18 17:34:12 -0300
commit727b5701327a7e1c5f826f496b8e99c2004e471a (patch)
treeba7db03ffa5abf5fb893303c7f8f36339f7998e2 /static/posts.html
parentd2cb70e8725371a72c0f9db36ad734041f4fb977 (diff)
experimental type change for times: string to time.Time
idk what i was doing before this but i wanted to use time.Time to get something similar to how 4chan's timestamps work, it would've also been easier for scripts to interface with it, since we have data we can work with much easier than a string i am not sure what this means for federation yet, so i'll test it out before i do anything.
Diffstat (limited to 'static/posts.html')
-rw-r--r--static/posts.html5
1 files changed, 4 insertions, 1 deletions
diff --git a/static/posts.html b/static/posts.html
index b9cac5e..eab6a99 100644
--- a/static/posts.html
+++ b/static/posts.html
@@ -45,7 +45,10 @@
}
</script>
{{ end }}
- <span class="subject"><b>{{ .Name }}</b></span><span class="name"><b>{{ if .AttributedTo }} {{.AttributedTo }} {{ else }} Anonymous {{ end }}</b></span><span class="tripcode"> {{ .TripCode }} </span><span>{{ .Published }} <a id="{{ .Id }}-anchor" href="/{{ $board.Name }}/{{ short $board.Actor.Outbox $opId }}#{{ short $board.Actor.Outbox .Id }}">No.</a> <a id="{{ .Id }}-link" title="{{ .Id }}" {{ if eq .Type "Note" }} href="javascript:quote('{{ $board.Actor.Id }}', '{{ $opId }}', '{{ .Id }}')" {{ end }}>{{ short $board.Actor.Outbox .Id }}</a> {{ if ne .Type "Tombstone" }}<a href="javascript:report('{{ $board.Actor.Id }}', '{{ .Id }}')">[Report]</a>{{ end }}</span>
+ <span class="subject"><b>{{ .Name }}</b></span>
+ <span class="name"><b>{{ if .AttributedTo }} {{.AttributedTo }} {{ else }} Anonymous {{ end }}</b></span>
+ <span class="tripcode"> {{ .TripCode }} </span>
+ <span>{{ .Published | timeToReadableLong }} <a id="{{ .Id }}-anchor" href="/{{ $board.Name }}/{{ short $board.Actor.Outbox $opId }}#{{ short $board.Actor.Outbox .Id }}">No.</a> <a id="{{ .Id }}-link" title="{{ .Id }}" {{ if eq .Type "Note" }} href="javascript:quote('{{ $board.Actor.Id }}', '{{ $opId }}', '{{ .Id }}')" {{ end }}>{{ short $board.Actor.Outbox .Id }}</a> {{ if ne .Type "Tombstone" }}<a href="javascript:report('{{ $board.Actor.Id }}', '{{ .Id }}')">[Report]</a>{{ end }}</span>
<p id="{{ .Id }}-content" style="white-space: pre-wrap; margin: 10px 30px 10px 30px;">{{ parseContent $board.Actor $opId .Content $thread }}</p>
{{ if .Replies }}
{{ $replies := .Replies }}