authorgravatar for ian@ianjohnson.devIan Johnson <ian@ianjohnson.dev> 2023-09-04 00:52:37-04:00
committergravatar for kappaloris@gmail.comLoris Cro <kappaloris@gmail.com> 2023-09-09 19:48:18+02:00
log51d7700c8c8e81706e0d0313d853b8e989f8a4da
treeca21503675dc3087422d67feee92dafbb7744ed3
parent2f26b15995f1b92b696dce58c3145b77deb90d7c

Autodoc: tweak page layout

Closes #17011 Closes #17012 This commit allows the logo to scale more freely to fit its container, and removes some extra margins so that the content scroll bar is flush with the right side of the viewport.

1 files changed, 7 insertions(+), 15 deletions(-)

lib/docs/index.html+7-15
......@@ -70,7 +70,6 @@
7070 display: flex;
7171 flex-direction: column;
7272 justify-content: center;
73 margin: 0 1rem;
7473
7574 height: 100%;
7675 overflow: hidden;
......@@ -91,14 +90,12 @@
9190 }
9291
9392 .flex-left {
94 width: 12rem;
95 max-width: 15vw;
96 min-width: 9.5rem;
9793 overflow: auto;
9894 -webkit-overflow-scrolling: touch;
9995 overflow-wrap: break-word;
10096 flex-shrink: 0;
10197 flex-grow: 0;
98 margin-right: 0.5rem;
10299
103100 z-index: 300;
104101 }
......@@ -135,13 +132,11 @@
135132 }
136133
137134 .logo {
138 width: 168px;
139 margin-right: 1rem;
135 margin: 0.5rem;
140136 }
141137
142138 .logo > svg {
143139 display: block;
144 overflow: visible;
145140 }
146141
147142 ul.guides-api-switch {
......@@ -276,7 +271,7 @@
276271 .column {
277272 flex-basis: 0;
278273 flex-grow: 1;
279 min-width: 24rem;
274 min-width: min(24rem, 90%);
280275 }
281276
282277
......@@ -750,9 +745,6 @@
750745 padding-left: 1.4rem;
751746 padding-right: 1.4rem;
752747 }
753 .logo {
754 max-width: 6.5rem;
755 }
756748 .flex-main > .flex-filler {
757749 display: none;
758750 }
......@@ -951,7 +943,7 @@
951943 <a href="https://github.com/ziglang/zig/wiki/How-to-read-the-standard-library-source-code">Learn more about stdlib source code</a>.
952944 </div>
953945 <div id="main" class="flex-main">
954 <div class="flex-horizontal" style="justify-content: center;padding:0.5rem;">
946 <div class="flex-horizontal" style="justify-content: center; padding: 0 0.5rem;">
955947 <div class="flex-left">
956948 <div class="logo">
957949 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 140">
......@@ -1021,7 +1013,7 @@
10211013 </div>
10221014 </div>
10231015 </div>
1024 <div style="height:100%; overflow:hidden; margin: 0 1rem;">
1016 <div style="height:100%; overflow:hidden;">
10251017 <div id="sectSearchResults" class="docs hidden">
10261018 <details id="searchHelp">
10271019 <summary id="searchHelpSummary" class="normal">How to search effectively</summary>
......@@ -1084,7 +1076,7 @@
10841076 </ul>
10851077 <p>Press <kbd>?</kbd> to see keyboard shortcuts and <kbd>Esc</kbd> to return.</p>
10861078 </div>
1087 <div id="guides" class="flex-horizontal hidden" style="align-items:flex-start;height:100%;oveflow:hidden;">
1079 <div id="guides" class="flex-horizontal hidden" style="align-items:flex-start;height:100%;overflow:hidden;">
10881080 <div id="guidesMenu" class="sidebar">
10891081 <h2 id="guidesMenuTitle">Table of Contents</h2>
10901082 <div id="guideTocListEmpty" style="margin:0 1rem;"><i>No content to display.</i></div>
......@@ -1092,7 +1084,7 @@
10921084 </div>
10931085 <div id="activeGuide" class="hidden"></div>
10941086 </div>
1095 <div id="docs" class="hidden" style="align-items:flex-start;height:100%;oveflow:hidden;">
1087 <div id="docs" class="hidden" style="align-items:flex-start;height:100%;overflow:hidden;">
10961088 <section id="docs-scroll" class="docs">
10971089 <p id="status">Loading...</p>
10981090 <div id="fnProto" class="hidden">