init commit
This commit is contained in:
28
src/routes/+page.svelte
Normal file
28
src/routes/+page.svelte
Normal file
@@ -0,0 +1,28 @@
|
||||
<script lang="ts">
|
||||
import App from '$lib/components/App.svelte'
|
||||
import type { PageData } from './$types';
|
||||
export let data: PageData;
|
||||
</script>
|
||||
|
||||
<div>
|
||||
{#each data.models as model}
|
||||
<span>{model.title}</span>
|
||||
{/each}
|
||||
<App />
|
||||
</div>
|
||||
|
||||
<style>
|
||||
:global(body) {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: rgb(0, 36, 6);
|
||||
background: linear-gradient(180deg, rgba(0, 36, 6, 1) 0%, rgba(0, 0, 0, 1) 100%);
|
||||
display: absolute;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
15
src/routes/+page.ts
Normal file
15
src/routes/+page.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
const models: Model[] = [
|
||||
{ title: 'Model 1' },
|
||||
{ title: 'Model 2' },
|
||||
{ title: 'Model 3' }
|
||||
];
|
||||
|
||||
export type Model = { title: string}
|
||||
|
||||
export function load(): { models: Model[] } {
|
||||
return {
|
||||
models: models.map((model) => ({
|
||||
title: model.title
|
||||
}))
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user