Migrated the project from Svelte and Vite to SvelteKit
This commit is contained in:
Vendored
+13
@@ -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 {};
|
||||
@@ -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;
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
// place files you want to import through the `$lib` alias in this folder.
|
||||
@@ -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
|
||||
@@ -0,0 +1,6 @@
|
||||
<script>
|
||||
import '../app.css';
|
||||
let { children } = $props();
|
||||
</script>
|
||||
|
||||
{@render children()}
|
||||
@@ -0,0 +1 @@
|
||||
export const ssr = false;
|
||||
@@ -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;
|
||||
Reference in New Issue
Block a user