Skip to content

Commit f474732

Browse files
committed
chore: convert two spaces to four spaces
1 parent 328a20c commit f474732

10 files changed

Lines changed: 312 additions & 324 deletions

File tree

.github/workflows/page.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232

3333
# Deploy to VPS over SSH
3434
- name: Deploy Book to VPS
35-
uses: https://github.com/appleboy/scp-action@v1
35+
uses: appleboy/scp-action@v1
3636
with:
3737
host: ${{ secrets.VPS_IP }}
3838
username: actions

src/components/Downloads.astro

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
---
22
interface Props {
3-
githubUrl: string;
3+
githubUrl: string;
44
}
55
66
const { githubUrl } = Astro.props;
77
---
88
<ul class="downloads">
9-
<li>
10-
<a href={githubUrl}>
11-
Get it on
12-
<strong><i class="fab fa-github"></i> Github</strong>
13-
</a>
14-
</li>
15-
<li>
16-
<a href="/examples">
17-
View
18-
<strong>Examples</strong>
19-
</a>
20-
</li>
21-
<li>
22-
<a href="/playground">
23-
Try the
24-
<strong>Playground</strong>
25-
</a>
26-
</li>
9+
<li>
10+
<a href={githubUrl}>
11+
Get it on
12+
<strong><i class="fab fa-github"></i> Github</strong>
13+
</a>
14+
</li>
15+
<li>
16+
<a href="/examples">
17+
View
18+
<strong>Examples</strong>
19+
</a>
20+
</li>
21+
<li>
22+
<a href="/playground">
23+
Try the
24+
<strong>Playground</strong>
25+
</a>
26+
</li>
2727
</ul>

src/components/SocialLinks.astro

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
---
22
interface Props {
3-
githubUrl: string;
4-
twitterUrl: string;
5-
discordUrl: string;
6-
redditUrl: string;
7-
trelloUrl: string;
8-
blogUrl: string;
3+
githubUrl: string;
4+
twitterUrl: string;
5+
discordUrl: string;
6+
redditUrl: string;
7+
trelloUrl: string;
8+
blogUrl: string;
99
}
10+
11+
const props: Props = Astro.props;
1012
---
1113
<p class="view">
12-
<a href={Astro.props.githubUrl}><i class="fab fa-github fa-3x" title="GitHub"></i></a>
13-
<a href={Astro.props.twitterUrl}><i class="fab fa-twitter fa-3x blue" title="Twitter"></i></a>
14-
<a href={Astro.props.discordUrl}><i class="fab fa-discord fa-3x" style="color: #738BD8;" title="Discord"></i></a>
15-
<a href={Astro.props.redditUrl}><i class="fab fa-reddit fa-3x red" title="Reddit"></i></a>
16-
<a href={Astro.props.trelloUrl}><i class="fab fa-trello fa-3x light-blue" title="Trello"></i></a>
17-
<a href={Astro.props.blogUrl}><i class="far fa-newspaper fa-3x" title="Blog"></i></a>
14+
<a href={props.githubUrl}><i class="fab fa-github fa-3x" title="GitHub"></i></a>
15+
<a href={props.twitterUrl}><i class="fab fa-twitter fa-3x blue" title="Twitter"></i></a>
16+
<a href={props.discordUrl}><i class="fab fa-discord fa-3x" style="color: #738BD8;" title="Discord"></i></a>
17+
<a href={props.redditUrl}><i class="fab fa-reddit fa-3x red" title="Reddit"></i></a>
18+
<a href={props.trelloUrl}><i class="fab fa-trello fa-3x light-blue" title="Trello"></i></a>
19+
<a href={props.blogUrl}><i class="far fa-newspaper fa-3x" title="Blog"></i></a>
1820
</p>
Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
---
22
interface Props {
3-
headings: {
4-
depth: number;
5-
slug: string;
6-
text: string;
7-
}[];
3+
headings: {
4+
depth: number;
5+
slug: string;
6+
text: string;
7+
}[];
88
}
99
1010
const { headings } = Astro.props;
1111
1212
const minDepth = headings.length > 0 ? Math.min(...headings.map(h => h.depth)) : 0;
1313
---
1414
<ul class="toc">
15-
{headings.map((heading) => (
16-
<li style={{ marginLeft: `${(heading.depth - minDepth) * 1.5}rem` }}>
17-
<a href={`#${heading.slug}`}>{heading.text}</a>
18-
</li>
19-
))}
15+
{headings.map((heading) => (
16+
<li style={{ marginLeft: `${(heading.depth - minDepth) * 1.5}rem` }}>
17+
<a href={`#${heading.slug}`}>{heading.text}</a>
18+
</li>
19+
))}
2020
</ul>
2121

