feat: init frontend

This commit is contained in:
2024-03-06 14:01:07 +01:00
parent b54370bec0
commit f920a34a0d
112 changed files with 56743 additions and 1 deletions

View File

@ -0,0 +1,5 @@
<script lang="ts">
import "./app.css";
</script>
<slot />

View File

@ -0,0 +1,2 @@
export const prerender = true
export const ssr = false

View File

@ -0,0 +1,47 @@
<script lang="ts">
import App from "$lib/components/App.svelte";
import { invoke } from "@tauri-apps/api/core";
import { onMount } from "svelte";
onMount(async () => {
try {
const res = await invoke("greet", { name: "Dude" });
console.log({ res });
} catch (error) {
console.log(error);
}
try {
const res2 = await invoke("run_nodes", {});
console.log({ res2 });
} catch (error) {
console.log(error);
}
});
</script>
<div>
<App />
</div>
<style>
div {
height: 100vh;
}
:global(html) {
background: rgb(13, 19, 32);
background: linear-gradient(
180deg,
rgba(13, 19, 32, 1) 0%,
rgba(8, 12, 21, 1) 100%
);
}
:global(body) {
margin: 0;
position: relative;
width: 100vw;
height: 100vh;
}
</style>

View File

@ -0,0 +1,25 @@
/* fira-code-300 - latin */
@font-face {
font-display: swap;
/* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Fira Code';
font-style: normal;
font-weight: 300;
src: url('/fonts/fira-code-v22-latin-300.woff2') format('woff2');
/* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* fira-code-600 - latin */
@font-face {
font-display: swap;
/* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Fira Code';
font-style: normal;
font-weight: 600;
src: url('/fonts/fira-code-v22-latin-600.woff2') format('woff2');
/* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
:root {
font-family: 'Fira Code', monospace;
}