From bd24b8bdb3ffdd04b559adfe4210ee8ccc6eebdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Sat, 27 Apr 2024 12:19:16 +0200 Subject: [PATCH] Update meme voting --- lib/meme.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/meme.php b/lib/meme.php index d400c31..12484d5 100644 --- a/lib/meme.php +++ b/lib/meme.php @@ -36,19 +36,25 @@ function renderMeme(int $id, int $authorId, string $title, string $textContent, $meme_upvote_active = 'fill'; $meme_downvote_active = 'line'; $meme_vote_counter_class = 'positive'; + $meme_upvote_button_class = 'visual-hover'; + $meme_downvote_button_class = ''; } elseif (($meme_votes['UserVote'] < 0)) { $meme_upvote_active = 'line'; $meme_downvote_active = 'fill'; $meme_vote_counter_class = 'negative'; + $meme_upvote_button_class = ''; + $meme_downvote_button_class = 'visual-hover'; } else { $meme_downvote_active = 'line'; $meme_upvote_active = 'line'; $meme_vote_counter_class = 'neutral'; + $meme_upvote_button_class = ''; + $meme_downvote_button_class = ''; } - $meme_upvote = isLoggedIn() ? "" : ''; - $meme_downvote = isLoggedIn() ? "" : ''; + $meme_upvote = isLoggedIn() ? "" : ''; + $meme_downvote = isLoggedIn() ? "" : ''; $meme_out = str_replace('__TEMPLATE_MEME_VOTES_NUMBER__', strval($meme_net_votes), $meme_out); $meme_out = str_replace('__TEMPLATE_MEME_UPVOTE__', $meme_upvote, $meme_out);