From efd6f35192f1399f36a22dc51023fa2868e48a79 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 19 Nov 2023 19:02:13 +0100 Subject: [PATCH] Update Docs with iframe navigation (#6440) Signed-off-by: Glenn Jocher Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- docs/overrides/javascript/extra.js | 8 ++++++++ docs/overrides/stylesheets/style.css | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/docs/overrides/javascript/extra.js b/docs/overrides/javascript/extra.js index b3c6f9b714..d67fece53a 100644 --- a/docs/overrides/javascript/extra.js +++ b/docs/overrides/javascript/extra.js @@ -59,3 +59,11 @@ if (autoThemeInput) { } }); } + +// Add iframe navigation +window.onhashchange = function() { + window.parent.postMessage({ + type: 'navigation', + hash: window.location.pathname + window.location.search + window.location.hash + }, '*'); +}; diff --git a/docs/overrides/stylesheets/style.css b/docs/overrides/stylesheets/style.css index 908aa7caf4..386dd1c0e5 100644 --- a/docs/overrides/stylesheets/style.css +++ b/docs/overrides/stylesheets/style.css @@ -43,3 +43,8 @@ div.highlight { .md-grid { max-width: 1440px; } + +/* Language dropdown selector (default is shorter 200px in length) */ +body .md-select__inner { + max-height: 500px !important; +}