diff options
| author | Joe Mou <dev@mou.fo> | 2026-08-27 14:08:06 -0400 |
|---|---|---|
| committer | Joe Mou <dev@mou.fo> | 2026-08-27 14:53:38 -0400 |
| commit | 4797a627f461204b289f95f61b64e3dab8bc00ff (patch) | |
| tree | a044ef3d0419c95aad9fa98a093e0c39bdce5459 /public | |
| parent | 7c928d30b16b37624841c4615c0d4bda426e4159 (diff) | |
Display PDF blobs
GitHub renders a PDF with a viewer of its own and so ships no content for
one, leaving the blob view with nothing to show. Its raw bytes come as
application/octet-stream, which browsers download rather than display, so
serve them from a new embed route that retypes them and point an <object>
at that.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BErPR92xppzGFXkPqXPYj2
Diffstat (limited to 'public')
| -rw-r--r-- | public/static/style.css | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/public/static/style.css b/public/static/style.css index ed64bc6..157cc15 100644 --- a/public/static/style.css +++ b/public/static/style.css @@ -276,6 +276,13 @@ body > footer { } } +object.pdf { + display: block; + width: 100%; + height: 80vh; + padding: 0; +} + pre.box { /* Instead of scrolling overflow for long lines, grow the box. */ width: fit-content; |
