Migrated the project from Svelte and Vite to SvelteKit

This commit is contained in:
2026-05-08 12:18:59 +02:00
parent 6ccc856edc
commit e6ce118333
21 changed files with 171 additions and 117 deletions
+13
View File
@@ -0,0 +1,13 @@
// See https://svelte.dev/docs/kit/types#app.d.ts
// for information about these interfaces
declare global {
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface PageState {}
// interface Platform {}
}
}
export {};
+16
View File
@@ -0,0 +1,16 @@
<!doctype html>
<html lang="it">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<title>Centraline 37100Lab</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap" rel="stylesheet" />
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>
@@ -1,6 +1,6 @@
<script>
import StationRow from './StationRow.svelte';
import groups from '../lib/groups.json';
import groups from '$lib/groups.json';
export let stations = [];
@@ -1,10 +1,10 @@
<script>
import { onDestroy } from 'svelte';
import { getDayRange, formatDayParam } from '../lib/timezone.js';
import { fetchDay } from '../lib/api.js';
import { downloadCsv, buildFilename } from '../lib/csv.js';
import { buildCsvAsync } from '../lib/csv-pool.js';
import { enqueue } from '../lib/download-pool.js';
import { getDayRange, formatDayParam } from '$lib/timezone.js';
import { fetchDay } from '$lib/api.js';
import { downloadCsv, buildFilename } from '$lib/csv.js';
import { buildCsvAsync } from '$lib/csv-pool.js';
import { enqueue } from '$lib/download-pool.js';
export let station;
+1
View File
@@ -0,0 +1 @@
// place files you want to import through the `$lib` alias in this folder.
-9
View File
@@ -1,9 +0,0 @@
import { mount } from 'svelte'
import './app.css'
import App from './App.svelte'
const app = mount(App, {
target: document.getElementById('app'),
})
export default app
+6
View File
@@ -0,0 +1,6 @@
<script>
import '../app.css';
let { children } = $props();
</script>
{@render children()}
+1
View File
@@ -0,0 +1 @@
export const ssr = false;
+2 -2
View File
@@ -1,7 +1,7 @@
<script>
import { onMount } from 'svelte';
import { fetchStations } from './lib/api.js';
import StationList from './components/StationList.svelte';
import { fetchStations } from '$lib/api.js';
import StationList from '$lib/components/StationList.svelte';
let stations = [];
let loading = true;