From e30dda526148bcc128b50a4cbd0754dbd7f64e79 Mon Sep 17 00:00:00 2001 From: Tim van der Meij Date: Sat, 15 Jun 2024 15:11:37 +0200 Subject: [PATCH] Include the generated API documentation directly on the API page This should make the API documentation slightly quicker to access for users by removing an extra click. Moreover, it makes the API documentation blend in with the rest of the website/theme (one of the points in #6526). Fixes #18249. --- docs/contents/api/index.md | 4 +++- docs/contents/css/main.css | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/contents/api/index.md b/docs/contents/api/index.md index 0acb8d4f2..0c64ea811 100644 --- a/docs/contents/api/index.md +++ b/docs/contents/api/index.md @@ -6,4 +6,6 @@ slug: api # API -We're currently working on better API docs, but the API is well documented in [api.js](https://github.com/mozilla/pdf.js/blob/master/src/display/api.js). +The generated API documentation, from the inline comments in [api.js](https://github.com/mozilla/pdf.js/blob/master/src/display/api.js), is available below. + + diff --git a/docs/contents/css/main.css b/docs/contents/css/main.css index a97d05d47..46394a285 100644 --- a/docs/contents/css/main.css +++ b/docs/contents/css/main.css @@ -24,6 +24,12 @@ main { border-radius: 4px; padding: 10px; } + + iframe { + border: none; + height: calc(0.55 * 100vh); + width: 100%; + } } footer {