1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
|
<?php require "include/prelude.php" ?>
<?php
$currentPage = readConfig("p");
// Remember to sanitise unsafe values.
$currentPage = match ($currentPage) {
"achernar",
"agbsum",
"ax",
"backspace",
"benoit",
"bowshock",
"bzipper",
"deltaWorld",
"dux",
"eas",
"luma",
"pollex",
"u8c",
=> $currentPage,
default => "achernar",
};
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="author" content="Gabriel Bjørnager Jensen">
<meta name="darkreader-lock">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php
[$title, $description, $keywords] = match ($currentPage) {
"achernar" => [
"Achernar",
"Achernar is a Danish indie studio developing video games and open-source software.",
"achernar, fractals, game, open source, open-source, software, video game",
],
"agbsum" => [
"agbsum | Achernar",
"agbsum is a CLI utility for patching AGB images.",
"achernar, advance, agb, agbsum, cli, console, embedded, game, terminal",
],
"ax" => [
"AX | Achernar",
"AX is a C framework for developing AGB apps.",
"achernar, advance, agb, arm, assembly, ax, c, c++, cpp, cxx, thumb",
],
"backspace" => [
"Backspace | Achernar",
"About the Backspace game engine.",
"achernar, backspace, game engine, rust, udp, webgpu",
],
"benoit" => [
"Benoit | Achernar",
"Benoit is a Rust-written fractal renderer.",
"achernar, benoit, burning ship, cli, console, fractal, julia, mandelbrot, rust, terminal, tricorn, webgpu",
],
"bowshock" => [
"Bowshock | Achernar",
"About Bowshock.",
"achernar, bowshock, dangerous, frontier, game, rust, open world, sci-fi, science fiction, space, video game",
],
"bzipper" => [
"bzipper | Achernar",
"bzipper is a Rust crate for serialisation and deserialisation of binary streams.",
"achernar, binary, bzipper, deserialise, deserialiser, deserialize, deserializer, octet, serialize, serializer, serialize, serializer, tcp, udp",
],
"deltaWorld" => [
"Delta·World | Achernar",
"About Delta World.",
"achernar, adventure, delta world, open world, rust, webgpu",
],
"dux" => [
"Dux | Achernar",
"Dux is a cross-platform widgeting library for developing GUI applications.",
"achernar, dux, multimedia, rust, webgpu, widget",
],
"eas" => [
"eAS | Achernar",
"eAS is an assembler for cross-compiling to Arm ISAs.",
"achernar, agb, arm, assembler, assembly, eas, embedded, risc, thumb",
],
"luma" => [
"Luma | Achernar",
"Luma is an emulator for the AGB line of devices.",
"achernar, agb, arm, luma, rust, thumb",
],
"pollex" => [
"Pollex | Achernar",
"Pollex is a Rust crate for manipulating Arm ISA instructions.",
"achernar, agb, arm, pollex, rust, thumb",
],
"u8c" => [
"u8c | Achernar",
"u8c is a library for handling Unicode sequences in C.",
"achernar, u8c, unicode, utf, utf-16, utf-32, utf-8, utf16, utf32, utf8",
],
default => die(),
};
echo <<<HTML
<meta name="description" content="$description">
<meta name="keywords" content="$keywords">
<title>$title</title>
HTML;
?>
<link href="/favicon.ico" rel="icon" type="image/vnd.microsoft.icon">
<link href="/apple-touch-icon.png" rel="apple-touch-icon" type="image/png">
<link href="/css/normalise.css" rel="stylesheet" type="text/css">
<link href="/css/font.css" rel="stylesheet" type="text/css">
<link href="/css/main.css" rel="stylesheet" type="text/css">
<noscript>
<link href="/css/noScript.css" rel="stylesheet" type="text/css">
</noscript>
<script src="/js/main.js" type="text/javascript"></script>
<style type="text/css">
#header {
--backgroundColour: <?php echo pageColours($currentPage)[0x0] ?>;
--textColour: <?php echo pageColours($currentPage)[0x1] ?>;
<?php
$backgroundImage = pageBackgroundImage($currentPage);
if (!is_null($backgroundImage)) {
echo 'background-image: url("' . $backgroundImage . '");';
}
?>
}
</style>
</head>
<body>
<header id="header">
<div id="navBar">
<?php
function addNavBarLink($title, $page) {
global $currentPage;
$ariaCurrent = "false";
if ($page == $currentPage) {
$ariaCurrent = "page";
}
$id = match ($page) {
"achernar" => "home",
default => "",
};
echo "<a aria-current=\"$ariaCurrent\" href=\"?p=$page\" id=\"$id\">$title</a>";
}
?>
<section>
<?php addNavBarLink("ACHERNAR", "achernar"); ?>
</section>
<section>
<?php
addNavBarLink("BENOIT", "benoit");
addNavBarLink("BOWSHOCK", "bowshock");
addNavBarLink("DELTA·WORLD", "deltaWorld");
addNavBarLink("eAS", "eas");
?>
</section>
<section>
<a id="themeToggler" onclick="Ach.toggleTheme();">TOGGLE THEME</a>
</section>
</div>
<?php
$glyphAddr = pageGlyph($currentPage);
echo "<img alt=\"$currentPage\" id=\"glyph\" src=\"$glyphAddr\" />";
?>
</header>
<div id="page">
<?php require "include/" . $currentPage . ".php" ?>
</div>
<footer id="footer">
<div id="romanisation" title="آخِر اَلْنَهَر"></div>
<p id="systemDescription">ACHERNAR — Type B star; primary component of ALPHA ERIDANI; approx. (6) solar masses, (15) kilokelvin at surface; c. (140) light years from SOL III; no native lifeforms discovered, human life on terraformed ACHERNAR IV.</p>
<p>Communications can be done in English and Danish.</p>
<br>
<p>This webservice may be cloned from <a href="https://mandelbrot.dk/achernar/" rel="noopener noreferrer" target="_blank"><code>mandelbrot.dk</code></a>.</p>
<br>
<p id="cvrNumber">vat: DK44936429</p>
<br>
<div class="center" id="emailAddress" title="Obfuscated email address."></div>
<br>
<div id="socials">
<a class="instagram" href="https://www.instagram.com/primuseridani/" title="Instagram: primuseridani"></a>
<a class="linktree" href="https://linktr.ee/PrimusEridani/" title="Linktree: @PrimusEridani"></a>
<a class="threads" href="https://www.threads.net/@primuseridani/" title="Threads: @primuseridani"></a>
</div>
</footer>
</body>
<script type="text/javascript">
Ach.init();
</script>
</html>
|