Add reply highlighting

If a user hovers over a reply link, that reply is highlighted.
Obviously, this is only useful if the reply is on-screen.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2022-07-29 21:09:19 -07:00
parent b84ca6d84f
commit ede216789b
3 changed files with 22 additions and 7 deletions

View File

@@ -346,6 +346,16 @@ $(window).on("load", () => {
}
});
$(".post_link").on("mouseover", (e) => {
let postId = $(e.target).attr("data-post-id");
$("#p" + postId + ".post").addClass("post_highlight");
});
$(".post_link").on("mouseout", (e) => {
let postId = $(e.target).attr("data-post-id");
$("#p" + postId + ".post").removeClass("post_highlight");
});
$(".youtube_embed_link").on("click", (e) => {
e.preventDefault();
let fullEnt = $(e.target).parents(".youtube_embed");

View File

@@ -1,6 +1,7 @@
:root {
--body: #ededed;
--highlight: #555;
--highlight: #aaa;
--link: #555;
--border-color: #555;
--name: #060;
--quote: #595;
@@ -121,6 +122,10 @@ th {
float: right;
}
.post_highlight {
background-color: var(--highlight);
}
.thread {
background-color: var(--post-background);
padding: 10px;
@@ -169,9 +174,6 @@ th {
right: 0px;
}
/* Youtube embeds */
/* Spoilers */
.spoiler {
@@ -200,11 +202,11 @@ nav {
/* Misc */
a:link {
color: var(--highlight);
color: var(--link);
}
a:visited {
color: var(--highlight);
color: var(--link);
}
a:hover {