diff --git a/Cargo.lock b/Cargo.lock index aa590bd..28b0b40 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -572,7 +572,7 @@ checksum = "1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125" [[package]] name = "libreddit" -version = "0.21.1" +version = "0.21.2" dependencies = [ "askama", "async-recursion", diff --git a/Cargo.toml b/Cargo.toml index 7b92194..d4c6fd7 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.21.1" +version = "0.21.2" authors = ["spikecodes <19519553+spikecodes@users.noreply.github.com>"] edition = "2021" diff --git a/src/utils.rs b/src/utils.rs index 47f0a20..10af84f 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -548,7 +548,7 @@ pub fn format_url(url: &str) -> String { if url.is_empty() || url == "self" || url == "default" || url == "nsfw" || url == "spoiler" { String::new() } else { - Url::parse(url).map_or(String::new(), |parsed| { + Url::parse(url).map_or(url.to_string(), |parsed| { let domain = parsed.domain().unwrap_or_default(); let capture = |regex: &str, format: &str, segments: i16| { diff --git a/static/style.css b/static/style.css index 9752845..03c159a 100644 --- a/static/style.css +++ b/static/style.css @@ -876,7 +876,7 @@ a.search_subreddit:hover { #post_url { color: var(--accent); - margin: 5px 15px; + margin: 5px 12px; grid-area: post_media; } @@ -903,7 +903,7 @@ a.search_subreddit:hover { opacity: 0.5; font-size: 14px; grid-area: post_footer; - margin: 5px 20px 15px 15px; + margin: 5px 20px 15px 12px; } .post_comments { diff --git a/templates/post.html b/templates/post.html index 99a4065..db8e083 100644 --- a/templates/post.html +++ b/templates/post.html @@ -56,7 +56,7 @@ {% endif %}
- {{ post.title }} + {{ post.title }} {% if post.flair.flair_parts.len() > 0 %}