diff --git a/Cargo.lock b/Cargo.lock index 6945ebe..e947b07 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -664,7 +664,7 @@ dependencies = [ [[package]] name = "libreddit" -version = "0.25.1" +version = "0.25.3" dependencies = [ "askama", "async-recursion", diff --git a/Cargo.toml b/Cargo.toml index c1b2548..1375851 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.25.1" +version = "0.25.3" authors = ["spikecodes <19519553+spikecodes@users.noreply.github.com>"] edition = "2021" @@ -31,3 +31,8 @@ once_cell = "1.16.0" [dev-dependencies] lipsum = "0.8.2" + +[profile.release] +codegen-units = 1 +lto = true +strip = true diff --git a/src/main.rs b/src/main.rs index 3b45bd2..25c2aea 100644 --- a/src/main.rs +++ b/src/main.rs @@ -289,7 +289,7 @@ async fn main() { Some("best" | "hot" | "new" | "top" | "rising" | "controversial") => subreddit::community(req).await, // Short link for post - Some(id) if (5..7).contains(&id.len()) => match canonical_path(format!("/{}", id)).await { + Some(id) if (5..8).contains(&id.len()) => match canonical_path(format!("/{}", id)).await { Ok(path_opt) => match path_opt { Some(path) => Ok(redirect(path)), None => error(req, "Post ID is invalid. It may point to a post on a community that has been banned.").await, diff --git a/static/style.css b/static/style.css index fa53a06..05c493a 100644 --- a/static/style.css +++ b/static/style.css @@ -1137,22 +1137,16 @@ summary.comment_data { } .prefs { - display: flex; - flex-direction: column; - justify-content: space-between; - padding: 20px; + padding: 10px 20px 20px; background: var(--post); border-radius: 5px; margin-bottom: 20px; } -.prefs > div { - display: flex; - justify-content: space-between; - width: 100%; - height: 35px; - align-items: center; - margin-top: 7px; +.prefs fieldset { + border: 0; + padding: 10px 0; + margin: 0 0 5px; } .prefs legend { @@ -1160,11 +1154,25 @@ summary.comment_data { border-bottom: 1px solid var(--highlighted); font-size: 18px; padding-bottom: 10px; + margin-bottom: 7px; + width: 100%; + float: left; /* places the legend inside the (invisible) border, instead of vertically centered on top border*/ } -.prefs legend:not(:first-child) { - padding-top: 10px; - margin-top: 15px; +.prefs-group { + display: flex; + width: 100%; + height: 35px; + align-items: center; + margin-top: 7px; +} + +.prefs-group > *:not(:last-child) { + margin-right: 1ch; +} + +.prefs-group > *:last-child { + margin-left: auto; } .prefs select { @@ -1182,7 +1190,8 @@ aside.prefs { background: var(--highlighted); padding: 10px 15px; border-radius: 5px; - margin-top: 20px; + margin-top: 5px; + width: 100% } input[type="submit"] { diff --git a/templates/base.html b/templates/base.html index 9139cff..dd882d8 100644 --- a/templates/base.html +++ b/templates/base.html @@ -48,7 +48,7 @@ - + code code diff --git a/templates/settings.html b/templates/settings.html index 6e4f016..530176e 100644 --- a/templates/settings.html +++ b/templates/settings.html @@ -11,76 +11,81 @@
- Appearance -
- - -
- Interface -
- - -
-
- - -
-
- - - -
- Content -
- - -
-
- - -
- {% if !crate::utils::sfw_only() %} -
- - - -
-
- - - -
- {% endif %} -
- - - -
-
-
+
+ + + +
+