feat: hover on relative datetimes (#39)
Relative datetimes (e.g. "42m ago") are displayed for posts, comments, user pages, community cards, and site cards. This patch wraps these relative datetimes in a `<time>` tag which has a `title` attribute and an ISO 8601 `datetime` attribute. The `title` allows users to see a full, non-relative timestamp when hovering with the mouse.
This commit is contained in:
1 parent
baf5063279
commit
a72ce72f7f
1 file changed
+3
-1
@@ -35,4 +35,6 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
{formatRelativeDate(date)}
|
||||
<time datetime={date.toISOString()} title={date}>
|
||||
{formatRelativeDate(date)}
|
||||
</time>
|
||||
Reference in new issue
Block a user