Compare commits

..

6 Commits

Author SHA1 Message Date
36754136fd chore: Release
All checks were successful
Continuous integration / Check (push) Successful in 35s
Continuous integration / Test Suite (push) Successful in 40s
Continuous integration / Trunk (push) Successful in 37s
Continuous integration / Rustfmt (push) Successful in 31s
Continuous integration / build (push) Successful in 46s
Continuous integration / Disallow unused dependencies (push) Successful in 57s
2025-04-13 08:31:45 -07:00
489acccf77 web: force background color for code snippets 2025-04-13 08:31:20 -07:00
8ef4db63ad fix(deps): update rust crate clap to v4.5.36
All checks were successful
Continuous integration / Check (push) Successful in 37s
Continuous integration / Trunk (push) Successful in 38s
Continuous integration / Rustfmt (push) Successful in 31s
Continuous integration / Test Suite (push) Successful in 1m56s
Continuous integration / build (push) Successful in 47s
Continuous integration / Disallow unused dependencies (push) Successful in 3m44s
2025-04-11 20:46:39 +00:00
9f63205ff3 chore: Release
All checks were successful
Continuous integration / Check (push) Successful in 37s
Continuous integration / Test Suite (push) Successful in 40s
Continuous integration / Trunk (push) Successful in 37s
Continuous integration / Rustfmt (push) Successful in 31s
Continuous integration / build (push) Successful in 47s
Continuous integration / Disallow unused dependencies (push) Successful in 57s
2025-04-10 12:35:10 -07:00
5a0378948d web: apply title wrapping on search results page 2025-04-10 12:32:46 -07:00
2b4c45be74 web: conditionally wrap title when large words found 2025-04-10 12:16:53 -07:00
7 changed files with 47 additions and 25 deletions

32
Cargo.lock generated
View File

