aboutsummaryrefslogtreecommitdiff
path: root/lib/docs/index.html
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-07-22 20:56:59 -0700
committerGitHub <noreply@github.com>2022-07-22 20:56:59 -0700
commit7502e490cb83a91133aa696e4ec0936022bee0c6 (patch)
treee87e4bcdc01f312a0dcf401c959fd52830d0c56a /lib/docs/index.html
parentf591936480730a279d55a051f92806e19834faf7 (diff)
parent92966088c2679ef670dc9776408deee98d16486f (diff)
downloadzig-7502e490cb83a91133aa696e4ec0936022bee0c6.tar.gz
zig-7502e490cb83a91133aa696e4ec0936022bee0c6.zip
Merge pull request #12173 from ziglang/autodocs-rebased
New Autodocs!
Diffstat (limited to 'lib/docs/index.html')
-rw-r--r--lib/docs/index.html188
1 files changed, 121 insertions, 67 deletions
diff --git a/lib/docs/index.html b/lib/docs/index.html
index 61e3bb4ed2..03579d975e 100644
--- a/lib/docs/index.html
+++ b/lib/docs/index.html
@@ -26,25 +26,23 @@
--search-sh-color: rgba(0, 0, 0, 0.18);
--help-sh-color: rgba(0, 0, 0, 0.75);
}
-
+
html, body { margin: 0; padding:0; height: 100%; }
a {
text-decoration: none;
}
-
+
a:hover {
text-decoration: underline;
}
-
+
.hidden {
display: none;
}
/* layout */
.canvas {
- display: flex;
- flex-direction: column;
width: 100vw;
height: 100vh;
overflow: hidden;
@@ -55,21 +53,12 @@
background-color: var(--bg-color);
}
- .banner {
- background-color: darkred;
- text-align: center;
- color: white;
- padding: 15px 5px;
- }
-
- .banner a {
- color: bisque;
- text-decoration: underline;
- }
-
.flex-main {
display: flex;
- overflow-y: hidden;
+ width: 100%;
+ height: 100%;
+ justify-content: center;
+
z-index: 100;
}
@@ -87,7 +76,7 @@
overflow-wrap: break-word;
flex-shrink: 0;
flex-grow: 0;
-
+
z-index: 300;
}
@@ -97,7 +86,7 @@
-webkit-overflow-scrolling: touch;
flex-grow: 1;
flex-shrink: 1;
-
+
z-index: 200;
}
@@ -106,44 +95,44 @@
max-width: 85vw;
flex-shrink: 1;
}
-
+
.help-modal {
z-index: 400;
}
-
+
/* sidebar */
.sidebar {
font-size: 1rem;
background-color: var(--bg-color);
box-shadow: 0 0 1rem var(--sidebar-sh-color);
}
-
+
.sidebar .logo {
padding: 1rem 0.35rem 0.35rem 0.35rem;
}
-
+
.sidebar .logo > svg {
display: block;
overflow: visible;
}
-
+
.sidebar h2 {
margin: 0.5rem;
padding: 0;
font-size: 1.2rem;
}
-
+
.sidebar h2 > span {
border-bottom: 0.125rem dotted var(--tx-color);
}
-
+
.sidebar .packages {
list-style-type: none;
margin: 0;
padding: 0;
background-color: var(--sidebar-pkg-bg-color);
}
-
+
.sidebar .packages > li > a {
display: block;
padding: 0.5rem 1rem;
@@ -151,17 +140,17 @@
background-color: var(--sidebar-pkglnk-bg-color);
text-decoration: none;
}
-
+
.sidebar .packages > li > a:hover {
color: var(--sidebar-pkglnk-tx-color-hover);
background-color: var(--sidebar-pkglnk-bg-color-hover);
}
-
+
.sidebar .packages > li > a.active {
color: var(--sidebar-pkglnk-tx-color-active);
background-color: var(--sidebar-pkglnk-bg-color-active);
}
-
+
.sidebar p.str {
margin: 0.5rem;
font-family: var(--mono);
@@ -194,28 +183,28 @@
border-radius: 0;
-webkit-appearance: none;
}
-
+
.docs .search:focus {
background-color: var(--search-bg-color-focus);
border-bottom-color: #ffbb4d;
box-shadow: 0 0.3em 1em 0.125em var(--search-sh-color);
}
-
+
.docs .search::placeholder {
font-size: 1rem;
font-family: var(--ui);
color: var(--tx-color);
opacity: 0.5;
}
-
+
.docs a {
color: var(--link-color);
}
-
+
.docs p {
margin: 0.8rem 0;
}
-
+
.docs pre {
font-family: var(--mono);
font-size:1em;
@@ -223,19 +212,19 @@
padding:1em;
overflow-x: auto;
}
-
+
.docs code {
font-family: var(--mono);
font-size: 1em;
}
-
+
.docs h1 {
font-size: 1.4em;
margin: 0.8em 0;
padding: 0;
border-bottom: 0.0625rem dashed;
}
-
+
.docs h2 {
font-size: 1.3em;
margin: 0.5em 0;
@@ -275,7 +264,7 @@
#tableFnErrors dt {
font-weight: bold;
}
-
+
.examples {
list-style-type: none;
margin: 0;
@@ -286,7 +275,7 @@
white-space: nowrap;
overflow-x: auto;
}
-
+
.docs td {
margin: 0;
padding: 0.5em;
@@ -294,7 +283,7 @@
text-overflow: ellipsis;
overflow-x: hidden;
}
-
+
/* help dialog */
.help-modal {
display: flex;
@@ -319,23 +308,23 @@
border: 0.125rem solid #000;
box-shadow: 0 0.5rem 2.5rem 0.3rem var(--help-sh-color);
}
-
+
.help-modal h1 {
margin: 0.75em 2.5em 1em 2.5em;
font-size: 1.5em;
text-align: center;
}
-
+
.help-modal dt, .help-modal dd {
display: inline;
margin: 0 0.2em;
}
-
+
.help-modal dl {
margin-left: 0.5em;
margin-right: 0.5em;
}
-
+
.help-modal kbd {
display: inline-block;
padding: 0.3em 0.2em;
@@ -352,7 +341,14 @@
box-shadow: inset 0 -0.0625em 0 #c6cbd1;
cursor: default;
}
-
+
+ #listFns dt {
+ font-family: var(--mono);
+ }
+ .argBreaker {
+ display: none;
+ }
+
/* tokens */
.tok-kw {
color: #333;
@@ -382,10 +378,10 @@
color: #458;
font-weight: bold;
}
-
+
/* dark mode */
@media (prefers-color-scheme: dark) {
-
+
:root {
--tx-color: #bbb;
--bg-color: #111;
@@ -403,7 +399,7 @@
--search-sh-color: rgba(255, 255, 255, 0.28);
--help-sh-color: rgba(142, 142, 142, 0.5);
}
-
+
.docs pre {
background-color:#2A2A2A;
}
@@ -451,7 +447,7 @@
.tok-type {
color: #68f;
}
-
+
}
@media only screen and (max-width: 750px) {
@@ -523,34 +519,87 @@
min-width: calc(100% - 2.8rem);
}
}
+ .banner {
+ background-color: orange;
+ text-align: center;
+ color: black;
+ padding: 5px 5px;
+ }
+ .banner a {
+ color: black;
+ text-decoration: underline;
+ }
</style>
</head>
<body class="canvas">
- <div class="banner">These docs are experimental. <a href="https://kristoff.it/blog/zig-new-relationship-llvm/">Progress depends on the self-hosted compiler</a>, <a href="https://github.com/ziglang/zig/wiki/How-to-read-the-standard-library-source-code">consider reading the stdlib source in the meantime</a>.</div>
+ <div class="banner">
+ This is a beta autodoc build; expect bugs and missing information.
+ <a href="https://github.com/ziglang/zig/wiki/How-to-contribute-to-Autodoc">Report an Issue</a>,
+ <a href="https://github.com/ziglang/zig/wiki/How-to-contribute-to-Autodoc">Contribute</a>,
+ <a href="https://github.com/ziglang/zig/wiki/How-to-read-the-standard-library-source-code">Learn more about stdlib source code</a>.
+ </div>
<div class="flex-main">
<div class="flex-filler"></div>
<div class="flex-left sidebar">
<nav>
<div class="logo">
- <svg version="1.1" viewBox="0 0 150 80" xmlns="http://www.w3.org/2000/svg">
- <g fill="#f7a41d">
- <path d="m0,-0.08899l0,80l19,0l6,-10l12,-10l-17,0l0,-40l15,0l0,-20l-35,0zm40,0l0,20l62,0l0,-20l-62,0zm91,0l-6,10l-12,10l17,0l0,40l-15,0l0,20l35,0l0,-80l-19,0zm-83,60l0,20l62,0l0,-20l-62,0z" shape-rendering="crispEdges"></path>
- <path d="m37,59.91101l-18,20l0,-15l18,-5z"></path>
- <path d="m113,19.91101l18,-20l0,15l-18,5z"></path>
- <path d="m96.98,0.54101l36.28,-10.4l-80.29,89.17l-36.28,10.4l80.29,-89.17z"></path>
- </g>
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 140">
+ <g fill="#F7A41D">
+ <g>
+ <polygon points="46,22 28,44 19,30"/>
+ <polygon points="46,22 33,33 28,44 22,44 22,95 31,95 20,100 12,117 0,117 0,22" shape-rendering="crispEdges"/>
+ <polygon points="31,95 12,117 4,106"/>
+ </g>
+ <g>
+ <polygon points="56,22 62,36 37,44"/>
+ <polygon points="56,22 111,22 111,44 37,44 56,32" shape-rendering="crispEdges"/>
+ <polygon points="116,95 97,117 90,104"/>
+ <polygon points="116,95 100,104 97,117 42,117 42,95" shape-rendering="crispEdges"/>
+ <polygon points="150,0 52,117 3,140 101,22"/>
+ </g>
+ <g>
+ <polygon points="141,22 140,40 122,45"/>
+ <polygon points="153,22 153,117 106,117 120,105 125,95 131,95 131,45 122,45 132,36 141,22" shape-rendering="crispEdges"/>
+ <polygon points="125,95 130,110 106,117"/>
+ </g>
+ </g>
+ <style>
+ #text { fill: #121212 }
+ @media (prefers-color-scheme: dark) { #text { fill: #f2f2f2 } }
+ </style>
+ <g id="text">
+ <g>
+ <polygon points="260,22 260,37 229,40 177,40 177,22" shape-rendering="crispEdges"/>
+ <polygon points="260,37 207,99 207,103 176,103 229,40 229,37"/>
+ <polygon points="261,99 261,117 176,117 176,103 206,99" shape-rendering="crispEdges"/>
+ </g>
+ <rect x="272" y="22" shape-rendering="crispEdges" width="22" height="95"/>
+ <g>
+ <polygon points="394,67 394,106 376,106 376,81 360,70 346,67" shape-rendering="crispEdges"/>
+ <polygon points="360,68 376,81 346,67"/>
+ <path d="M394,106c-10.2,7.3-24,12-37.7,12c-29,0-51.1-20.8-51.1-48.3c0-27.3,22.5-48.1,52-48.1 c14.3,0,29.2,5.5,38.9,14l-13,15c-7.1-6.3-16.8-10-25.9-10c-17,0-30.2,12.9-30.2,29.5c0,16.8,13.3,29.6,30.3,29.6 c5.7,0,12.8-2.3,19-5.5L394,106z"/>
+ </g>
+ </g>
</svg>
+ </div>
+ <div id="sectMainPkg" class="hidden">
+ <h2><span>Main Package</span></h2>
+ <ul class="packages">
+ <li><a id="mainPkg" class="" href=""></a></li>
+ </ul>
</div>
<div id="sectPkgs" class="hidden">
- <h2><span>Packages</span></h2>
+ <h2><span>Dependencies</span></h2>
<ul id="listPkgs" class="packages"></ul>
</div>
<div id="sectInfo" class="hidden">
<h2><span>Zig Version</span></h2>
<p class="str" id="tdZigVer"></p>
- <h2><span>Target</span></h2>
- <p class="str" id="tdTarget"></p>
</div>
+ <div>
+ <input id="privDeclsBox" type="checkbox"/>
+ <label for="privDeclsBox">Internal Doc Mode</label>
+ </div>
</nav>
</div>
<div class="flex-right">
@@ -588,7 +637,6 @@
<div id="sectSearchResults" class="hidden">
<h2>Search Results</h2>
<ul id="listSearchResults"></ul>
- <p id="sectSearchAllResultsLink" class="hidden"><a href="">show all results</a></p>
</div>
<div id="sectSearchNoResults" class="hidden">
<h2>No Results Found</h2>
@@ -617,9 +665,7 @@
<div id="sectFns" class="hidden">
<h2>Functions</h2>
<div class="table-container">
- <table>
- <tbody id="listFns"></tbody>
- </table>
+ <dl id="listFns"></dl>
</div>
</div>
<div id="sectValues" class="hidden">
@@ -638,7 +684,15 @@
<h2>Examples</h2>
<ul id="listFnExamples" class="examples"></ul>
</div>
- </section>
+ <div id="sectTests" class="hidden">
+ <h2>Tests</h2>
+ <div class="table-container">
+ <table>
+ <tbody id="listTests"></tbody>
+ </table>
+ </div>
+ </div>
+ </section>
</div>
<div class="flex-filler"></div>
</div>