Skip to content

Commit 8fce29f

Browse files
authored
Move Resources to their own page (#84)
1 parent 71b270a commit 8fce29f

File tree

3 files changed

+84
-73
lines changed

3 files changed

+84
-73
lines changed

docusaurus.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,11 @@ const config = {
129129
position: "right",
130130
dropdownActiveClassDisabled: true,
131131
},
132+
{
133+
to: "/resources",
134+
position: "left",
135+
label: "Resources",
136+
},
132137
{
133138
to: "/faq",
134139
position: "left",

src/pages/index.js

Lines changed: 0 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -42,77 +42,6 @@ function HomepageHeader() {
4242
);
4343
}
4444

45-
function Resources() {
46-
const resources = [
47-
[
48-
{
49-
title: (<>GB Assembly tutorial <span className="badge badge--secondary">WIP</span></>),
50-
description: (<>This tutorial will guide you from a basic Hello World, to making an <i>Arkanoid</i> clone, and ending with a Shoot-'Em-Up, touching upon everything you need to know to make a Game Boy game. <br></br> <small> This guide is still work in progress, only the first lessons are available.</small> </>),
51-
url: "https://gbdev.io/gb-asm-tutorial/",
52-
linkText: "Learn",
53-
},
54-
{
55-
title: "Pan Docs",
56-
description: "The definitive Game Boy technical reference. Contains descriptions of all hardware registers, many behaviors (such as rendering and audio), and even pretty diagrams!",
57-
url: "https://gbdev.io/pandocs",
58-
linkText: "Read",
59-
},
60-
],
61-
[
62-
{
63-
title: "hardware.inc",
64-
description: (<>For over 20 years, <code>hardware.inc</code> has been a staple of essentially all RGBDS projects, providing all sorts of constants to allow easy interaction with Game Boy hardware registers.</>),
65-
url: "https://github.com/gbdev/hardware.inc",
66-
linkText: "Download",
67-
},
68-
{
69-
title: "rgbds-structs",
70-
description: (<>RGBDS does not (<Link href="https://github.com/gbdev/rgbds/issues/98">currently</Link>) support "structs" (data structures) natively. This macro pack provides that functionality, all in a single file that you can freely <code>INCLUDE</code> anywhere in your projects.</>),
71-
url: "https://github.com/ISSOtm/rgbds-structs",
72-
linkText: "Download",
73-
},
74-
],
75-
[
76-
{
77-
title: "gb-boilerplate",
78-
description: (<>This simple template project allows getting started on your next GB project more quickly. The provided Makefile allows simply adding new <code>.asm</code> files in a single folder, and <code>make</code> builds your ROM!</>),
79-
url: "https://github.com/ISSOtm/gb-boilerplate",
80-
linkText: "Get started",
81-
},
82-
{
83-
title: "gb-starter-kit",
84-
description: "gb-starter-kit is “gb-boilerplate Plus”: the same build system is included, plus some basic code such as a LCD-safe copy, a crash handler, and a data compressor + decompressor.",
85-
url: "https://github.com/ISSOtm/gb-starter-kit",
86-
linkText: "Get started",
87-
},
88-
],
89-
];
90-
91-
return (
92-
<section>
93-
<div className="container">
94-
<h2>Resources</h2>
95-
{resources.map((resources) => (<div className="row">
96-
{resources.map((resource) => (
97-
<div className="col">
98-
<div className="padding-horiz--md margin-top--md margin-bottom--md">
99-
<h3>{resource.title}</h3>
100-
<p>{resource.description}</p>
101-
<Link
102-
className="button button--primary button--lg"
103-
href={resource.url}
104-
>
105-
{resource.linkText}
106-
</Link>
107-
</div>
108-
</div>
109-
))}
110-
</div>))}
111-
</div>
112-
</section>
113-
);
114-
}
115-
11645
export default function Home() {
11746
const { siteConfig } = useDocusaurusContext();
11847
return (
@@ -123,8 +52,6 @@ export default function Home() {
12352
<main>
12453
<HomepageHeader />
12554
<HomepageFeatures />
126-
<hr />
127-
<Resources />
12855
</main>
12956
</Layout>
13057
);

src/pages/resources.mdx

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
title: Resources
3+
hide_table_of_contents: true
4+
---
5+
6+
import Link from '@docusaurus/Link';
7+
8+
export const Resources = () => {
9+
const resources = [
10+
[
11+
{
12+
title: (<>GB Assembly tutorial <span className="badge badge--secondary">WIP</span></>),
13+
description: (<>This tutorial will guide you from a basic Hello World, to making an <i>Arkanoid</i> clone, and ending with a Shoot-'Em-Up, touching upon everything you need to know to make a Game Boy game. <br></br> <small> This guide is still work in progress, only the first lessons are available.</small> </>),
14+
url: "https://gbdev.io/gb-asm-tutorial/",
15+
linkText: "Learn",
16+
},
17+
{
18+
title: "Pan Docs",
19+
description: "The definitive Game Boy technical reference. Contains descriptions of all hardware registers, many behaviors (such as rendering and audio), and even pretty diagrams!",
20+
url: "https://gbdev.io/pandocs",
21+
linkText: "Read",
22+
},
23+
],
24+
[
25+
{
26+
title: "hardware.inc",
27+
description: (<>For over 20 years, <code>hardware.inc</code> has been a staple of essentially all RGBDS projects, providing all sorts of constants to allow easy interaction with Game Boy hardware registers.</>),
28+
url: "https://github.com/gbdev/hardware.inc",
29+
linkText: "Download",
30+
},
31+
{
32+
title: "rgbds-structs",
33+
description: (<>RGBDS does not (<Link href="https://github.com/gbdev/rgbds/issues/98">currently</Link>) support "structs" (data structures) natively. This macro pack provides that functionality, all in a single file that you can freely <code>INCLUDE</code> anywhere in your projects.</>),
34+
url: "https://github.com/ISSOtm/rgbds-structs",
35+
linkText: "Download",
36+
},
37+
],
38+
[
39+
{
40+
title: "gb-boilerplate",
41+
description: (<>This simple template project allows getting started on your next GB project more quickly. The provided Makefile allows simply adding new <code>.asm</code> files in a single folder, and <code>make</code> builds your ROM!</>),
42+
url: "https://github.com/ISSOtm/gb-boilerplate",
43+
linkText: "Get started",
44+
},
45+
{
46+
title: "gb-starter-kit",
47+
description: "gb-starter-kit is “gb-boilerplate Plus”: the same build system is included, plus some basic code such as a LCD-safe copy, a crash handler, and a data compressor + decompressor.",
48+
url: "https://github.com/ISSOtm/gb-starter-kit",
49+
linkText: "Get started",
50+
},
51+
],
52+
];
53+
54+
return (
55+
<section>
56+
<div className="container">
57+
<h2>Resources</h2>
58+
{resources.map((resources) => (<div className="row">
59+
{resources.map((resource) => (
60+
<div className="col">
61+
<div className="padding-horiz--md margin-top--md margin-bottom--md">
62+
<h3>{resource.title}</h3>
63+
<p>{resource.description}</p>
64+
<Link
65+
className="button button--primary button--lg"
66+
href={resource.url}
67+
>
68+
{resource.linkText}
69+
</Link>
70+
</div>
71+
</div>
72+
))}
73+
</div>))}
74+
</div>
75+
</section>
76+
);
77+
};
78+
79+
<Resources />

0 commit comments

Comments
 (0)