Inter, one file where WordPress listed two, and a pin heading on line
Inter (#11): the pages are set in Inter's variable font, served from the binary at /inter.woff2 as the icon is, with its OFL licence beside it in web/. Classic keeps Lucida Grande, the 2004 app's face. Double audio (#12): WordPress numbers each audio player on a page by adding ?_=N to its file's URL, so a post that embeds the file it encloses listed it twice, and it was downloaded twice. The parser keeps the first of an item's enclosures that differ only by that number. At startup the repeats already stored fold into the first; where only the repeat had been downloaded its file moves to the first rather than being deleted. Pin heading (#13): the rows' icon buttons kept the browser's side padding, which pushed their 16px icon 3px right of centre, and the heading's icon sat at the left of its column. Both are centred now, and the heading row takes the pixel of border the rows have, so every heading sits over its column. Closes #11, closes #12, closes #13. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
11
src/web.rs
11
src/web.rs
@@ -65,6 +65,7 @@ pub fn router(state: WebState) -> Router {
|
||||
.route("/login", get(login_page))
|
||||
.route("/api/login", post(login))
|
||||
.route("/icon.png", get(icon))
|
||||
.route("/inter.woff2", get(inter))
|
||||
.layer(middleware::from_fn(access_log))
|
||||
.with_state(state)
|
||||
}
|
||||
@@ -452,6 +453,16 @@ async fn icon() -> impl IntoResponse {
|
||||
)
|
||||
}
|
||||
|
||||
/// Inter, the pages' typeface, served from the binary as the icon is, so neither page loads
|
||||
/// anything from anyone else. Outside the auth layer for the sign-in page. Its licence, the SIL
|
||||
/// Open Font License, is web/Inter-LICENSE.txt.
|
||||
async fn inter() -> impl IntoResponse {
|
||||
(
|
||||
[(header::CONTENT_TYPE, "font/woff2"), (header::CACHE_CONTROL, "max-age=604800")],
|
||||
include_bytes!("../web/InterVariable.woff2").as_slice(),
|
||||
)
|
||||
}
|
||||
|
||||
fn constant_time_eq(a: &str, b: &str) -> bool {
|
||||
let (a, b) = (a.as_bytes(), b.as_bytes());
|
||||
if a.len() != b.len() {
|
||||
|
||||
Reference in New Issue
Block a user