Public
HTTP (deprecated)
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Readme

Proof of concept for using Hono and remarkjs to create a slideshow. Slides here.

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
/** @jsxImportSource npm:hono/jsx */
import type { FC } from "hono/jsx";
import { Hono } from "npm:hono";
import { html } from "npm:hono/html";
const app = new Hono();
const Style = () =>
html`<style>
@import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz);
@import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic);
@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic);
body { font-family: 'Droid Serif'; }
h1, h2, h3 {
font-family: 'Yanone Kaffeesatz';
font-weight: normal;
}
.remark-code, .remark-inline-code { font-family: 'Ubuntu Mono'; }
</style>`;
const Content = () =>
html`<textarea id="source">
class: center, middle
# Title
---
# Agenda
1. Introduction 2. Deep-dive 3. ...
---
# Introduction
</textarea>`;
const Slides: FC = () => {
return (
<html>
<head>
<title>Title</title>
<Style></Style>
</head>
<body>
<Content></Content>
<script src="https://remarkjs.com/downloads/remark-latest.min.js">
</script>
<script>
var slideshow = remark.create();
</script>
</body>
</html>
);
};
export const ardent_astronomy = async (req: Request) => {
const app = new Hono();
// app.get("/", (c) => c.text("Hono!"));
app.get("/", (c) => c.html(<Slides></Slides>));
return app.fetch(req);
};
nbbaier-ardent_astronomy.web.val.run
November 2, 2023