From 345f8e7b80881ec62b349c554e9f66c2ba0bfce8 Mon Sep 17 00:00:00 2001 From: spikecodes <19519553+spikecodes@users.noreply.github.com> Date: Sun, 18 Jul 2021 14:53:08 -0700 Subject: [PATCH] Dampen title color of visited posts. Fixes #222 --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/main.rs | 2 +- static/style.css | 13 +++++++++++++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0ef9640..6768a97 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -609,7 +609,7 @@ checksum = "12b8adadd720df158f4d70dfe7ccc6adb0472d7c55ca83445f6a5ab3e36f8fb6" [[package]] name = "libreddit" -version = "0.14.10" +version = "0.14.11" dependencies = [ "askama", "async-recursion", diff --git a/Cargo.toml b/Cargo.toml index bb9a6cb..1275fe2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "libreddit" description = " Alternative private front-end to Reddit" license = "AGPL-3.0" repository = "https://github.com/spikecodes/libreddit" -version = "0.14.10" +version = "0.14.11" authors = ["spikecodes <19519553+spikecodes@users.noreply.github.com>"] edition = "2018" diff --git a/src/main.rs b/src/main.rs index 3046497..bd0ea43 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,7 @@ // Global specifiers #![forbid(unsafe_code)] #![warn(clippy::pedantic, clippy::all)] -#![allow(clippy::needless_pass_by_value, clippy::cast_possible_truncation, clippy::cast_possible_wrap, clippy::manual_find_map)] +#![allow(clippy::needless_pass_by_value, clippy::cast_possible_truncation, clippy::cast_possible_wrap, clippy::manual_find_map, clippy::unused_async)] // Reference local files mod post; diff --git a/static/style.css b/static/style.css index ef91fd8..7eb66a0 100644 --- a/static/style.css +++ b/static/style.css @@ -24,6 +24,7 @@ --post: #161616; --panel-border: 1px solid #333; --highlighted: #333; + --visited: #aaa; --shadow: 0 1px 3px rgba(0, 0, 0, 0.5); } @@ -39,6 +40,7 @@ --post: #eee; --panel-border: 1px solid #ccc; --highlighted: white; + --visited: #555; --shadow: 0 1px 3px rgba(0, 0, 0, 0.1); } } @@ -54,6 +56,7 @@ --post: #eee; --panel-border: 1px solid #ccc; --highlighted: white; + --visited: #555; --shadow: 0 1px 3px rgba(0, 0, 0, 0.1); } @@ -68,6 +71,7 @@ --post: black; --panel-border: 2px solid #0f0f0f; --highlighted: #0f0f0f; + --visited: #aaa; --shadow: 0 1px 3px rgba(0, 0, 0, 0.1); } @@ -82,6 +86,7 @@ --post: #44475a; --panel-border: 2px solid #44475a; --highlighted: #4e5267; + --visited: #969692; --shadow: 0 1px 3px rgba(0, 0, 0, 0.1); } @@ -96,6 +101,7 @@ --post: #434c5e; --panel-border: 2px solid #4c566a; --highlighted: #3b4252; + --visited: #a3a5aa; --shadow: 0 1px 3px rgba(0, 0, 0, 0.1); } @@ -110,6 +116,7 @@ --post: #3e3647; --panel-border: 2px solid #2f2738; --highlighted: #302a36; + --visited: #91889b; --shadow: 0 1px 3px rgba(0, 0, 0, 0.1); } @@ -124,6 +131,7 @@ --post: #181c3a; --panel-border: 1px solid #1F2347; --highlighted: #1F2347; + --visited: #aaa; --shadow: 0 2px 5px rgba(0, 0, 0, 0.5); } @@ -138,6 +146,7 @@ --post: #1b2936; --panel-border: 0px solid black; --highlighted: #234; + --visited: #aaa; --shadow: 0 2px 5px rgba(0, 0, 0, 0.5); } @@ -713,6 +722,10 @@ a.search_subreddit:hover { grid-area: post_title; } +.post:not(.highlighted) .post_title a:visited { + color: var(--visited); +} + .post_notification { grid-area: post_notification; margin: 5px 15px;