From: David ‘Bombe’ Roden Date: Thu, 11 Nov 2010 20:43:19 +0000 (+0100) Subject: Mark the “click to show” area if a hidden post is new. X-Git-Tag: 0.2.1~1 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=c86c161825115605e870e3b9fa8380080a8e0293 Mark the “click to show” area if a hidden post is new. --- diff --git a/src/main/resources/static/css/sone.css b/src/main/resources/static/css/sone.css index 9e33575..3358399 100644 --- a/src/main/resources/static/css/sone.css +++ b/src/main/resources/static/css/sone.css @@ -216,6 +216,10 @@ textarea { cursor: pointer; } +#sone .post .replies .click-to-show.new { + background-color: #ffffa0; +} + #sone .post .reply > .avatar { position: absolute; } diff --git a/src/main/resources/templates/include/head.html b/src/main/resources/templates/include/head.html index 8f7aa48..723f333 100644 --- a/src/main/resources/templates/include/head.html +++ b/src/main/resources/templates/include/head.html @@ -55,10 +55,15 @@ $("#sone .post .replies").each(function() { allReplies = $(this).find(".reply"); if (allReplies.length > 2) { + newHidden = false; for (replyIndex = 0; replyIndex < (allReplies.length - 2); ++replyIndex) { $(allReplies[replyIndex]).addClass("hidden"); + newHidden |= $(allReplies[replyIndex]).hasClass("new"); } clickToShowElement = $("
").addClass("click-to-show"); + if (newHidden) { + clickToShowElement.addClass("new"); + } (function(clickToShowElement, allReplies) { getTranslation("WebInterface.ClickToShow.Replies", function(text) { clickToShowElement.text(text);