Samasaur1 / samasaur1.github.io

the jekyll source for my website
https://samasaur1.github.io/
3 stars 0 forks source link

Add post-comment landing page #44

Closed Samasaur1 closed 9 months ago

Samasaur1 commented 9 months ago

Right now, when someone submits a comment (#32), it doesn't look like anything happens. There should be a landing page of some sort saying "comment pending"

Samasaur1 commented 9 months ago

https://github.com/Samasaur1/samasaur1.github.io/blob/e34642eb2704e422287b1e23650848991c92ae0f/_includes/comment-new.html#L4

Samasaur1 commented 9 months ago

I wonder if it's possible to have that redirect to #comment-pending, which is normally hidden but appears when linked to directly

Samasaur1 commented 9 months ago

Okay, it does now redirect to #comment-pending, which is just another entry in the list with the text "Your comment is now pending!"

I would like it if instead of static text, you see a preview of your comment. However, this will require a change to the comment reciever so that it sends back the comment information as query parameters

Samasaur1 commented 9 months ago

Note that the redirected URL needs to be https://samasaur1.github.io/blog/<post>?name=sam#comment-pending, with the query params before the URL fragment

Samasaur1 commented 9 months ago

The comment receiver still needs to send back query params

Samasaur1 commented 9 months ago

I actually managed to fully preview submitted comments solely via client-side JS, in the two commits linked above and 2dcada8721d825292cbfbb4e5b4f6dc0c813aaea