authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-01-30 01:06:20-05:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2018-01-30 01:06:20-05:00
logd6b7d9090ef8ed4f8672b03c6c7c0c11c3c02316
tree063a3a8ff9dbb1d1f31e76edac7d925bc327a56d
parent7eea20bc50bd769b78dc74ded1257733814e8254
parent5e9f87c3bd968d6186a3bc1ad9c58c919d49ab15
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

Merge pull request #729 from zig-lang/www-changes

Improve documentation styling for mobile devices

1 files changed, 40 insertions(+), 4 deletions(-)

doc/langref.html.in+40-4
......@@ -36,25 +36,53 @@
3636 code {
3737 font-size: 12pt;
3838 }
39 @media screen and (min-width: 28.75em) {
39 pre > code {
40 display: block;
41 overflow: auto;
42 }
43 .table-wrapper {
44 width: 100%;
45 overflow-y: auto;
46 }
47 /* Desktop */
48 @media screen and (min-width: 56.25em) {
4049 #nav {
4150 width: 20em;
4251 height: 100%;
43 overflow-y: scroll;
4452 position: fixed;
53 overflow-y: scroll;
4554 left: 0;
4655 top: 0;
56 padding-left: 1em;
4757 }
4858 #contents {
49 max-width: 50em;
59 max-width: 60em;
5060 padding-left: 22em;
61 padding: 1em;
62 padding-left: 24em;
63 }
64 .page-title {
65 /* half-size since h1 */
66 padding-left: 12em;
67 margin-bottom: 2em;
68 }
69 }
70 /* Mobile */
71 @media screen and (max-width: 56.25em) {
72 body, code {
73 font-size: small;
74 }
75 #nav {
76 border-bottom: 1px solid grey;
5177 }
5278 }
5379 </style>
5480 </head>
5581 <body>
82 <h1 class="page-title">Zig Documentation</h1>
5683 <div id="nav">
57 {#nav#}
84 <h3>Index</h3>
85 {#nav#}
5886 </div>
5987 <div id="contents">
6088 {#header_open|Introduction#}
......@@ -173,6 +201,7 @@ pub fn main() %void {
173201}
174202 {#code_end#}
175203 {#header_open|Primitive Types#}
204 <div class="table-wrapper">
176205 <table>
177206 <tr>
178207 <th>
......@@ -398,9 +427,11 @@ pub fn main() %void {
398427 <td>an error code</td>
399428 </tr>
400429 </table>
430 </div>
401431 {#see_also|Integers|Floats|void|Errors#}
402432 {#header_close#}
403433 {#header_open|Primitive Values#}
434 <div class="table-wrapper">
404435 <table>
405436 <tr>
406437 <th>
......@@ -427,6 +458,7 @@ pub fn main() %void {
427458 <td>refers to the thing in immediate scope</td>
428459 </tr>
429460 </table>
461 </div>
430462 {#see_also|Nullables|this#}
431463 {#header_close#}
432464 {#header_open|String Literals#}
......@@ -451,6 +483,7 @@ test "string literals" {
451483 {#code_end#}
452484 {#see_also|Arrays|Zig Test#}
453485 {#header_open|Escape Sequences#}
486 <div class="table-wrapper">
454487 <table>
455488 <tr>
456489 <th>
......@@ -497,6 +530,7 @@ test "string literals" {
497530 <td>hexadecimal 24-bit Unicode character code UTF-8 encoded (6 digits)</td>
498531 </tr>
499532 </table>
533 </div>
500534 <p>Note that the maximum valid Unicode point is <code>0x10ffff</code>.</p>
501535 {#header_close#}
502536 {#header_open|Multiline String Literals#}
......@@ -674,6 +708,7 @@ pub fn main() %void {
674708 {#header_close#}
675709 {#header_open|Operators#}
676710 {#header_open|Table of Operators#}
711 <div class="table-wrapper">
677712 <table>
678713 <tr>
679714 <th>
......@@ -1246,6 +1281,7 @@ const ptr = &amp;x;
12461281 </td>
12471282 </tr>
12481283 </table>
1284 </div>
12491285 {#header_close#}
12501286 {#header_open|Precedence#}
12511287 <pre><code>x() x[] x.y