diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-04-12 15:52:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-12 15:52:26 +0100 |
commit | ad97d4350c55055c3fcf084915a0a067c09939da (patch) | |
tree | 885baa92f3aa0a50ef0e5226e89aaabe7296ad8f /bskyembed/src | |
parent | 24bd3d6986a8080a34836b34ee1dbd88357d1cb5 (diff) | |
download | voidsky-ad97d4350c55055c3fcf084915a0a067c09939da.tar.zst |
[Embeds] Create vite project and add to build pipeline (#3448)
* add bskyembed vite app * create build script (temp until embedr is ready)
Diffstat (limited to 'bskyembed/src')
-rw-r--r-- | bskyembed/src/app.tsx | 18 | ||||
-rw-r--r-- | bskyembed/src/index.css | 29 | ||||
-rw-r--r-- | bskyembed/src/main.tsx | 9 |
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) |