run TW LSP against .rs files, enforce canonical twcss

This commit is contained in:
2026-03-11 14:41:08 +01:00
parent f753fcf5b4
commit b0013f9962
5 changed files with 24 additions and 7 deletions

17
.zed/settings.json Normal file
View File

@@ -0,0 +1,17 @@
{
"languages": {
"Rust": {
"language_servers": ["rust-analyzer", "tailwindcss-language-server"],
},
},
"lsp": {
"tailwindcss-language-server": {
"settings": {
"includeLanguages": { "rust": "html" },
"experimental": {
"classRegex": [["class=\"([^\"]*)\"", "([\\w-:\\[\\]-]+)"]],
},
},
},
},
}

View File

@@ -18,13 +18,13 @@ pub fn quote(quote: &Quote) -> Markup {
p class="font-lora ml-6"{(line.content)} p class="font-lora ml-6"{(line.content)}
} }
@if show_author { @if show_author {
p class="text-sm italic ml-3 flex flex-row gap-[6px] text-neutral-400" { p class="text-sm italic ml-3 flex flex-row gap-1.5 text-neutral-400" {
"" (line.attribution.name) "" (line.attribution.name)
} }
} }
} }
} }
div class="flex flex-row text-neutral-400 mt-auto pt-4 text-sm items-center font-light text-xs" { div class="flex flex-row text-neutral-400 mt-auto pt-4 items-center font-light text-xs" {
p {(quote.timestamp.format("%d/%m/%Y %H:%M"))} p {(quote.timestamp.format("%d/%m/%Y %H:%M"))}
@if let Some(loc) = &quote.location { @if let Some(loc) = &quote.location {
span class="ml-3 scale-[.5]"{(PreEscaped(icons::MAP_PIN))} p { (loc) } span class="ml-3 scale-[.5]"{(PreEscaped(icons::MAP_PIN))} p { (loc) }

View File

@@ -45,7 +45,7 @@ pub async fn page(Query(q): Query<LoginMsg>, req: Request) -> Result<Response, A
div class="flex items-center w-full border border-neutral-200/25 rounded bg-neutral-950/50" { div class="flex items-center w-full border border-neutral-200/25 rounded bg-neutral-950/50" {
span class="pl-2 text-neutral-500 select-none" {"@"} span class="pl-2 text-neutral-500 select-none" {"@"}
input id="handle" name="handle" type="text" input id="handle" name="handle" type="text"
class="w-full bg-transparent pl-[2px] pr-1 py-1 outline-none"; class="w-full bg-transparent pl-0.5 pr-1 py-1 outline-none";
} }
label for="password" class="text-neutral-500 font-light mt-2" {"Password"} label for="password" class="text-neutral-500 font-light mt-2" {"Password"}

View File

@@ -71,7 +71,7 @@ pub async fn page(Path(id): Path<Uuid>, req: Request) -> Result<Response, AuthEr
(nav(Some(&u), req.uri().path())) (nav(Some(&u), req.uri().path()))
// banner // banner
div class="relative w-full h-48 sm:h-56 md:h-64 bg-gradient-to-b from-neutral-800 from-25% to-emerald-950 overflow-hidden" { div class="relative w-full h-48 sm:h-56 md:h-64 bg-linear-to-b from-neutral-800 from-25% to-emerald-950 overflow-hidden" {
div class="absolute bottom-0 left-0 right-0 h-px bg-neutral-500/50 --bg-gradient-to-r --from-transparent --via-neutral-500/50 --to-transparent" {} div class="absolute bottom-0 left-0 right-0 h-px bg-neutral-500/50 --bg-gradient-to-r --from-transparent --via-neutral-500/50 --to-transparent" {}
} }
@@ -113,7 +113,7 @@ pub async fn page(Path(id): Path<Uuid>, req: Request) -> Result<Response, AuthEr
span class="scale-[.7]" {(PreEscaped(icons::INFO))} span class="scale-[.7]" {(PreEscaped(icons::INFO))}
"About" "About"
} }
div class="border border-neutral-200/15 bg-neutral-200/[.03] rounded-lg p-4" { div class="border border-neutral-200/15 bg-neutral-200/3 rounded-lg p-4" {
@if is_own_profile { @if is_own_profile {
p class="text-neutral-500 italic text-sm leading-relaxed" { p class="text-neutral-500 italic text-sm leading-relaxed" {
"You haven't written a bio yet. Tell people a bit about yourself!" "You haven't written a bio yet. Tell people a bit about yourself!"
@@ -139,7 +139,7 @@ pub async fn page(Path(id): Path<Uuid>, req: Request) -> Result<Response, AuthEr
span class="scale-[.7]" {(PreEscaped(icons::CLIPBOARD_CLOCK))} span class="scale-[.7]" {(PreEscaped(icons::CLIPBOARD_CLOCK))}
"Details" "Details"
} }
div class="border border-neutral-200/15 bg-neutral-200/[.03] rounded-lg p-4 space-y-3" { div class="border border-neutral-200/15 bg-neutral-200/3 rounded-lg p-4 space-y-3" {
div { div {
p class="text-xs text-neutral-500 uppercase tracking-wide" {"Handle"} p class="text-xs text-neutral-500 uppercase tracking-wide" {"Handle"}
p class="text-sm text-neutral-300 mt-0.5" {"@" (user.handle)} p class="text-sm text-neutral-300 mt-0.5" {"@" (user.handle)}

File diff suppressed because one or more lines are too long