-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
1,117 additions
and
61 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<link rel="icon" href="%sveltekit.assets%/favicon.png" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
%sveltekit.head% | ||
</head> | ||
<body data-sveltekit-preload-data="hover"> | ||
<div style="display: contents">%sveltekit.body%</div> | ||
</body> | ||
<head> | ||
<meta charset="utf-8"> | ||
<link rel="icon" href="%sveltekit.assets%/favicon.png"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
%sveltekit.head% | ||
<!-- SMUI Styles --> | ||
<link rel="stylesheet" href="/smui.css" media="(prefers-color-scheme: light)"> | ||
<link rel="stylesheet" href="/smui-dark.css" media="screen and (prefers-color-scheme: dark)"> | ||
<!-- Hint where we get fonts from. --> | ||
<link rel="preconnect" href="https://fonts.googleapis.com"> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
<!-- Material Icons, Roboto, and Roboto Mono fonts --> | ||
<link href="https://fonts.googleapis.com/css2?family=Material+Icons&Roboto+Mono:ital@0;1&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet"> | ||
</head> | ||
<body data-sveltekit-preload-data="hover"> | ||
<div style="display: contents">%sveltekit.body%</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
export async function load({ fetch }) { | ||
const res = await fetch(`http://localhost:3000/containers`); | ||
const as_obj = await res.json(); | ||
//console.log({as_obj}); | ||
return as_obj; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<script> | ||
import DataTable, { Head, Body, Row, Cell } from '@smui/data-table'; | ||
export let data; | ||
</script> | ||
|
||
<h1>Fetched from API, Displayed with Material UI</h1> | ||
|
||
<a href="https://sveltematerialui.com/demo/data-table/">Svelte Material UI Data Table info</a> | ||
<hr/> | ||
<DataTable stickyHeader table$aria-label="Containers" style="width: 100%;"> | ||
<Head> | ||
<Row> | ||
<Cell>ID</Cell> | ||
<Cell>Ship Name</Cell> | ||
</Row> | ||
</Head> | ||
<Body> | ||
{#each data.containers as container (container.id)} | ||
<Row> | ||
<Cell>{container.id}</Cell> | ||
<Cell>{container.nameOfShip}</Cell> | ||
</Row> | ||
{/each} | ||
</Body> | ||
</DataTable> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
@use 'sass:color'; | ||
|
||
@use '@material/theme/color-palette'; | ||
|
||
// Svelte Colors! | ||
@use '@material/theme/index' as theme with ( | ||
$primary: #ff3e00, | ||
$secondary: #676778, | ||
$surface: #fff, | ||
$background: #fff, | ||
$error: color-palette.$red-900 | ||
); | ||
|
||
html, | ||
body { | ||
background-color: theme.$surface; | ||
color: theme.$on-surface; | ||
} | ||
|
||
a { | ||
color: #40b3ff; | ||
} | ||
a:visited { | ||
color: color.scale(#40b3ff, $lightness: -35%); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
@use 'sass:color'; | ||
|
||
@use '@material/theme/color-palette'; | ||
|
||
// Svelte Colors! (Dark Theme) | ||
@use '@material/theme/index' as theme with ( | ||
$primary: #ff3e00, | ||
$secondary: color.scale(#676778, $whiteness: -10%), | ||
$surface: color.adjust(color-palette.$grey-900, $blue: +4), | ||
$background: #000, | ||
$error: color-palette.$red-700 | ||
); | ||
|
||
html, | ||
body { | ||
background-color: #000; | ||
color: theme.$on-surface; | ||
} | ||
|
||
a { | ||
color: #40b3ff; | ||
} | ||
a:visited { | ||
color: color.scale(#40b3ff, $lightness: -35%); | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.