From ad97d4350c55055c3fcf084915a0a067c09939da Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Fri, 12 Apr 2024 15:52:26 +0100 Subject: [Embeds] Create vite project and add to build pipeline (#3448) * add bskyembed vite app * create build script (temp until embedr is ready) --- bskyembed/src/app.tsx | 18 ++++++++++++++++++ bskyembed/src/index.css | 29 +++++++++++++++++++++++++++++ bskyembed/src/main.tsx | 9 +++++++++ 3 files changed, 56 insertions(+) create mode 100644 bskyembed/src/app.tsx create mode 100644 bskyembed/src/index.css create mode 100644 bskyembed/src/main.tsx (limited to 'bskyembed/src') 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 ( + <> +

Hello Vite + Preact!

+

+ + Learn Preact + +

+ + ) +} 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(, root) -- cgit 1.4.1