Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Make demo do something #164

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,18 @@
"format": "prettier --write ."
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/kit": "^2.5.5",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.1.2",
"svelte": "^4.2.12",
"svelte-check": "^3.6.0",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^5.0.3",
"vitest": "^1.0.0"
"@sveltejs/adapter-auto": "^3.2.0",
"@sveltejs/adapter-node": "^5.0.1",
"@sveltejs/kit": "^2.5.7",
"@sveltejs/vite-plugin-svelte": "^3.1.0",
"prettier": "^3.2.5",
"prettier-plugin-svelte": "^3.2.3",
"svelte": "^4.2.15",
"svelte-check": "^3.7.1",
"tslib": "^2.6.2",
"typescript": "^5.4.5",
"vite": "^5.2.11",
"vitest": "^1.6.0"
},
"type": "module"
}
39 changes: 39 additions & 0 deletions demo/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<script lang="ts">
import '../styles.css';
</script>

<div class="layout-box">
<div class="layout-row layout-header">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/form">Form</a></li>
<li><a href="/basic">Basic</a></li>
<li><a href="/reactive-disabled">Reactive Disabled</a></li>
</ul>
</div>

<div class="layout-row layout-content">
<div id="layout-content">
<slot />
</div>
</div>

<div class="layout-row layout-footer">
<div>Footer</div>
</div>
</div>

<style>
ul {
display: flex;
flex-direction: row;
justify-content: center;
list-style-type: none;
margin: 0;
padding: 0;
}

li {
margin: 0 0.5em;
}
</style>
Empty file added demo/src/routes/+page.svelte
Empty file.
51 changes: 51 additions & 0 deletions demo/src/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
*,
::after,
::before {
box-sizing: border-box;
}

* {
margin: 0;
}

#layout-contents {
display: flex;
margin-top: 50px;
margin-bottom: 20px;
height: max-a;
border: 1px solid cyan;
}

.layout-box {
display: flex;
flex-flow: column;
position: absolute;
min-height: 100%;
width: 100%;
}

.layout-row {
margin-bottom: 5px;
margin-left: 5px;
margin-right: 15px;
padding-left: 3px;
}

.layout-box .layout-row {
border: 1px dotted grey;
}

.layout-box .layout-row.layout-header {
border: 1px solid transparent;
flex: 0 1 auto;
margin-left: 1rem;
}

.layout-box .layout-row.layout-content {
flex: 1 1 auto;
overflow: auto;
}

.layout-box .layout-row.layout-footer {
flex: 0 1 auto;
}
2 changes: 1 addition & 1 deletion demo/svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import adapter from '@sveltejs/adapter-auto';
import adapter from '@sveltejs/adapter-node';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';

/** @type {import('@sveltejs/kit').Config} */
Expand Down
Loading