set up base layout

This commit is contained in:
Malte Teichert
2024-05-19 17:20:22 +02:00
parent 98969c8173
commit f2467815a1
9 changed files with 130 additions and 82 deletions

View File

@@ -1,7 +1,5 @@
{
"prettier.documentSelectors": [
"**/*.svelte"
],
"prettier.documentSelectors": ["**/*.svelte"],
"tailwindCSS.classAttributes": [
"class",
"accent",
@@ -117,4 +115,4 @@
"width",
"zIndex"
]
}
}

View File

@@ -1,45 +1,45 @@
{
"name": "",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check . && eslint .",
"format": "prettier --write ."
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"@types/eslint": "^8.56.0",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.35.1",
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.1.2",
"svelte": "^4.2.7",
"svelte-check": "^3.6.0",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^5.0.3",
"postcss": "8.4.38",
"autoprefixer": "10.4.19",
"tailwindcss": "3.4.3",
"@skeletonlabs/skeleton": "2.10.0",
"@skeletonlabs/tw-plugin": "0.4.0",
"vite-plugin-tailwind-purgecss": "0.3.3",
"@tailwindcss/typography": "0.5.13",
"@tailwindcss/forms": "0.5.7",
"@types/node": "20.12.12"
},
"type": "module",
"dependencies": {
"@floating-ui/dom": "1.6.5"
}
}
"name": "openai-3-generator",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check . && eslint .",
"format": "prettier --write ."
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"@types/eslint": "^8.56.0",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.35.1",
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.1.2",
"svelte": "^4.2.7",
"svelte-check": "^3.6.0",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^5.0.3",
"postcss": "8.4.38",
"autoprefixer": "10.4.19",
"tailwindcss": "3.4.3",
"@skeletonlabs/skeleton": "2.10.0",
"@skeletonlabs/tw-plugin": "0.4.0",
"vite-plugin-tailwind-purgecss": "0.3.3",
"@tailwindcss/typography": "0.5.13",
"@tailwindcss/forms": "0.5.7",
"@types/node": "20.12.12"
},
"type": "module",
"dependencies": {
"@floating-ui/dom": "1.6.5"
}
}

View File

@@ -1,6 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
autoprefixer: {}
}
};

View File

@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en" class="dark">
<head>
<meta charset="utf-8" />

View File

@@ -1,5 +1,6 @@
<script lang="ts">
import '../app.postcss';
import { AppBar } from '@skeletonlabs/skeleton';
// Floating UI for Popups
import { computePosition, autoUpdate, flip, shift, offset, arrow } from '@floating-ui/dom';
@@ -7,4 +8,25 @@
storePopup.set({ computePosition, autoUpdate, flip, shift, offset, arrow });
</script>
<slot />
<div class="w-full h-full">
<AppBar>
<svelte:fragment slot="lead">
<h4 class="h4">
OpenAPI generator
<code class="ml-2 variant-filled-success p-1 px-2 rounded-container-token"> 3.0.0 </code>
</h4>
</svelte:fragment>
<svelte:fragment slot="trail">
<a
href="https://swagger.io/docs/specification/basic-structure/"
target="_blank"
class="btn variant-filled-surface"
>
Schema Reference
</a>
</svelte:fragment>
</AppBar>
<div class="mx-8 my-4">
<slot />
</div>
</div>

View File

@@ -1,15 +1,40 @@
<!-- YOU CAN DELETE EVERYTHING IN THIS PAGE -->
<script lang="ts">
import { TabGroup, Tab } from '@skeletonlabs/skeleton';
<div class="container h-full mx-auto flex justify-center items-center">
<div class="space-y-5">
<h1 class="h1">Let's get cracking bones!</h1>
<p>Start by exploring:</p>
<ul>
<li><code class="code">/src/routes/+layout.svelte</code> - barebones layout</li>
<li><code class="code">/src/app.postcss</code> - app wide css</li>
<li>
<code class="code">/src/routes/+page.svelte</code> - this page, you can replace the contents
</li>
</ul>
</div>
</div>
let tabSet: number = 0;
</script>
<TabGroup>
<Tab bind:group={tabSet} name="info" value={0}>
<h4 class="h4">Info</h4>
</Tab>
<Tab bind:group={tabSet} name="authentication" value={1}>
<h4 class="h4">Authentication</h4>
</Tab>
<Tab bind:group={tabSet} name="servers" value={2}>
<h4 class="h4">Servers</h4>
</Tab>
<Tab bind:group={tabSet} name="paths" value={3}>
<h4 class="h4">Paths</h4>
</Tab>
<Tab bind:group={tabSet} name="components" value={4}>
<h4 class="h4">Components</h4>
</Tab>
<svelte:fragment slot="panel">
{#if tabSet === 0}
<p>Info</p>
{/if}
{#if tabSet === 1}
<p>Authentication</p>
{/if}
{#if tabSet === 2}
<p>Servers</p>
{/if}
{#if tabSet === 3}
<p>Paths</p>
{/if}
{#if tabSet === 4}
<p>Components</p>
{/if}
</svelte:fragment>
</TabGroup>

View File

@@ -7,9 +7,9 @@ const config = {
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// for more information about preprocessors
preprocess: [vitePreprocess()],
vitePlugin: {
inspector: true,
inspector: true
},
kit: {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
@@ -18,4 +18,4 @@ const config = {
adapter: adapter()
}
};
export default config;
export default config;

View File

@@ -1,14 +1,17 @@
import { join } from 'path'
import type { Config } from 'tailwindcss'
import { join } from 'path';
import type { Config } from 'tailwindcss';
import forms from '@tailwindcss/forms';
import typography from '@tailwindcss/typography';
import { skeleton } from '@skeletonlabs/tw-plugin'
import { skeleton } from '@skeletonlabs/tw-plugin';
export default {
darkMode: 'class',
content: ['./src/**/*.{html,js,svelte,ts}', join(require.resolve('@skeletonlabs/skeleton'), '../**/*.{html,js,svelte,ts}')],
content: [
'./src/**/*.{html,js,svelte,ts}',
join(require.resolve('@skeletonlabs/skeleton'), '../**/*.{html,js,svelte,ts}')
],
theme: {
extend: {},
extend: {}
},
plugins: [
forms,
@@ -18,10 +21,10 @@ export default {
preset: [
{
name: 'skeleton',
enhancements: true,
},
],
},
}),
],
enhancements: true
}
]
}
})
]
} satisfies Config;

View File

@@ -4,4 +4,4 @@ import { defineConfig } from 'vite';
export default defineConfig({
plugins: [sveltekit(), purgeCss()]
});
});