codewars / blog

The Codewars Blog
https://blog.codewars.com
MIT License
9 stars 3 forks source link

Feature request: mark new posts on the listing page #24

Open hobovsky opened 3 years ago

hobovsky commented 3 years ago

Listing page does not distinguish between old and new posts, making it difficult to spot whether new posts were published recently. Provide some visual clue that a post is new: newer than some time threshold, not read, or added after the last visit of a viewing user, or some other criteria.

kazk commented 3 years ago

I'll just leave some ideas on how to implement it for now.

newer than some time threshold

Use some JS and check the timestamps to set some class on the new ones.

not read

Style the visited link differently, so those styled normally are not read.

added after the last visit of a viewing user

Store the timestamp on visit and if there's anything set already, do something to the posts newer than the previous time. The previous one might be enough, though.