2222
<style>
23-
.toc {
24-
list-style: none;
25-
padding: 0;
26-
}
23+
.toc {
24+
list-style: none;
25+
padding: 0;
26+
}
2727

28-
.toc li {
29-
margin: 0.5rem 0;
30-
}
28+
.toc li {
29+
margin: 0.5rem 0;
30+
}
3131
</style>

src/layouts/BaseLayout.astro

Lines changed: 66 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -4,92 +4,87 @@ import Downloads from '../components/Downloads.astro';
44
import TableOfContents from '../components/TableOfContents.astro';
55
66
interface Props {
7-
title: string;
8-
description: string;
9-
headings: { depth: number; slug: string; text: string; }[];
7+
title: string;
8+
description: string;
9+
headings: { depth: number; slug: string; text: string; }[];
1010
}
1111
1212
const { title, description, headings } = Astro.props;
1313
14-
// Replicate _config.yml variables
1514
const site = {
16-
title: "Kit Programming Language",
17-
logo: "/img/logo.png",
18-
description: "A <span class=\"rainbow\">magical</span>, high performance programming language for game development.",
19-
github: {
20-
repository_url: "https://github.com/kitlang/kit"
21-
},
22-
twitter: {
23-
url: "https://twitter.com/kitlanguage"
24-
},
25-
discord: {
26-
url: "https://discord.gg/3va8Us9"
27-
},
28-
reddit: {
29-
url: "https://reddit.com/r/kitlang"
30-
},
31-
trello: {
32-
url: "https://trello.com/b/Bn9H0fzk/kit"
33-
},
34-
blog: {
35-
url: "https://blog.kitlang.org"
36-
},
37-
playground: {
38-
url: "https://playground-server.kitlang.org/compile"
39-
}
15+
title: "Kit Programming Language",
16+
logo: "/img/logo.png",
17+
description: "A <span class=\"rainbow\">magical</span>, high performance programming language for game development.",
18+
github: {
19+
repository_url: "https://github.com/kitlang/kit"
20+
},
21+
twitter: {
22+
url: "https://twitter.com/kitlanguage"
23+
},
24+
discord: {
25+
url: "https://discord.gg/3va8Us9"
26+
},
27+
reddit: {
28+
url: "https://reddit.com/r/kitlang"
29+
},
30+
trello: {
31+
url: "https://trello.com/b/Bn9H0fzk/kit"
32+
},
33+
blog: {
34+
url: "https://blog.kitlang.org"
35+
},
36+
playground: {
37+
url: "https://playground-server.kitlang.org/compile"
38+
}
4039
};
4140
---
4241

4342
<!DOCTYPE html>
4443
<html lang="en-US">
45-
<head>
46-
<meta charset="UTF-8">
47-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
48-
<meta name="viewport" content="width=device-width, initial-scale=1">
49-
<link rel="icon" type="image/png" href="/img/favicon.png">
44+
<head>
45+
<meta charset="UTF-8">
46+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
47+
<meta name="viewport" content="width=device-width, initial-scale=1">
48+
<link rel="icon" type="image/png" href="/img/favicon.png">
5049

51-
<title>{title}</title>
50+
<title>{title}</title>
5251

53-
<link rel="stylesheet" href="/src/styles/jekyll-theme-minimal.scss" />
54-
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous">
52+
<link rel="stylesheet" href="/src/styles/jekyll-theme-minimal.scss" />
53+
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous">
54+
</head>
55+
<body>
5556

56-
<!--[if lt IE 9]>
57-
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
58-
<![endif]-->
59-
</head>
60-
<body>
57+
<div class="wrapper">
58+
<header>
59+
<a href="/">
60+
<img class="logo" src={site.logo} alt="Logo" />
61+
</a>
6162

62-
<div class="wrapper">
63-
<header>
64-
<a href="/">
65-
<img class="logo" src={site.logo} alt="Logo" />
66-
</a>
63+
<p set:html={site.description}></p>
6764

68-
<p set:html={site.description}></p>
65+
<SocialLinks
66+
githubUrl={site.github.repository_url}
67+
twitterUrl={site.twitter.url}
68+
discordUrl={site.discord.url}
69+
redditUrl={site.reddit.url}
70+
trelloUrl={site.trello.url}
71+
blogUrl={site.blog.url}
72+
/>
6973

70-
<SocialLinks
71-
githubUrl={site.github.repository_url}
72-
twitterUrl={site.twitter.url}
73-
discordUrl={site.discord.url}
74-
redditUrl={site.reddit.url}
75-
trelloUrl={site.trello.url}
76-
blogUrl={site.blog.url}
77-
/>
74+
<Downloads githubUrl={site.github.repository_url} />
7875

