Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3a1fcc587e | |||
| 2c87b8dde1 | |||
| 62f209a99d | |||
| 2bdcce6c9e |
@@ -0,0 +1,13 @@
|
|||||||
|
.DS_Store
|
||||||
|
node_modules
|
||||||
|
/build
|
||||||
|
/.svelte-kit
|
||||||
|
/package
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
!.env.example
|
||||||
|
|
||||||
|
# Ignore files for PNPM, NPM and YARN
|
||||||
|
pnpm-lock.yaml
|
||||||
|
package-lock.json
|
||||||
|
yarn.lock
|
||||||
+20
-4
@@ -1,15 +1,31 @@
|
|||||||
|
/** @type { import("eslint").Linter.Config } */
|
||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
extends: ['eslint:recommended', 'prettier'],
|
extends: [
|
||||||
plugins: ['svelte3'],
|
'eslint:recommended',
|
||||||
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
|
'plugin:@typescript-eslint/recommended',
|
||||||
|
'plugin:svelte/recommended',
|
||||||
|
'prettier'
|
||||||
|
],
|
||||||
|
parser: '@typescript-eslint/parser',
|
||||||
|
plugins: ['@typescript-eslint'],
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
sourceType: 'module',
|
sourceType: 'module',
|
||||||
ecmaVersion: 2020
|
ecmaVersion: 2020,
|
||||||
|
extraFileExtensions: ['.svelte']
|
||||||
},
|
},
|
||||||
env: {
|
env: {
|
||||||
browser: true,
|
browser: true,
|
||||||
es2017: true,
|
es2017: true,
|
||||||
node: true
|
node: true
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: ['*.svelte'],
|
||||||
|
parser: 'svelte-eslint-parser',
|
||||||
|
parserOptions: {
|
||||||
|
parser: '@typescript-eslint/parser'
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
};
|
};
|
||||||
|
|||||||
+3
-1
@@ -1,8 +1,10 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
node_modules
|
node_modules
|
||||||
build/
|
/build
|
||||||
/.svelte-kit
|
/.svelte-kit
|
||||||
/package
|
/package
|
||||||
.env
|
.env
|
||||||
.env.*
|
.env.*
|
||||||
!.env.example
|
!.env.example
|
||||||
|
vite.config.js.timestamp-*
|
||||||
|
vite.config.ts.timestamp-*
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
# Ignore files for PNPM, NPM and YARN
|
||||||
|
pnpm-lock.yaml
|
||||||
|
package-lock.json
|
||||||
|
yarn.lock
|
||||||
+12
-1
@@ -2,5 +2,16 @@
|
|||||||
"useTabs": true,
|
"useTabs": true,
|
||||||
"singleQuote": true,
|
"singleQuote": true,
|
||||||
"trailingComma": "none",
|
"trailingComma": "none",
|
||||||
"printWidth": 100
|
"printWidth": 100,
|
||||||
|
"plugins": [
|
||||||
|
"prettier-plugin-svelte"
|
||||||
|
],
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"files": "*.svelte",
|
||||||
|
"options": {
|
||||||
|
"parser": "svelte"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
+7
-7
@@ -1,6 +1,6 @@
|
|||||||
# create-svelte
|
# create-svelte
|
||||||
|
|
||||||
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte);
|
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte).
|
||||||
|
|
||||||
## Creating a project
|
## Creating a project
|
||||||
|
|
||||||
@@ -8,14 +8,12 @@ If you're seeing this, you've probably already done this step. Congrats!
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# create a new project in the current directory
|
# create a new project in the current directory
|
||||||
npm init svelte@next
|
npm create svelte@latest
|
||||||
|
|
||||||
# create a new project in my-app
|
# create a new project in my-app
|
||||||
npm init svelte@next my-app
|
npm create svelte@latest my-app
|
||||||
```
|
```
|
||||||
|
|
||||||
> Note: the `@next` is temporary
|
|
||||||
|
|
||||||
## Developing
|
## Developing
|
||||||
|
|
||||||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
||||||
@@ -29,10 +27,12 @@ npm run dev -- --open
|
|||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
Before creating a production version of your app, install an [adapter](https://kit.svelte.dev/docs#adapters) for your target environment. Then:
|
To create a production version of your app:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm run build
|
npm run build
|
||||||
```
|
```
|
||||||
|
|
||||||
> You can preview the built app with `npm run preview`, regardless of whether you installed an adapter. This should _not_ be used to serve your app in production.
|
You can preview the production build with `npm run preview`.
|
||||||
|
|
||||||
|
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
|
||||||
|
|||||||
Generated
+2808
-5050
File diff suppressed because it is too large
Load Diff
+29
-22
@@ -1,29 +1,36 @@
|
|||||||
{
|
{
|
||||||
"name": "webapp",
|
"name": "webapp",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
|
"type": "module",
|
||||||
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "svelte-kit dev",
|
"dev": "vite dev",
|
||||||
"build": "svelte-kit build",
|
"build": "vite build",
|
||||||
"package": "svelte-kit package",
|
"preview": "vite preview",
|
||||||
"preview": "svelte-kit preview",
|
"prepare": "svelte-kit sync || echo ''",
|
||||||
"lint": "prettier --ignore-path .gitignore --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .",
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||||
"format": "prettier --ignore-path .gitignore --write --plugin-search-dir=. ."
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
||||||
|
"lint": "prettier --check . && eslint .",
|
||||||
|
"format": "prettier --write ."
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sveltejs/adapter-auto": "next",
|
"@eslint/compat": "^1.2.5",
|
||||||
"@sveltejs/adapter-static": "^1.0.0-next.26",
|
"@eslint/js": "^9.18.0",
|
||||||
"@sveltejs/kit": "next",
|
"@sveltejs/adapter-static": "^3.0.8",
|
||||||
"autoprefixer": "^10.4.2",
|
"@sveltejs/kit": "^2.16.0",
|
||||||
"cssnano": "^5.0.15",
|
"@sveltejs/vite-plugin-svelte": "^5.0.0",
|
||||||
"eslint": "^7.32.0",
|
"@tailwindcss/vite": "^4.0.0",
|
||||||
"eslint-config-prettier": "^8.3.0",
|
"eslint": "^9.18.0",
|
||||||
"eslint-plugin-svelte3": "^3.2.1",
|
"eslint-config-prettier": "^10.0.1",
|
||||||
"postcss": "^8.4.5",
|
"eslint-plugin-svelte": "^2.46.1",
|
||||||
"prettier": "^2.4.1",
|
"postcss": "^8.5.1",
|
||||||
"prettier-plugin-svelte": "^2.4.0",
|
"prettier": "^3.4.2",
|
||||||
"svelte": "^3.44.0",
|
"prettier-plugin-svelte": "^3.3.3",
|
||||||
"svelte-preprocess": "^4.10.1",
|
"svelte": "^5.0.0",
|
||||||
"tailwindcss": "^3.0.13"
|
"svelte-check": "^4.0.0",
|
||||||
},
|
"tailwindcss": "4.0.0",
|
||||||
"type": "module"
|
"typescript": "^5.0.0",
|
||||||
|
"typescript-eslint": "8.20.0",
|
||||||
|
"vite": "^6.0.0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
const tailwindcss = require("tailwindcss")
|
|
||||||
const autoprefixer = require("autoprefixer")
|
|
||||||
const cssnano = require("cssnano")
|
|
||||||
|
|
||||||
const mode = process.env.NODE_ENV
|
|
||||||
const dev = mode === "development"
|
|
||||||
|
|
||||||
const config = {
|
|
||||||
plugins: [
|
|
||||||
tailwindcss(),
|
|
||||||
autoprefixer(),
|
|
||||||
!dev &&
|
|
||||||
cssnano({
|
|
||||||
preset: "default",
|
|
||||||
})
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = config
|
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
@import "tailwindcss";
|
||||||
@tailwind base;
|
@tailwind base;
|
||||||
@tailwind components;
|
@tailwind components;
|
||||||
@tailwind utilities;
|
@tailwind utilities;
|
||||||
|
|||||||
Vendored
+13
@@ -0,0 +1,13 @@
|
|||||||
|
// See https://kit.svelte.dev/docs/types#app
|
||||||
|
// for information about these interfaces
|
||||||
|
declare global {
|
||||||
|
namespace App {
|
||||||
|
// interface Error {}
|
||||||
|
// interface Locals {}
|
||||||
|
// interface PageData {}
|
||||||
|
// interface PageState {}
|
||||||
|
// interface Platform {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export {};
|
||||||
+8
-6
@@ -1,13 +1,15 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="description" content="" />
|
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
|
||||||
<link rel="icon" href="%svelte.assets%/favicon.png" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
%svelte.head%
|
%sveltekit.head%
|
||||||
</head>
|
</head>
|
||||||
<body>
|
|
||||||
<div id="svelte">%svelte.body%</div>
|
<body data-sveltekit-preload-data="hover">
|
||||||
|
<div style="display: contents">%sveltekit.body%</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
// place files you want to import through the `$lib` alias in this folder.
|
||||||
|
Before Width: | Height: | Size: 111 B After Width: | Height: | Size: 111 B |
@@ -0,0 +1,16 @@
|
|||||||
|
<script>
|
||||||
|
import Logo from './Logo.svelte';
|
||||||
|
import Hamburger from './Hamburger.svelte';
|
||||||
|
import Menu from './Menu.svelte';
|
||||||
|
|
||||||
|
export let sidebar = false;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<header class="flex justify-between bg-gray-200 p-2 items-center text-gray-600 border-b-2">
|
||||||
|
<nav class="flex">
|
||||||
|
<Hamburger bind:open={sidebar} />
|
||||||
|
<Logo />
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<Menu />
|
||||||
|
</header>
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
<script>
|
||||||
|
// export let open = false
|
||||||
|
|
||||||
|
// function close() {
|
||||||
|
// open = false
|
||||||
|
// }
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!--<aside id="default-sidebar" class="fixed top-0 left-0 z-40 w-64 h-screen transition-transform -translate-x-full sm:translate-x-0" aria-label="Sidebar">-->
|
||||||
|
<aside id="default-sidebar" class="w-64 h-screen transition-transform -translate-x-full sm:translate-x-0" aria-label="Sidebar">
|
||||||
|
<div class="h-full px-3 py-4 overflow-y-auto bg-gray-50 dark:bg-gray-800">
|
||||||
|
<ul class="space-y-2 font-medium">
|
||||||
|
<li>
|
||||||
|
<a href="/" class="flex items-center p-2 text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700 group">
|
||||||
|
<svg class="w-5 h-5 text-gray-500 transition duration-75 dark:text-gray-400 group-hover:text-gray-900 dark:group-hover:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 22 21">
|
||||||
|
<path d="M16.975 11H10V4.025a1 1 0 0 0-1.066-.998 8.5 8.5 0 1 0 9.039 9.039.999.999 0 0 0-1-1.066h.002Z"/>
|
||||||
|
<path d="M12.5 0c-.157 0-.311.01-.565.027A1 1 0 0 0 11 1.02V10h8.975a1 1 0 0 0 1-.935c.013-.188.028-.374.028-.565A8.51 8.51 0 0 0 12.5 0Z"/>
|
||||||
|
</svg>
|
||||||
|
<span class="ms-3">Dashboard</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/" class="flex items-center p-2 text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700 group">
|
||||||
|
<svg class="shrink-0 w-5 h-5 text-gray-500 transition duration-75 dark:text-gray-400 group-hover:text-gray-900 dark:group-hover:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 18 18">
|
||||||
|
<path d="M6.143 0H1.857A1.857 1.857 0 0 0 0 1.857v4.286C0 7.169.831 8 1.857 8h4.286A1.857 1.857 0 0 0 8 6.143V1.857A1.857 1.857 0 0 0 6.143 0Zm10 0h-4.286A1.857 1.857 0 0 0 10 1.857v4.286C10 7.169 10.831 8 11.857 8h4.286A1.857 1.857 0 0 0 18 6.143V1.857A1.857 1.857 0 0 0 16.143 0Zm-10 10H1.857A1.857 1.857 0 0 0 0 11.857v4.286C0 17.169.831 18 1.857 18h4.286A1.857 1.857 0 0 0 8 16.143v-4.286A1.857 1.857 0 0 0 6.143 10Zm10 0h-4.286A1.857 1.857 0 0 0 10 11.857v4.286c0 1.026.831 1.857 1.857 1.857h4.286A1.857 1.857 0 0 0 18 16.143v-4.286A1.857 1.857 0 0 0 16.143 10Z"/>
|
||||||
|
</svg>
|
||||||
|
<span class="flex-1 ms-3 whitespace-nowrap">Kanban</span>
|
||||||
|
<span class="inline-flex items-center justify-center px-2 ms-3 text-sm font-medium text-gray-800 bg-gray-100 rounded-full dark:bg-gray-700 dark:text-gray-300">Pro</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/" class="flex items-center p-2 text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700 group">
|
||||||
|
<svg class="shrink-0 w-5 h-5 text-gray-500 transition duration-75 dark:text-gray-400 group-hover:text-gray-900 dark:group-hover:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
|
||||||
|
<path d="m17.418 3.623-.018-.008a6.713 6.713 0 0 0-2.4-.569V2h1a1 1 0 1 0 0-2h-2a1 1 0 0 0-1 1v2H9.89A6.977 6.977 0 0 1 12 8v5h-2V8A5 5 0 1 0 0 8v6a1 1 0 0 0 1 1h8v4a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-4h6a1 1 0 0 0 1-1V8a5 5 0 0 0-2.582-4.377ZM6 12H4a1 1 0 0 1 0-2h2a1 1 0 0 1 0 2Z"/>
|
||||||
|
</svg>
|
||||||
|
<span class="flex-1 ms-3 whitespace-nowrap">Inbox</span>
|
||||||
|
<span class="inline-flex items-center justify-center w-3 h-3 p-3 ms-3 text-sm font-medium text-blue-800 bg-blue-100 rounded-full dark:bg-blue-900 dark:text-blue-300">3</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/" class="flex items-center p-2 text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700 group">
|
||||||
|
<svg class="shrink-0 w-5 h-5 text-gray-500 transition duration-75 dark:text-gray-400 group-hover:text-gray-900 dark:group-hover:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 18">
|
||||||
|
<path d="M14 2a3.963 3.963 0 0 0-1.4.267 6.439 6.439 0 0 1-1.331 6.638A4 4 0 1 0 14 2Zm1 9h-1.264A6.957 6.957 0 0 1 15 15v2a2.97 2.97 0 0 1-.184 1H19a1 1 0 0 0 1-1v-1a5.006 5.006 0 0 0-5-5ZM6.5 9a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9ZM8 10H5a5.006 5.006 0 0 0-5 5v2a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1v-2a5.006 5.006 0 0 0-5-5Z"/>
|
||||||
|
</svg>
|
||||||
|
<span class="flex-1 ms-3 whitespace-nowrap">Users</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/" class="flex items-center p-2 text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700 group">
|
||||||
|
<svg class="shrink-0 w-5 h-5 text-gray-500 transition duration-75 dark:text-gray-400 group-hover:text-gray-900 dark:group-hover:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 18 20">
|
||||||
|
<path d="M17 5.923A1 1 0 0 0 16 5h-3V4a4 4 0 1 0-8 0v1H2a1 1 0 0 0-1 .923L.086 17.846A2 2 0 0 0 2.08 20h13.84a2 2 0 0 0 1.994-2.153L17 5.923ZM7 9a1 1 0 0 1-2 0V7h2v2Zm0-5a2 2 0 1 1 4 0v1H7V4Zm6 5a1 1 0 1 1-2 0V7h2v2Z"/>
|
||||||
|
</svg>
|
||||||
|
<span class="flex-1 ms-3 whitespace-nowrap">Products</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/" class="flex items-center p-2 text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700 group">
|
||||||
|
<svg class="shrink-0 w-5 h-5 text-gray-500 transition duration-75 dark:text-gray-400 group-hover:text-gray-900 dark:group-hover:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 18 16">
|
||||||
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M1 8h11m0 0L8 4m4 4-4 4m4-11h3a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-3"/>
|
||||||
|
</svg>
|
||||||
|
<span class="flex-1 ms-3 whitespace-nowrap">Sign In</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/" class="flex items-center p-2 text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700 group">
|
||||||
|
<svg class="shrink-0 w-5 h-5 text-gray-500 transition duration-75 dark:text-gray-400 group-hover:text-gray-900 dark:group-hover:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
|
||||||
|
<path d="M5 5V.13a2.96 2.96 0 0 0-1.293.749L.879 3.707A2.96 2.96 0 0 0 .13 5H5Z"/>
|
||||||
|
<path d="M6.737 11.061a2.961 2.961 0 0 1 .81-1.515l6.117-6.116A4.839 4.839 0 0 1 16 2.141V2a1.97 1.97 0 0 0-1.933-2H7v5a2 2 0 0 1-2 2H0v11a1.969 1.969 0 0 0 1.933 2h12.134A1.97 1.97 0 0 0 16 18v-3.093l-1.546 1.546c-.413.413-.94.695-1.513.81l-3.4.679a2.947 2.947 0 0 1-1.85-.227 2.96 2.96 0 0 1-1.635-3.257l.681-3.397Z"/>
|
||||||
|
<path d="M8.961 16a.93.93 0 0 0 .189-.019l3.4-.679a.961.961 0 0 0 .49-.263l6.118-6.117a2.884 2.884 0 0 0-4.079-4.078l-6.117 6.117a.96.96 0 0 0-.263.491l-.679 3.4A.961.961 0 0 0 8.961 16Zm7.477-9.8a.958.958 0 0 1 .68-.281.961.961 0 0 1 .682 1.644l-.315.315-1.36-1.36.313-.318Zm-5.911 5.911 4.236-4.236 1.359 1.359-4.236 4.237-1.7.339.341-1.699Z"/>
|
||||||
|
</svg>
|
||||||
|
<span class="flex-1 ms-3 whitespace-nowrap">Sign Up</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<script>
|
||||||
|
import Sidebar from '$lib/menu/Sidebar.svelte';
|
||||||
|
import '../app.css';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<main class="flex w-full h-full">
|
||||||
|
<Sidebar />
|
||||||
|
|
||||||
|
<slot></slot>
|
||||||
|
</main>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export const prerender = true;
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<main class="w-full h-full">
|
||||||
|
<h1>Welcome to SvelteKit</h1>
|
||||||
|
<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p>
|
||||||
|
</main>
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
<main class="p-4 text-gray-300">
|
|
||||||
<svg height="100%" width="100%">
|
|
||||||
<line x1=0 y1=4 x2=400 y2=4/>
|
|
||||||
<line x1=0 y1=34 x2=200 y2=34/>
|
|
||||||
<line x1=0 y1=64 x2=300 y2=64/>
|
|
||||||
<line x1=0 y1=94 x2=280 y2=94/>
|
|
||||||
</svg>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
svg line {
|
|
||||||
stroke: currentColor;
|
|
||||||
stroke-width: 12;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
<script>
|
|
||||||
import Navbar from "./menu/_Navbar.svelte";
|
|
||||||
import Sidebar from "./menu/_Sidebar.svelte";
|
|
||||||
import "../app.css";
|
|
||||||
|
|
||||||
let open = false;
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<main class="w-full h-full">
|
|
||||||
<Sidebar bind:open/>
|
|
||||||
<Navbar bind:sidebar={open}/>
|
|
||||||
|
|
||||||
<slot></slot>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
:global(body) {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 640px) {
|
|
||||||
main {
|
|
||||||
max-width: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
<script>
|
|
||||||
import Main from "./_Main.svelte";
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<main class="w-full h-full">
|
|
||||||
<h1>Welcome to SvelteKit</h1>
|
|
||||||
<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p>
|
|
||||||
|
|
||||||
<Main/>
|
|
||||||
</main>
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
<script>
|
|
||||||
import Logo from './_Logo.svelte';
|
|
||||||
import Hamburger from './_Hamburger.svelte';
|
|
||||||
import Menu from './_Menu.svelte';
|
|
||||||
|
|
||||||
export let sidebar = false;
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<header class="flex justify-between bg-gray-200 p-2 items-center text-gray-600 border-b-2">
|
|
||||||
<nav class="flex">
|
|
||||||
<Hamburger bind:open={sidebar}/>
|
|
||||||
<Logo/>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<Menu/>
|
|
||||||
</header>
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
<script>
|
|
||||||
export let open = false
|
|
||||||
|
|
||||||
function close() {
|
|
||||||
open = false
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<aside class="absolute w-full h-full bg-gray-200 border-r-2 shadow-lg z-10" class:open>
|
|
||||||
<nav class="p-12 text-xl">
|
|
||||||
<a class="block" href="/" on:click={close}>Home</a>
|
|
||||||
<a class="block" href="/about" on:click={close}>About</a>
|
|
||||||
</nav>
|
|
||||||
</aside>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
aside {
|
|
||||||
left: -100%;
|
|
||||||
transition: left 0.3s ease-in-out
|
|
||||||
}
|
|
||||||
|
|
||||||
.open {
|
|
||||||
left: 0
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
+10
-11
@@ -1,18 +1,17 @@
|
|||||||
import adapter from "@sveltejs/adapter-static";
|
import adapter from '@sveltejs/adapter-static';
|
||||||
import preprocess from "svelte-preprocess";
|
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
||||||
|
|
||||||
/** @type {import('@sveltejs/kit').Config} */
|
/** @type {import('@sveltejs/kit').Config} */
|
||||||
const config = {
|
const config = {
|
||||||
preprocess: [
|
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
|
||||||
preprocess({
|
// for more information about preprocessors
|
||||||
postcss: true,
|
preprocess: vitePreprocess(),
|
||||||
}),
|
|
||||||
],
|
|
||||||
kit: {
|
|
||||||
adapter: adapter(),
|
|
||||||
|
|
||||||
// hydrate the <div id="svelte"> element in src/app.html
|
kit: {
|
||||||
target: '#svelte'
|
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
|
||||||
|
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
|
||||||
|
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
|
||||||
|
adapter: adapter(),
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"extends": "./.svelte-kit/tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"allowJs": true,
|
||||||
|
"checkJs": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"strict": true,
|
||||||
|
"moduleResolution": "bundler"
|
||||||
|
}
|
||||||
|
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
|
||||||
|
// except $lib which is handled by https://kit.svelte.dev/docs/configuration#files
|
||||||
|
//
|
||||||
|
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
|
||||||
|
// from the referenced tsconfig.json - TypeScript does not merge them in
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
import { sveltekit } from '@sveltejs/kit/vite';
|
||||||
|
import { defineConfig } from 'vite';
|
||||||
|
import tailwindcss from '@tailwindcss/vite';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [
|
||||||
|
tailwindcss(),
|
||||||
|
sveltekit()
|
||||||
|
]
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user