From 7889c41938d2e9d30030aec85fbe703c1fe91238 Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Sat, 6 Aug 2022 05:30:08 +0000 Subject: [PATCH] [libc] Website fixes (sidebar and mobile) Add "using" and "status" sections to the sidebar to make getting these easier. Fixed mobile formatting not overflow left and right. Tested: Chrome on Desktop, using mobile restrictions in devtools. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D131369 --- libc/docs/_static/custom.css | 22 ++++++++++++++++++---- libc/docs/index.rst | 24 ++++++++++++++++++------ 2 files changed, 36 insertions(+), 10 deletions(-) diff --git a/libc/docs/_static/custom.css b/libc/docs/_static/custom.css index e1e49f84c903..c2fcde78c781 100644 --- a/libc/docs/_static/custom.css +++ b/libc/docs/_static/custom.css @@ -6,10 +6,6 @@ div.document { width: 90%; } -div.body { - max-width: 90%; -} - div.note { padding: 20px 20px 10px 20px; } @@ -98,3 +94,21 @@ div.sphinxsidebar h3 { /* Hide Navigation. */ display: none; } + +@media screen and (min-width: 875px) { +div.body { + max-width: 90%; +} +} + +@media screen and (max-width: 875px) { +div.sphinxsidebar { + margin-left: 0px; + margin-right: 0px; +} + +div.body { + min-width: auto; + max-width: auto; +} +} diff --git a/libc/docs/index.rst b/libc/docs/index.rst index cee6a9bbe280..1ad00ad1d5ed 100644 --- a/libc/docs/index.rst +++ b/libc/docs/index.rst @@ -47,7 +47,23 @@ stages there is no ABI stability in any form. .. toctree:: :hidden: :maxdepth: 1 - :caption: Documentation + :caption: Using + + runtimes_build + +.. toctree:: + :hidden: + :maxdepth: 1 + :caption: Status + + strings + stdio + math + +.. toctree:: + :hidden: + :maxdepth: 1 + :caption: Development build_system clang_tidy_checks @@ -61,10 +77,6 @@ stages there is no ABI stability in any form. mechanics_of_public_api redirectors source_layout - strings - runtimes_build - stdio - math .. toctree:: :hidden: @@ -72,4 +84,4 @@ stages there is no ABI stability in any form. :caption: External Links Source Code - Bug Reports + Bug Reports