79-
<Downloads githubUrl={site.github.repository_url} />
80-
81-
<p>
82-
<hr/>
83-
<TableOfContents headings={headings} />
84-
</p>
85-
</header>
86-
<section>
87-
<slot />
88-
</section>
89-
<footer>
90-
<p>Kit &mdash; &copy; 2018 <a href="https://github.com/bendmorris">Ben Morris</a> (<a href="https://github.com/kitlang/kit/blob/master/LICENSE.md">license</a>)</p>
91-
</footer>
92-
</div>
93-
<script is:inline src="/js/scale.fix.js"></script>
94-
</body>
76+
<p>
77+
<hr/>
78+
<TableOfContents headings={headings} />
79+
</p>
80+
</header>
81+
<section>
82+
<slot />
83+
</section>
84+
<footer>
85+
<p>Kit &mdash; &copy; 2018 <a href="https://github.com/bendmorris">Ben Morris</a> (<a href="https://github.com/kitlang/kit/blob/master/LICENSE.md">license</a>)</p>
86+
</footer>
87+
</div>
88+
<script is:inline src="/js/scale.fix.js"></script>
89+
</body>
9590
</html>

src/pages/comparisons.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ Kit aims to provide a superset of the capabilities of C. With that said, there a
2727

2828
C's type system is weaker than Kit's; this means that some things that would be valid from C will throw compile-time errors in Kit. As an example, Kit features a true `Bool` type, and other types cannot be implicitly cast to bools, so `if 1 {}` will not compile in Kit. Kit's stance is that generally these usage patterns are more likely to be mistakes, so forbidding them reduces bugs.
2929

30-
3130
## C++
3231

3332
C++ is an early example of a "better C" and is widely used in game development. Some comparisons:
@@ -36,7 +35,6 @@ C++ is an early example of a "better C" and is widely used in game development.
3635
* C++ provides object-oriented programming features, including classes; Kit provides traits and boxes (fat pointers.) A trait in Kit is similar to an interface, but can be implemented externally to type definitions, and can be implemented by even basic types (e.g. numeric types or tuples.) A box pointer must be explicitly created, so the overhead that boxes/objects add is entirely opt-in.
3736
* C++ leverages much of the same build infrastructure as C. Kit provides its own compiler and build tool to make the build process simpler.
3837

39-
4038
## Rust
4139

4240
[Rust](https://www.rust-lang.org/) is a safe systems programming language developed at Mozilla. Many features in Kit are inspired by Rust. In general, Rust is much stricter than Kit, which can result in a tradeoff of fewer bugs but longer iteration cycles.
@@ -46,7 +44,6 @@ C++ is an early example of a "better C" and is widely used in game development.
4644
* Rust disallows implementing external traits for external types, which closes off a big advantage of a trait system. For example, it's impossible to implement `Show` for `Path`, because the creators of `Path` decided they don't want you to treat it as a string. There is a valid argument against this, but in Kit the developer has the final say. As long as implementations are unambiguous, in Kit traits can be implemented for types arbitrarily.
4745
* Rust uses a global allocator by default. Kit is designed to allow easy use of multiple custom allocators within the same codebase.
4846

49-
5047
## Zig
5148

5249
If you want a safer, modern alternative to C, [Zig](https://ziglang.org/) is a great option. Like Kit, Zig features seamless C interop - just include a header and use it directly in your code. This means there's very little risk to trying Zig in place of C.
@@ -63,7 +60,6 @@ A couple key differences:
6360

6461
* Zig is mature; Kit is pre-alpha.
6562

66-
6763
## Haxe
6864

6965
[Haxe](https://www.haxe.org) is a high-level language that compiles (or "transpiles") to 10+ other language targets, including C++, JavaScript and bytecode for various VMs. Haxe has been used for numerous successful games, and its use cases also include settop boxes, websites, and more.
@@ -76,17 +72,14 @@ A couple key differences:
7672

7773
* Haxe is an object-oriented language. Kit's type system uses traits, and has no objects; [boxes](/examples#boxes) must be created explicitly.
7874

79-
8075
## Swift
8176

8277
TODO
8378

84-
8579
## Nim
8680

8781
TODO
8882

89-
9083
## Jai
9184

9285
As soon as it's publicly available, let's revisit.

src/pages/examples.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1215,4 +1215,3 @@ TODO
12151215
### kit.vector
12161216

12171217
TODO
1218-

src/pages/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ function main() {
1616
}
1717
```
1818

19-
2019
**[See more code examples here](/examples)**
2120

2221
**At a glance:**

0 commit comments

Comments
 (0)