+ {#if online}
+
Yikes!
+
+ {#if error.message}
+
{status}: {error.message}
+ {:else}
+
Encountered a {status} error
+ {/if}
+
+ {#if dev && error.stack}
+
{error.stack}
+ {:else}
+ {#if status >= 500}
+
Please try reloading the page.
+ {/if}
+
+
If the error persists, please drop by Discord chatroom and let us know, or raise an issue on GitHub. Thanks!
+ {/if}
+ {:else}
+
It looks like you're offline
+
+
Reload the page once you've found the internet.
+ {/if}
+
\ No newline at end of file
diff --git a/site/src/routes/_layout.svelte b/site/src/routes/_layout.svelte
new file mode 100644
index 0000000..98f9286
--- /dev/null
+++ b/site/src/routes/_layout.svelte
@@ -0,0 +1,40 @@
+
+
+
+
+';
+ };
+
+ renderer.code = (source, lang) => {
+ source = source.replace(/^ +/gm, match =>
+ match.split(' ').join('\t')
+ );
+
+ const lines = source.split('\n');
+
+ const meta = extract_metadata(lines[0], lang);
+
+ let prefix = '';
+ // let class_name = 'code-block';
+ let class_name = '';
+
+ if (meta) {
+ source = lines.slice(1).join('\n');
+ const filename = meta.filename || (lang === 'html' && 'App.svelte');
+ if (filename) {
+ prefix = `
${prefix} ${filename}`;
+ class_name += ' named';
+ }
+ }
+
+ if (meta && meta.hidden) {
+ return '';
+ }
+
+ const plang = langs[lang];
+ const { value: highlighted } = hljs.highlight(lang, source);
+ // const highlighted = PrismJS.highlight(
+ // source,
+ // PrismJS.languages[plang],
+ // lang
+ // );
+
+ const html = `
`;
+
+ if (block_open) {
+ block_open = false;
+ return `
${html}
`;
+ }
+
+ return html;
+ };
+
+ renderer.heading = (text, level, rawtext) => {
+ const slug = level <= 4 && make_slug(rawtext);
+
+ if (level === 3 || level === 4) {
+ const title = unescape(
+ text
+ .replace(/<\/?code>/g, '')
+ .replace(/\.(\w+)(\((.+)?\))?/, (m, $1, $2, $3) => {
+ if ($3) return `.${$1}(...)`;
+ if ($2) return `.${$1}()`;
+ return `.${$1}`;
+ })
+ );
+
+ subsections.push({ slug, title, level });
+ }
+
+ return `
+