langref table of contents in a separate column on large displays
This commit is contained in:
parent
b3cbf290c8
commit
cb5a5ebb20
@ -371,8 +371,8 @@ fn genToc(allocator: *mem.Allocator, tokenizer: *Tokenizer) !Toc {
|
|||||||
.Separator => continue,
|
.Separator => continue,
|
||||||
.TagContent => {
|
.TagContent => {
|
||||||
const param = tokenizer.buffer[bracket_tok.start..bracket_tok.end];
|
const param = tokenizer.buffer[bracket_tok.start..bracket_tok.end];
|
||||||
if (mem.eql(u8, param, "3col")) {
|
if (mem.eql(u8, param, "2col")) {
|
||||||
columns = 3;
|
columns = 2;
|
||||||
} else {
|
} else {
|
||||||
return parseError(
|
return parseError(
|
||||||
tokenizer,
|
tokenizer,
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
<style>
|
<style>
|
||||||
body{
|
body{
|
||||||
font-family: system-ui, -apple-system, Roboto, "Segoe UI", sans-serif;
|
font-family: system-ui, -apple-system, Roboto, "Segoe UI", sans-serif;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
a:not(:hover) {
|
a:not(:hover) {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@ -80,11 +81,35 @@
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#main-wrapper {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
#contents-wrapper {
|
||||||
|
flex-grow: 1;
|
||||||
|
padding: 0 2em;
|
||||||
|
}
|
||||||
|
|
||||||
#contents {
|
#contents {
|
||||||
max-width: 60em;
|
max-width: 60em;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#index {
|
||||||
|
padding: 0 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 1025px) {
|
||||||
|
#main-wrapper {
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
#contents-wrapper, #index {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
h1 a, h2 a, h3 a, h4 a, h5 a {
|
h1 a, h2 a, h3 a, h4 a, h5 a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #333;
|
color: #333;
|
||||||
@ -155,13 +180,18 @@
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<a href="https://ziglang.org/documentation/0.1.1">0.1.1</a> |
|
<div id="main-wrapper">
|
||||||
<a href="https://ziglang.org/documentation/0.2.0">0.2.0</a> |
|
<div id="index">
|
||||||
<a href="https://ziglang.org/documentation/0.3.0">0.3.0</a> |
|
<a href="https://ziglang.org/documentation/0.1.1">0.1.1</a> |
|
||||||
<a href="https://ziglang.org/documentation/0.4.0">0.4.0</a> |
|
<a href="https://ziglang.org/documentation/0.2.0">0.2.0</a> |
|
||||||
<a href="https://ziglang.org/documentation/0.5.0">0.5.0</a> |
|
<a href="https://ziglang.org/documentation/0.3.0">0.3.0</a> |
|
||||||
master
|
<a href="https://ziglang.org/documentation/0.4.0">0.4.0</a> |
|
||||||
<div id="contents">
|
<a href="https://ziglang.org/documentation/0.5.0">0.5.0</a> |
|
||||||
|
master
|
||||||
|
<h1>Index</h1>
|
||||||
|
{#nav#}
|
||||||
|
</div>
|
||||||
|
<div id="contents-wrapper"><div id="contents">
|
||||||
{#header_open|Introduction#}
|
{#header_open|Introduction#}
|
||||||
<p>
|
<p>
|
||||||
Zig is a general-purpose programming language for maintaining <strong>robust</strong>,
|
Zig is a general-purpose programming language for maintaining <strong>robust</strong>,
|
||||||
@ -194,10 +224,6 @@
|
|||||||
</p>
|
</p>
|
||||||
{#header_close#}
|
{#header_close#}
|
||||||
|
|
||||||
{#header_open|Index#}
|
|
||||||
{#nav#}
|
|
||||||
{#header_close#}
|
|
||||||
|
|
||||||
{#header_open|Hello World#}
|
{#header_open|Hello World#}
|
||||||
|
|
||||||
{#code_begin|exe|hello#}
|
{#code_begin|exe|hello#}
|
||||||
@ -6556,7 +6582,7 @@ fn readFile(allocator: *Allocator, filename: []const u8) ![]u8 {
|
|||||||
{#header_close#}
|
{#header_close#}
|
||||||
|
|
||||||
{#header_close#}
|
{#header_close#}
|
||||||
{#header_open|Builtin Functions|3col#}
|
{#header_open|Builtin Functions|2col#}
|
||||||
<p>
|
<p>
|
||||||
Builtin functions are provided by the compiler and are prefixed with <code>@</code>.
|
Builtin functions are provided by the compiler and are prefixed with <code>@</code>.
|
||||||
The {#syntax#}comptime{#endsyntax#} keyword on a parameter means that the parameter must be known
|
The {#syntax#}comptime{#endsyntax#} keyword on a parameter means that the parameter must be known
|
||||||
@ -10621,6 +10647,7 @@ keyword <- KEYWORD_align / KEYWORD_and / KEYWORD_allowzero / KEYWORD_asm
|
|||||||
<li>Together we serve end users.</li>
|
<li>Together we serve end users.</li>
|
||||||
</ul>
|
</ul>
|
||||||
{#header_close#}
|
{#header_close#}
|
||||||
|
</div></div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user