| ... | ... | @@ -5,118 +5,127 @@ |
| 5 | 5 | <title>Documentation - Zig</title> |
| 6 | 6 | <link rel="icon" href="favicon.png"> |
| 7 | 7 | <style type="text/css"> |
| 8 | | body { |
| 9 | | font-family: system-ui, -apple-system, Roboto, "Segoe UI", sans-serif; |
| 10 | | max-width: 60em; |
| 11 | | } |
| 12 | | .hidden { |
| 13 | | display: none; |
| 8 | body { |
| 9 | font-family: system-ui, -apple-system, Roboto, "Segoe UI", sans-serif; |
| 10 | max-width: 60em; |
| 11 | } |
| 12 | .hidden { |
| 13 | display: none; |
| 14 | } |
| 15 | a { |
| 16 | color: #2A6286; |
| 17 | } |
| 18 | pre{ |
| 19 | font-family:"Source Code Pro",monospace; |
| 20 | font-size:1em; |
| 21 | background-color:#F5F5F5; |
| 22 | padding:1em; |
| 23 | overflow-x: auto; |
| 24 | } |
| 25 | nav { |
| 26 | width: 10em; |
| 27 | position: fixed; |
| 28 | left: 0; |
| 29 | top: 0; |
| 30 | height: 100vh; |
| 31 | overflow: auto; |
| 32 | } |
| 33 | nav h2 { |
| 34 | font-size: 1.2em; |
| 35 | text-decoration: underline; |
| 36 | margin: 0; |
| 37 | padding: 0.5em 0; |
| 38 | text-align: center; |
| 39 | } |
| 40 | nav p { |
| 41 | margin: 0; |
| 42 | padding: 0; |
| 43 | text-align: center; |
| 44 | } |
| 45 | section { |
| 46 | margin-left: 10em; |
| 47 | } |
| 48 | section h1 { |
| 49 | border-bottom: 1px dashed; |
| 50 | } |
| 51 | section h2 { |
| 52 | font-size: 1.3em; |
| 53 | margin: 0.5em 0; |
| 54 | padding: 0; |
| 55 | border-bottom: 1px solid; |
| 56 | } |
| 57 | #listNav { |
| 58 | list-style-type: none; |
| 59 | margin: 0.5em 0 0 0; |
| 60 | padding: 0; |
| 61 | overflow: hidden; |
| 62 | background-color: #333; |
| 63 | } |
| 64 | #listNav li { |
| 65 | float:left; |
| 66 | } |
| 67 | #listNav li a { |
| 68 | display: block; |
| 69 | color: #fff; |
| 70 | text-align: center; |
| 71 | padding: .5em .8em; |
| 72 | text-decoration: none; |
| 73 | } |
| 74 | #listNav li a:hover { |
| 75 | background-color: #111; |
| 76 | } |
| 77 | #listNav li a.active { |
| 78 | background-color: #4CAF50; |
| 79 | } |
| 80 | |
| 81 | #listPkgs { |
| 82 | list-style-type: none; |
| 83 | margin: 0; |
| 84 | padding: 0; |
| 85 | background-color: #f1f1f1; |
| 86 | } |
| 87 | #listPkgs li a { |
| 88 | display: block; |
| 89 | color: #000; |
| 90 | padding: 8px 16px; |
| 91 | text-decoration: none; |
| 92 | } |
| 93 | #listPkgs li a:hover { |
| 94 | background-color: #555; |
| 95 | color: #fff; |
| 96 | } |
| 97 | |
| 98 | #logo { |
| 99 | width: 8em; |
| 100 | padding: 0.5em 1em; |
| 101 | } |
| 102 | |
| 103 | #search { |
| 104 | width: 100%; |
| 105 | } |
| 106 | |
| 107 | @media (prefers-color-scheme: dark) { |
| 108 | body{ |
| 109 | background-color: #111; |
| 110 | color: #bbb; |
| 14 | 111 | } |
| 15 | 112 | a { |
| 16 | | color: #2A6286; |
| 113 | color: #88f; |
| 17 | 114 | } |
| 18 | 115 | pre{ |
| 19 | | font-family:"Source Code Pro",monospace; |
| 20 | | font-size:1em; |
| 21 | | background-color:#F5F5F5; |
| 22 | | padding:1em; |
| 23 | | overflow-x: auto; |
| 24 | | } |
| 25 | | nav { |
| 26 | | width: 10em; |
| 27 | | position: fixed; |
| 28 | | left: 0; |
| 29 | | top: 0; |
| 30 | | height: 100vh; |
| 31 | | overflow: auto; |
| 32 | | } |
| 33 | | nav h2 { |
| 34 | | font-size: 1.2em; |
| 35 | | text-decoration: underline; |
| 36 | | margin: 0; |
| 37 | | padding: 0.5em 0; |
| 38 | | text-align: center; |
| 39 | | } |
| 40 | | nav p { |
| 41 | | margin: 0; |
| 42 | | padding: 0; |
| 43 | | text-align: center; |
| 44 | | } |
| 45 | | section { |
| 46 | | margin-left: 10em; |
| 47 | | } |
| 48 | | #listNav { |
| 49 | | list-style-type: none; |
| 50 | | margin: 0.5em 0 0 0; |
| 51 | | padding: 0; |
| 52 | | overflow: hidden; |
| 53 | | background-color: #333; |
| 54 | | } |
| 55 | | #listNav li { |
| 56 | | float:left; |
| 57 | | } |
| 58 | | #listNav li a { |
| 59 | | display: block; |
| 60 | | color: #fff; |
| 61 | | text-align: center; |
| 62 | | padding: .5em .8em; |
| 63 | | text-decoration: none; |
| 64 | | } |
| 65 | | #listNav li a:hover { |
| 66 | | background-color: #111; |
| 116 | background-color:#2A2A2A; |
| 67 | 117 | } |
| 68 | | #listNav li a.active { |
| 69 | | background-color: #4CAF50; |
| 70 | | } |
| 71 | | |
| 72 | 118 | #listPkgs { |
| 73 | | list-style-type: none; |
| 74 | | margin: 0; |
| 75 | | padding: 0; |
| 76 | | background-color: #f1f1f1; |
| 119 | background-color: #333; |
| 77 | 120 | } |
| 78 | 121 | #listPkgs li a { |
| 79 | | display: block; |
| 80 | | color: #000; |
| 81 | | padding: 8px 16px; |
| 82 | | text-decoration: none; |
| 122 | color: #fff; |
| 83 | 123 | } |
| 84 | 124 | #listPkgs li a:hover { |
| 85 | | background-color: #555; |
| 86 | | color: #fff; |
| 87 | | } |
| 88 | | |
| 89 | | #logo { |
| 90 | | width: 8em; |
| 91 | | padding: 0.5em 1em; |
| 92 | | } |
| 93 | | |
| 94 | | #search { |
| 95 | | width: 100%; |
| 96 | | } |
| 97 | | |
| 98 | | @media (prefers-color-scheme: dark) { |
| 99 | | body{ |
| 100 | | background-color: #111; |
| 101 | | color: #bbb; |
| 102 | | } |
| 103 | | a { |
| 104 | | color: #88f; |
| 105 | | } |
| 106 | | pre{ |
| 107 | | background-color:#2A2A2A; |
| 108 | | } |
| 109 | | #listPkgs { |
| 110 | | background-color: #333; |
| 111 | | } |
| 112 | | #listPkgs li a { |
| 113 | | color: #fff; |
| 114 | | } |
| 115 | | #listPkgs li a:hover { |
| 116 | | background-color: #555; |
| 117 | | color: #fff; |
| 118 | | } |
| 125 | background-color: #555; |
| 126 | color: #fff; |
| 119 | 127 | } |
| 128 | } |
| 120 | 129 | </style> |
| 121 | 130 | </head> |
| 122 | 131 | <body> |
| ... | ... | @@ -141,18 +150,25 @@ |
| 141 | 150 | <div id="fnProto" class="hidden"> |
| 142 | 151 | <pre id="fnProtoCode"></pre> |
| 143 | 152 | </div> |
| 153 | <h1 id="hdrName" class="hidden"></h1> |
| 144 | 154 | <div id="fnDocs" class="hidden"></div> |
| 145 | | <div id="sectSearchResults" class="hidden"><ul id="listSearchResults"></ul></div> |
| 146 | | <div id="sectSearchNoResults" class="hidden"><p>No search results.</p></div> |
| 155 | <div id="sectSearchResults" class="hidden"> |
| 156 | <h2>Search Results</h2> |
| 157 | <ul id="listSearchResults"></ul> |
| 158 | </div> |
| 159 | <div id="sectSearchNoResults" class="hidden"> |
| 160 | <h2>No Results Found</h2> |
| 161 | <p>Press escape to exit search and then '?' to see more options.</p> |
| 162 | </div> |
| 147 | 163 | <div id="sectTypes" class="hidden"> |
| 148 | | <h2>Types</h2> |
| 149 | | <ul id="listTypes"> |
| 150 | | </ul> |
| 164 | <h2>Types</h2> |
| 165 | <ul id="listTypes"> |
| 166 | </ul> |
| 151 | 167 | </div> |
| 152 | 168 | <div id="sectFns" class="hidden"> |
| 153 | | <h2>Functions</h2> |
| 154 | | <ul id="listFns"> |
| 155 | | </ul> |
| 169 | <h2>Functions</h2> |
| 170 | <ul id="listFns"> |
| 171 | </ul> |
| 156 | 172 | </div> |
| 157 | 173 | </section> |
| 158 | 174 | <script src="data.js"></script> |