Skip to content

Commit

Permalink
en-us done
Browse files Browse the repository at this point in the history
  • Loading branch information
kristoff-it committed Sep 11, 2024
1 parent 48aa6c7 commit 4013a28
Show file tree
Hide file tree
Showing 219 changed files with 5,303 additions and 18,957 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
zig-cache/
.zig-cache/
zig-out/
/resources
doctest-*
/public
File renamed without changes.
2 changes: 2 additions & 0 deletions assets/chart/chartist-1.3.0.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions assets/chart/chartist-1.3.0.umd.js

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions assets/corporate-sponsors.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<div class="monetary-logos">
<a href="https://pex.com" rel="noopener nofollow" target="_blank">
<picture>
<source
srcset="/sponsors/pex-white.svg"
media="(prefers-color-scheme: dark)"
>
<img src="/sponsors/pex-dark.svg">
</picture>
</a>
<a href="https://coil.com" rel="noopener nofollow" target="_blank">
<picture>
<source
srcset="/sponsors/coil-logo-white.svg"
media="(prefers-color-scheme: dark)"
><img src="/sponsors/coil-logo-black.svg">
</picture>
</a>
<a href="https://tigerbeetle.com" rel="noopener nofollow" target="_blank" class="span2">
<picture>
<source
srcset="/sponsors/tb-logo-white.png"
media="(prefers-color-scheme: dark)"
><img src="/sponsors/tb-logo-black.png">
</picture>
</a>
<a href="https://shiguredo.jp" rel="noopener nofollow" target="_blank">
<picture>
<source
srcset="/sponsors/shiguredo-logo-dark.svg"
media="(prefers-color-scheme: dark)"
><img src="/sponsors/shiguredo-logo-light.svg">
</picture>
</a>
<a href="https://blacksmith.sh/" rel="noopener nofollow" target="_blank">
<picture>
<source
srcset="/sponsors/Blacksmith_Logo-White.svg"
media="(prefers-color-scheme: dark)"
><img src="/sponsors/Blacksmith_Logo-Black.svg">
</picture>
</a>
</div>
3 changes: 0 additions & 3 deletions assets/css/home.css
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,6 @@ h1.section-title {
margin-left: 20px;
}

.codesample figure {
margin: 0;
}

