introduce solid.js

This commit is contained in:
Yura Dupyn 2026-02-13 16:44:39 +01:00
parent 0014f75a22
commit e2354fb9ce
10 changed files with 675 additions and 15 deletions

View file

@ -1,8 +0,0 @@
body {
font-family:
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
sans-serif;
margin: auto;
max-width: 38rem;
padding: 2rem;
}

View file

@ -26,7 +26,7 @@
* ```
*/
import './index.scss';
import { startApp } from './ui';
import { Versions } from './versions';
declare const versions: Versions; // preload
@ -44,3 +44,4 @@ func().then(x => {
console.log("is this working? ", x);
});
startApp();

3
src/ui/index.scss Normal file
View file

@ -0,0 +1,3 @@
@use "@picocss/pico/scss/pico";
// Custom styling goes here

15
src/ui/index.tsx Normal file
View file

@ -0,0 +1,15 @@
import { render } from 'solid-js/web';
import './index.scss';
import App from './SolidHi';
export function startApp() {
const root = document.getElementById('app');
if (root && !(root instanceof HTMLDivElement)) {
throw new Error('Root element not found');
}
render(() => (
<App />
), root!);
}