fix: image floats, link color metadata

This commit is contained in:
trisua 2025-07-25 18:06:29 -04:00
parent dbd70d9592
commit 06b0aa0b4c
9 changed files with 43 additions and 14 deletions

View file

@ -52,6 +52,10 @@ fn default_context(data: &DataClient, build_code: &str) -> Context {
"name",
&std::env::var("NAME").unwrap_or("Attobin".to_string()),
);
ctx.insert(
"theme_color",
&std::env::var("THEME_COLOR").unwrap_or("#fbc27f".to_string()),
);
ctx.insert("tetratto", &data.host);
ctx.insert(
"what_page_slug",
@ -257,7 +261,10 @@ async fn render_request(Json(req): Json<RenderMarkdown>) -> impl IntoResponse {
return Html(e.to_string());
}
Html(crate::markdown::render_markdown(&req.content) + &metadata.css())
Html(
crate::markdown::render_markdown(&req.content)
+ &format!("<div id=\"metadata_css\">{}</div>", metadata.css()),
)
}
async fn exists_request(