/*.features h1 {
display: list-item;
Expand Down
68 changes: 66 additions & 2 deletions assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ html:lang(fa) {
direction: rtl;
}


figure {
margin: 0;
}


body {
line-height: 1.45;
margin: 0;
Expand All @@ -22,6 +28,10 @@ p {
margin: 0.8em 0;
}

h1.title {
font-size: 2.5em;
}

h1,
h2,
h3,
Expand Down Expand Up @@ -158,7 +168,8 @@ code {
direction: ltr;
}

pre>code {
pre>code,
samp {
display: block;
overflow: auto;
padding: 0.5em;
Expand Down Expand Up @@ -350,7 +361,8 @@ h4:lang(ja) {
color: #0086b3;
}

pre>code {
pre>code,
samp {
background: #1e1e1e;
color: #f8f8f2;
line-height: normal;
Expand Down Expand Up @@ -468,4 +480,56 @@ h4:lang(ja) {
padding-left: 1em;
}

}


code.zig {
--light-yellow: #e5c07b;
--dark-yellow: #d19a66;
--blue: #61afef;
--cyan: #56b6c2;
--light-red: #e06c75;
--dark-red: #be5046;
--comment-gray: #5c6370;
--magenta: #c678dd;
}

code.zig .string {
color: var(--dark-yellow);
}

code.zig .variable,
code.zig .field {
color: var(--light-yellow);
}

code.zig .keyword.function {
color: var(--light-red);
}

code.zig .bracket {
color: var(--cyan);
}

code.zig .function {
color: var(--blue);
}

code.zig .builtin {
color: var(--magenta);
}

code.zig .operator,
code.zig .qualifier,
code.zig .attribute {
color: var(--light-red);
}

video {
max-width: 100%;
}

#back {
margin-top: 1em;
display: inline-block;
}
File renamed without changes.
5 changes: 4 additions & 1 deletion assets/zig-code/build-system/1-simple-executable/build.zig
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// zig-doctest: build-system -- --summary all
const std = @import("std");

pub fn build(b: *std.Build) void {
Expand All @@ -10,3 +9,7 @@ pub fn build(b: *std.Build) void {

b.installArtifact(exe);
}

// build=succeed
// additional_option=--summary
// additional_option=all
3 changes: 2 additions & 1 deletion assets/zig-code/build-system/1-simple-executable/hello.zig
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// zig-doctest: syntax --name hello
const std = @import("std");

pub fn main() !void {
std.debug.print("Hello World!\n", .{});
}

// syntax
5 changes: 4 additions & 1 deletion assets/zig-code/build-system/10-release/build.zig
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// zig-doctest: build-system -- --summary all
const std = @import("std");

const targets: []const std.Target.Query = &.{
Expand Down Expand Up @@ -29,3 +28,7 @@ pub fn build(b: *std.Build) !void {
b.getInstallStep().dependOn(&target_output.step);
}
}

// build=succeed
// additional_option=--summary
// additional_option=all
3 changes: 2 additions & 1 deletion assets/zig-code/build-system/10-release/hello.zig
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// zig-doctest: syntax --name hello
const std = @import("std");

pub fn main() !void {
std.debug.print("Hello World!\n", .{});
}

// syntax
6 changes: 5 additions & 1 deletion assets/zig-code/build-system/10.5-system-tool/build.zig
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// zig-doctest: build-system -- -Dlanguage=ja --summary all
const std = @import("std");

pub fn build(b: *std.Build) void {
Expand Down Expand Up @@ -30,3 +29,8 @@ pub fn build(b: *std.Build) void {
});
b.getInstallStep().dependOn(&install_artifact.step);
}

// build=succeed
// additional_option=-Dlanguage=ja
// additional_option=--summary
// additional_option=all
3 changes: 2 additions & 1 deletion assets/zig-code/build-system/10.5-system-tool/src/main.zig
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// zig-doctest: syntax --name main
const std = @import("std");

pub fn main() !void {
Expand All @@ -14,3 +13,5 @@ pub fn main() !void {

try std.io.getStdOut().writer().print("Hello {s}\n", .{word});
}

// syntax
5 changes: 4 additions & 1 deletion assets/zig-code/build-system/11-zig-tool/build.zig
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// zig-doctest: build-system -- -Dlanguage=ja --summary all
const std = @import("std");

pub fn build(b: *std.Build) void {
Expand Down Expand Up @@ -32,3 +31,7 @@ pub fn build(b: *std.Build) void {
});
b.getInstallStep().dependOn(&install_artifact.step);
}

// build=succeed
// additional_option=--summary
// additional_option=all
3 changes: 2 additions & 1 deletion assets/zig-code/build-system/11-zig-tool/src/main.zig
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// zig-doctest: syntax --name main
const std = @import("std");

pub fn main() !void {
Expand All @@ -14,3 +13,5 @@ pub fn main() !void {

try std.io.getStdOut().writer().print("Hello {s}\n", .{word});
}

// syntax
5 changes: 4 additions & 1 deletion assets/zig-code/build-system/12-embedfile/build.zig
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// zig-doctest: build-system -- -Dlanguage=ja --summary all
const std = @import("std");

pub fn build(b: *std.Build) void {
Expand Down Expand Up @@ -31,3 +30,7 @@ pub fn build(b: *std.Build) void {

b.installArtifact(exe);
}

// build=succeed
// additional_option=--summary
// additional_option=all
3 changes: 2 additions & 1 deletion assets/zig-code/build-system/12-embedfile/src/main.zig
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// zig-doctest: syntax --name main
const std = @import("std");
const word = @embedFile("word");

pub fn main() !void {
try std.io.getStdOut().writer().print("Hello {s}\n", .{word});
}

// syntax
5 changes: 4 additions & 1 deletion assets/zig-code/build-system/13-import/build.zig
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// zig-doctest: build-system -- --summary all
const std = @import("std");

pub fn build(b: *std.Build) void {
Expand Down Expand Up @@ -26,3 +25,7 @@ pub fn build(b: *std.Build) void {

b.installArtifact(exe);
}

// build=succeed
// additional_option=--summary
// additional_option=all
3 changes: 2 additions & 1 deletion assets/zig-code/build-system/13-import/src/main.zig
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// zig-doctest: syntax --name main
const std = @import("std");
const Person = @import("person").Person;

pub fn main() !void {
const p: Person = .{};
try std.io.getStdOut().writer().print("Hello {any}\n", .{p});
}

// syntax
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// zig-doctest: syntax --name generate_struct
const std = @import("std");

pub fn main() !void {
Expand Down Expand Up @@ -30,3 +29,5 @@ fn fatal(comptime format: []const u8, args: anytype) noreturn {
std.debug.print(format, args);
std.process.exit(1);
}

// syntax
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// zig-doctest: build-system -- --help
const std = @import("std");

pub fn build(b: *std.Build) void {
Expand All @@ -14,3 +13,7 @@ pub fn build(b: *std.Build) void {

b.installArtifact(exe);
}

// build=succeed
// additional_option=--summary
// additional_option=all
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// zig-doctest: syntax --name example
const std = @import("std");

pub fn main() !void {
std.debug.print("Hello World!\n", .{});
}

// syntax
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// zig-doctest: build-system -- -Dtarget=x86_64-windows -Doptimize=ReleaseSmall --summary all
const std = @import("std");

pub fn build(b: *std.Build) void {
Expand All @@ -13,3 +12,9 @@ pub fn build(b: *std.Build) void {

b.installArtifact(exe);
}

// build=succeed
// additional_option=-Dtarget=x86_64-windows
// additional_option=-Doptimize=ReleaseSmall
// additional_option=--summary
// additional_option=all
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// zig-doctest: syntax --name hello
const std = @import("std");

pub fn main() !void {
std.debug.print("Hello World!\n", .{});
}

// syntax
3 changes: 2 additions & 1 deletion assets/zig-code/build-system/conditional-compilation/app.zig
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// zig-doctest: syntax --name app
const std = @import("std");
const config = @import("config");

Expand All @@ -16,3 +15,5 @@ pub fn main() !void {
foo_bar();
}
}

// syntax
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// zig-doctest: build-system -- -Dversion=1.2.3 --summary all
const std = @import("std");

pub fn build(b: *std.Build) void {
Expand All @@ -23,3 +22,8 @@ pub fn build(b: *std.Build) void {
fn detectWhetherToEnableLibFoo() bool {
return false;
}

// build=succeed
// additional_option=-Dversion=1.2.3
// additional_option=--summary
// additional_option=all
Loading

0 comments on commit 4013a28

Please sign in to comment.