~aw/fishbb

858c675fa770b87a7bf528a911b0bc8b253fa1c5 — alex wennerberg a month ago 3892a9c
add time tooltips
4 files changed, 8 insertions(+), 6 deletions(-)

M TODO
M db.go
M views/forum.html
M views/thread.html
M TODO => TODO +2 -3
@@ 2,16 2,15 @@ Setup fishbb.org (cloud provider)

FEATURES:
rate limit registration
links on home and thread list should go to the post
proper page titles

Login/Reigster:
finish up oauth integration
admin/mod ability to delete / edit posts
ts hover to show full TS + Timestamp into a template snippet
Notifications (Including integration with PWA / browser API)
links on home and thread list should go to the post
Search
time is link
thread count on index.html

----- alpha waterline ----- (may push lower to get something more complete out)


M db.go => db.go +1 -1
@@ 121,7 121,7 @@ func prepareStatements(db *sql.DB) {
	stmtGetUsers = prepare(db, `
		select users.id,username,email,role,active,about,website,users.created, count(1)
		from users 
		join posts on users.id = posts.authorid
		left join posts on users.id = posts.authorid
		group by users.id
		order by active, role, username desc
		`)

M views/forum.html => views/forum.html +1 -1
@@ 16,7 16,7 @@
		<a class="title-link" href="/f/{{$.ForumSlug}}/{{.ID}}">{{.Title}}</a><br>
		<div class="flex-between">
		<div>
	  by <a href="/user/{{.Author.ID}}">{{.Author.Username}}</a> <span class="text-alt">{{ timeago .Created }}</span>
			by <a href="/user/{{.Author.ID}}">{{.Author.Username}}</a> <span class="text-alt" title="{{.Created}}">{{ timeago .Created }}</span>
		</div>
	  {{ if and $.User $.User.Role.ModLevel }}
	  <span>

M views/thread.html => views/thread.html +4 -1
@@ 10,16 10,19 @@
  <div class="post-meta">
	  <div>
  <img  style="vertical-align:middle" src="/a?a={{.Author.Username}}" width=18>
  <a href="/user/{{.Author.ID}}">{{.Author.Username}}</a> <a href="#{{.ID}}">#</a> <span class="text-alt">{{ timeago .Created}}
  <a href="/user/{{.Author.ID}}">{{.Author.Username}}</a> <a href="#{{.ID}}" title="Link to this post">#</a> <span class="text-alt" title="{{ .Created }}">{{ timeago .Created}}
	  {{ if .Edited }}<em>(edited {{timeago .Edited}})</em>{{end}}
</span>
	  </div>
	  <div>
		  {{ if or (eq .Author.ID $.User.UserID) $.User.Role.ModLevel }}
		  <a href="/post/{{.ID}}/edit">Edit</a>
		  <form style="display:inline" action="/post/{{.ID}}" method="POST">
			  <input type="hidden" name="_method" value="DELETE"><button class="link-button">Delete</button>
		<input type="hidden" name="CSRF" value="{{$.CSRFToken}}">
		  </form>
		  {{ end }}

	  </div>
  </div>
  <div class="post-body">