diff --git a/Cargo.lock b/Cargo.lock index f7cd33f..46f1a55 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1391,9 +1391,9 @@ checksum = "4d58d1b70b004888f764dfbf6a26a3b0342a1632d33968e4a179d8011c760614" [[package]] name = "libnghttp2-sys" -version = "0.1.4+1.41.0" +version = "0.1.5+1.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03624ec6df166e79e139a2310ca213283d6b3c30810c54844f307086d4488df1" +checksum = "9657455ff47889b70ffd37c3e118e8cdd23fd1f9f3293a285f141070621c4c79" dependencies = [ "cc", "libc", @@ -1401,7 +1401,7 @@ dependencies = [ [[package]] name = "libreddit" -version = "0.1.5" +version = "0.1.6" dependencies = [ "actix-web", "askama", diff --git a/Cargo.toml b/Cargo.toml index adea307..8b93c7f 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.1.5" +version = "0.1.6" authors = ["spikecodes <19519553+spikecodes@users.noreply.github.com>"] edition = "2018" diff --git a/README.md b/README.md index 80a4eed..a10f12a 100644 --- a/README.md +++ b/README.md @@ -45,9 +45,7 @@ Think Invidious but for Reddit. Watch your cat videos without being watched. - [x] Karma - [x] Description - [x] Post history - - [x] Post sorting - - [ ] Comment history - - [ ] Comment sorting + - [x] Comment history - [ ] Search - [ ] Post aggregating diff --git a/src/utils.rs b/src/utils.rs index addee1d..9e498b7 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -116,7 +116,7 @@ pub async fn fetch_posts(url: String, fallback_title: String) -> Result<(Vec 1000 { format!("{}k", score / 1000) } else { score.to_string() }, media: img, diff --git a/static/style.css b/static/style.css index bbf2444..e91089e 100644 --- a/static/style.css +++ b/static/style.css @@ -264,12 +264,12 @@ small { .comment { border-radius: 5px; - background: #151515; display: flex; + border: 2px solid #222; } .comment:hover { - background: #222; + background: #111; } .comment_left, .comment_right { @@ -279,10 +279,9 @@ small { .comment_left { text-align: center; - border-right: 2px solid #000; - border-radius: 5px 0px 0px 5px; min-width: 50px; padding: 5px; + align-items: flex-end; } .comment_title { @@ -290,7 +289,11 @@ small { } .comment_upvote { - display: none; + margin-top: 0.5em; + border-radius: 5px 5px 0px 0px; + background: #222; + width: 40px; + padding: 10px 0px 0px 0px; } .comment_subreddit { @@ -298,13 +301,16 @@ small { } .comment_score { - margin-top: 1em; color: aqua; + background: #222; + width: 40px; + padding: 5px 0px 10px 0px; + border-radius: 0px 0px 5px 5px; } .comment_right { word-wrap: anywhere; - padding: 20px 25px; + padding: 10px 25px 10px 10px; flex-grow: 1; flex-shrink: 1; } @@ -341,6 +347,15 @@ small { color: aqua; } +.post.comment { + background: #000; + border: 2px solid #222; +} + +.post.comment > .post_left { + background: black; +} + /* Tables */ table { diff --git a/templates/post.html b/templates/post.html index 36322ac..40b89e3 100644 --- a/templates/post.html +++ b/templates/post.html @@ -41,7 +41,6 @@

{{ comment.score }}

-

diff --git a/templates/user.html b/templates/user.html index b2520e4..6f50f01 100644 --- a/templates/user.html +++ b/templates/user.html @@ -25,7 +25,8 @@

{% for post in posts %} -
+ {% if post.title != "Comment" %} +

{{ post.score }}

@@ -50,6 +51,21 @@

+ {% else %} +
+
+ +

{{ post.score }}

+
+
+

+ COMMENT • Posted by u/{{ post.author }} + {{ post.time }} +

+

{{ post.body }}

+
+

+ {% endif %} {% endfor %} {% endblock %} \ No newline at end of file