about summary refs log tree commit diff
path: root/bskyembed/src
diff options
context:
space:
mode:
Diffstat (limited to 'bskyembed/src')
-rw-r--r--bskyembed/src/app.tsx18
-rw-r--r--bskyembed/src/index.css29
-rw-r--r--bskyembed/src/main.tsx9
3 files changed, 56 insertions, 0 deletions
diff --git a/bskyembed/src/app.tsx b/bskyembed/src/app.tsx
new file mode 100644
index 000000000..4fba80d59
--- /dev/null
+++ b/bskyembed/src/app.tsx
@@ -0,0 +1,18 @@
+import {Fragment, h} from 'preact'
+
+export function App() {
+  return (
+    <>
+      <p>Hello Vite + Preact!</p>
+      <p>
+        <a
+          className="link"
+          href="https://preactjs.com/"
+          target="_blank"
+          rel="noopener noreferrer">
+          Learn Preact
+        </a>
+      </p>
+    </>
+  )
+}
diff --git a/bskyembed/src/index.css b/bskyembed/src/index.css
new file mode 100644
index 000000000..b8c94dfb5
--- /dev/null
+++ b/bskyembed/src/index.css
@@ -0,0 +1,29 @@
+html, body {
+	height: 100%;
+	width: 100%;
+	padding: 0;
+	margin: 0;
+	background: #FAFAFA;
+	font-family: 'Helvetica Neue', arial, sans-serif;
+	font-weight: 400;
+	color: #444;
+	-webkit-font-smoothing: antialiased;
+	-moz-osx-font-smoothing: grayscale;
+}
+
+* {
+	box-sizing: border-box;
+}
+
+#app {
+  height: 100%;
+  text-align: center;
+  background-color: #673ab8;
+  color: #fff;
+  font-size: 1.5em;
+  padding-top: 100px;
+}
+
+.link {
+  color: #fff;
+}
diff --git a/bskyembed/src/main.tsx b/bskyembed/src/main.tsx
new file mode 100644
index 000000000..349f0ee78
--- /dev/null
+++ b/bskyembed/src/main.tsx
@@ -0,0 +1,9 @@
+import './index.css'
+
+import {h, render} from 'preact'
+
+import {App} from './app'
+
+const root = document.getElementById('app')
+if (!root) throw new Error('No root element')
+render(<App />, root)