diff options
| author | Ben Bridle <ben@derelict.engineering> | 2025-10-17 10:54:58 +1300 |
|---|---|---|
| committer | Ben Bridle <ben@derelict.engineering> | 2025-10-17 10:55:04 +1300 |
| commit | 46f8ada86b5d64bc6775076a215bdb9b02c0e5c9 (patch) | |
| tree | f6523c2266c60064a86dbd246f2f9491e2d0f14e | |
| parent | dc24d0a9ec2f66b4cd9926980fe14df295086f14 (diff) | |
| download | toaster-46f8ada86b5d64bc6775076a215bdb9b02c0e5c9.zip | |
Wrap each <video> element in a <figure>
This is needed to be able to center a video in the page.
| -rw-r--r-- | src/generate_html.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/generate_html.rs b/src/generate_html.rs index 41e0212..33158a5 100644 --- a/src/generate_html.rs +++ b/src/generate_html.rs @@ -225,7 +225,7 @@ pub fn document_to_html(page: &Page, website: &Website) -> String { "jpg"|"jpeg"|"png"|"webp"|"gif"|"tiff" => html!( "<figure><a href='{path}'><img src='{path}' alt='{label}' title='{label}' /></a></figure>"), "mp3"|"wav"|"m4a" => html!("<audio controls src='{path}'>{label}</audio>"), - "mp4"|"avi" => html!("<video controls src='{path}'>{label}</video>"), + "mp4"|"avi" => html!("<figure><video controls src='{path}'>{label}</video></figure>"), ext @ _ => warn!("Unrecognised extension for embedded file {path:?} with extension {ext:?} in page {from:?}"), } } |
