diff --git a/web/views/thread.templ b/web/views/thread.templ index 2820a5b..d81284f 100644 --- a/web/views/thread.templ +++ b/web/views/thread.templ @@ -106,7 +106,9 @@ templ PostOriginal(post database.Post, thread database.Thread) { { post.CreatedAt.Format("01/02/2006") } { post.CreatedAt.Format("15:04") } >%d\n'", post.Number) } + _={ fmt.Sprintf(` + on click set #newPostBody.value to #newPostBody.value + '>>%d\n' + then call #newPostBody.focus()`, post.Number) } class=" post-num" > No.{ strconv.Itoa(post.Number) } @@ -137,7 +139,10 @@ templ PostReply(post database.Post, threadContext ThreadContext) { { post.CreatedAt.Format("01/02/2006") } { post.CreatedAt.Format("15:04") } >%d\n'", post.Number) } + _={ fmt.Sprintf(` + on click set #newPostBody.value to #newPostBody.value + '>>%d\n' + then call smoothScrollTo('top') + then call #newPostBody.focus()`, post.Number) } class=" post-num" > No.{ strconv.Itoa(post.Number) }