@@ -812,9 +812,9 @@ dependencies = [
[[package]]
name = "clap"
version = "4.5.35"
version = "4.5.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8aa86934b44c19c50f87cc2790e19f54f7a67aedb64101c2e1a2e5ecfb73944"
checksum = "2df961d8c8a0d08aa9945718ccf584145eee3f3aa06cddbeac12933781102e04"
dependencies = [
"clap_builder",
"clap_derive",
@@ -822,9 +822,9 @@ dependencies = [
[[package]]
name = "clap_builder"
version = "4.5.35"
version = "4.5.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2414dbb2dd0695280da6ea9261e327479e9d37b0630f6b53ba2a11c60c679fd9"
checksum = "132dbda40fb6753878316a489d5a1242a8ef2f0d9e47ba01c951ea8aa7d013a5"
dependencies = [
"anstream",
"anstyle",
@@ -1583,7 +1583,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e"
dependencies = [
"libc",
"windows-sys 0.59.0",
"windows-sys 0.52.0",
]
[[package]]
@@ -2930,7 +2930,7 @@ checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9"
dependencies = [
"hermit-abi 0.5.0",
"libc",
"windows-sys 0.59.0",
"windows-sys 0.52.0",
]
[[package]]
@@ -3001,7 +3001,7 @@ dependencies = [
[[package]]
name = "letterbox-notmuch"
version = "0.10.11"
version = "0.10.13"
dependencies = [
"itertools",
"log",
@@ -3016,14 +3016,14 @@ dependencies = [
[[package]]
name = "letterbox-procmail2notmuch"
version = "0.10.11"
version = "0.10.13"
dependencies = [
"anyhow",
]
[[package]]
name = "letterbox-server"
version = "0.10.11"
version = "0.10.13"
dependencies = [
"ammonia",
"anyhow",
@@ -3065,7 +3065,7 @@ dependencies = [
[[package]]
name = "letterbox-shared"
version = "0.10.11"
version = "0.10.13"
dependencies = [
"build-info",
"letterbox-notmuch",
@@ -3074,7 +3074,7 @@ dependencies = [
[[package]]
name = "letterbox-web"
version = "0.10.11"
version = "0.10.13"
dependencies = [
"build-info",
"build-info-build",
@@ -4480,7 +4480,7 @@ dependencies = [
"once_cell",
"socket2",
"tracing",
"windows-sys 0.59.0",
"windows-sys 0.52.0",
]
[[package]]
@@ -5193,7 +5193,7 @@ dependencies = [
"errno",
"libc",
"linux-raw-sys 0.4.15",
"windows-sys 0.59.0",
"windows-sys 0.52.0",
]
[[package]]
@@ -5206,7 +5206,7 @@ dependencies = [
"errno",
"libc",
"linux-raw-sys 0.9.3",
"windows-sys 0.59.0",
"windows-sys 0.52.0",
]
[[package]]
@@ -6299,7 +6299,7 @@ dependencies = [
"getrandom 0.3.2",
"once_cell",
"rustix 1.0.5",
"windows-sys 0.59.0",
"windows-sys 0.52.0",
]
[[package]]
@@ -7375,7 +7375,7 @@ version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
dependencies = [
"windows-sys 0.59.0",
"windows-sys 0.48.0",
]
[[package]]

View File

@@ -8,7 +8,7 @@ authors = ["Bill Thiede <git@xinu.tv>"]
edition = "2021"
license = "UNLICENSED"
publish = ["xinu"]
version = "0.10.11"
version = "0.10.13"
repository = "https://git.z.xinu.tv/wathiede/letterbox"
[profile.dev]

View File

@@ -47,8 +47,8 @@ urlencoding = "2.1.3"
#xtracing = { path = "../../xtracing" }
#xtracing = { git = "http://git-private.h.xinu.tv/wathiede/xtracing.git" }
xtracing = { version = "0.3.0", registry = "xinu" }
letterbox-notmuch = { version = "0.10.11", path = "../notmuch", registry = "xinu" }
letterbox-shared = { version = "0.10.11", path = "../shared", registry = "xinu" }
letterbox-notmuch = { version = "0.10.13", path = "../notmuch", registry = "xinu" }
letterbox-shared = { version = "0.10.13", path = "../shared", registry = "xinu" }
[build-dependencies]
build-info-build = "0.0.40"

View File

@@ -12,5 +12,5 @@ version.workspace = true
[dependencies]
build-info = "0.0.40"
letterbox-notmuch = { version = "0.10.11", path = "../notmuch", registry = "xinu" }
letterbox-notmuch = { version = "0.10.13", path = "../notmuch", registry = "xinu" }
serde = { version = "1.0.147", features = ["derive"] }

View File

@@ -33,8 +33,8 @@ wasm-bindgen = "=0.2.100"
uuid = { version = "1.13.1", features = [
"js",
] } # direct dep to set js feature, prevents Rng issues
letterbox-shared = { version = "0.10.11", path = "../shared", registry = "xinu" }
letterbox-notmuch = { version = "0.10.11", path = "../notmuch", registry = "xinu" }
letterbox-shared = { version = "0.10.13", path = "../shared", registry = "xinu" }
letterbox-notmuch = { version = "0.10.13", path = "../notmuch", registry = "xinu" }
seed_hooks = { version = "0.4.0", registry = "xinu" }
strum_macros = "0.27.1"

View File

@@ -273,6 +273,13 @@ fn search_results(
tags.remove(idx);
};
let is_unread = unread_idx.is_some();
let mut title_break = None;
const TITLE_LENGTH_WRAP_LIMIT: usize = 40;
for w in r.subject.split_whitespace() {
if w.len() > TITLE_LENGTH_WRAP_LIMIT {
title_break = Some(C!["break-all", "text-pretty"]);
}
}
div![
C![
"flex",
@@ -315,7 +322,7 @@ fn search_results(
attrs! {
At::Href => urls::thread(&tid)
},
div![&r.subject],
div![title_break, &r.subject],
span![C!["text-xs"], pretty_authors(&r.authors)],
div![
C!["flex", "flex-wrap", "justify-between"],
@@ -1097,11 +1104,18 @@ fn thread(
let unread_thread_id = thread.thread_id.clone();
let spam_add_thread_id = thread.thread_id.clone();
let spam_unread_thread_id = thread.thread_id.clone();
let mut title_break = None;
const TITLE_LENGTH_WRAP_LIMIT: usize = 40;
for w in subject.split_whitespace() {
if w.len() > TITLE_LENGTH_WRAP_LIMIT {
title_break = Some(C!["break-all", "text-pretty"]);
}
}
div![
C!["lg:p-4", "max-w-4xl"],
div![
C!["p-4", "lg:p-0"],
h3![C!["text-xl", "break-all", "text-pretty"], subject],
h3![C!["text-xl"], title_break, subject],
span![removable_tags_chiclet(&thread.thread_id, &tags)],
IF!(!catchup_mode => div![
C!["pt-4", "gap-2", "flex", "justify-around"],
@@ -1397,11 +1411,18 @@ fn news_post(
]
}
let mut title_break = None;
const TITLE_LENGTH_WRAP_LIMIT: usize = 40;
for w in subject.split_whitespace() {
if w.len() > TITLE_LENGTH_WRAP_LIMIT {
title_break = Some(C!["break-all", "text-pretty"]);
}
}
div![
C!["lg:p-4", "max-w-4xl"],
div![
C!["p-4", "lg:p-0"],
h3![C!["text-xl", "break-all", "text-pretty"], subject],
h3![C!["text-xl"], title_break, subject],
span![tag(format!("News/{}", post.slug))],
IF!(!catchup_mode => div![
C!["pt-4", "gap-2", "flex", "justify-around"],

View File

@@ -44,6 +44,7 @@ html {
.news-post code {
font-family: monospace;
white-space: break-spaces;
background-color: #eee !important;
}
.mail-thread blockquote {