added aframe, nipplejs and skeleton (with custom theme)

changed adapter to static
This commit is contained in:
Felix Baumgärtner 2024-01-13 23:30:21 +01:00
parent 148bcf5f42
commit b8ad31544e
18 changed files with 2663 additions and 1363 deletions

2185
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -8,14 +8,25 @@
"preview": "vite preview"
},
"devDependencies": {
"@skeletonlabs/skeleton": "^2.7.0",
"@skeletonlabs/tw-plugin": "^0.3.1",
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/adapter-static": "^3.0.1",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"@tailwindcss/typography": "0.5.10",
"@tailwindcss/forms": "0.5.7",
"autoprefixer": "^10.4.16",
"postcss": "^8.4.32",
"postcss-load-config": "^5.0.2",
"svelte": "^4.2.7",
"tailwindcss": "^3.4.0",
"vite": "^5.0.3"
"tailwindcss": "^3.3.6",
"vite": "^5.0.3",
"vite-plugin-tailwind-purgecss": "0.2.0"
},
"type": "module"
"type": "module",
"dependencies": {
"nipplejs": "^0.10.1",
"@floating-ui/dom": "1.5.4"
}
}

13
postcss.config.cjs Normal file
View File

@ -0,0 +1,13 @@
const tailwindcss = require("tailwindcss");
const autoprefixer = require("autoprefixer");
const config = {
plugins: [
//Some plugins, like tailwindcss/nesting, need to run before Tailwind,
tailwindcss(),
//But others, like autoprefixer, need to run after,
autoprefixer
]
};
module.exports = config;

View File

@ -1,3 +0,0 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

View File

@ -4,9 +4,12 @@
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script src="%sveltekit.assets%/nipplejs.js"></script>
<script src="https://aframe.io/releases/1.5.0/aframe.min.js"></script>
<script src="https://unpkg.com/mqtt/dist/mqtt.min.js"></script>
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
<body data-sveltekit-preload-data="hover" data-theme="vin-theme">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>

73
src/app.pcss Normal file
View File

@ -0,0 +1,73 @@
/* Write your global styles here, in PostCSS syntax */
@tailwind base;
@tailwind base;
@tailwind components;
@tailwind utilities;
/*
* Legal Disclaimer for Student/Education licence
*
* Student/Education Licence - Our package includes OTF, TTF, WOFF and WOFF2 font formats.
*
* For expiry date please check the relevant Licence Document.
*
* Licence to produce and publish work within educational context.
* Any commercial exploitation is subject to separate licencing by the client.
* The student/educational license expires at the end of the study period.
* An upgrade to a full licence for professional use is required after expiry.
* The upgrade within 3 months of expiry will be available at a reduced price for the educational Licence Holder.
*
*/
@font-face {
font-family: "CircularMono";
src: url("/fonts/CircularXXMonoEduWeb-Regular.woff") format("woff");
}
@font-face {
font-family: "CircularMono";
src: url("/fonts/CircularXXMonoEduWeb-Regular.woff2") format("woff2");
}
@font-face {
font-family: "Circular";
src: url("/fonts/CircularXXEduWeb-Regular.woff") format("woff");
font-weight: 400;
}
@font-face {
font-family: "Circular";
src: url("/fonts/CircularXXEduWeb-Regular.woff2") format("woff2");
font-weight: 400;
}
@font-face {
font-family: "Circular";
src: url("/fonts/CircularXXEduWeb-Bold.woff") format("woff");
font-weight: 700;
}
@font-face {
font-family: "Circular";
src: url("/fonts/CircularXXEduWeb-Bold.woff2") format("woff2");
font-weight: 700;
}
:root [data-theme='vin-theme'] {
--theme-font-family-base: 'Circular', sans-serif;
--theme-font-family-heading: 'Circular', sans-serif;
}
* {
@apply tracking-tight text-gray-950 transition-all;
}
h1 {
@apply mb-6;
}
html, body {
@apply bg-gray-50;
}
p {
@apply text-gray-500;
}

2
src/routes/+layout.js Normal file
View File

@ -0,0 +1,2 @@
export const ssr = false;
export const prerender = true;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

1477
static/nipplejs.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +1,21 @@
import adapter from '@sveltejs/adapter-auto';
import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
/** @type {import('@sveltejs/kit').Config} */
const config = {
extensions: ['.svelte'],
kit: {
// 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()
adapter: adapter({
// default options are shown. On some platforms
// these options are set automatically — see below
pages: 'build',
assets: 'build',
fallback: undefined,
precompress: false,
strict: true
})
},
preprocess: vitePreprocess()
preprocess: [vitePreprocess({})]
};
export default config;

View File

@ -1,9 +1,124 @@
import { join } from 'path';
import forms from '@tailwindcss/forms';
import typography from '@tailwindcss/typography';
import { skeleton } from '@skeletonlabs/tw-plugin';
import { vinTheme } from './vin-theme';
/** @type {import('tailwindcss').Config} */
export default {
content: ['./src/**/*.{html,js,svelte,ts}'],
darkMode: 'class',
content: ['./src/**/*.{html,js,svelte,ts}', join(require.resolve('@skeletonlabs/skeleton'), '../**/*.{html,js,svelte,ts}')],
theme: {
extend: {},
fontFamily: {
sans: ['Circular', 'sans-serif'],
mono: ['CircularMono', 'sans-serif'],
},
plugins: [],
extend: {
// colors: {
// 'red': {
// 50: '#fdf3f3',
// 100: '#fbe5e5',
// 200: '#f8d0d0',
// 300: '#f2afaf',
// 400: '#e87d7d',
// 500: '#db5858',
// 600: '#c73b3b',
// 700: '#a72e2e',
// 800: '#8b2929',
// 900: '#742828',
// 950: '#3e1111',
// },
// 'yellow': {
// 50: '#fcfaee',
// 100: '#f6f1cf',
// 200: '#ede19a',
// 300: '#e8d67d',
// 400: '#ddbc42',
// 500: '#d5a12b',
// 600: '#bc7f23',
// 700: '#9c5e21',
// 800: '#804a20',
// 900: '#693e1e',
// 950: '#3c200c',
// },
// 'green': {
// 50: '#ecfdf3',
// 100: '#d1fae1',
// 200: '#a8f2c8',
// 300: '#7de8b2',
// 400: '#36d188',
// 500: '#12b76e',
// 600: '#079459',
// 700: '#05774a',
// 800: '#075e3d',
// 900: '#074d33',
// 950: '#022c1d',
// },
// 'cyan': {
// 50: '#eefdfc',
// 100: '#d5f8f7',
// 200: '#b0f1ef',
// 300: '#7de8e8',
// 400: '#3bd3d5',
// 500: '#1fb6bb',
// 600: '#1d939d',
// 700: '#1e7680',
// 800: '#216069',
// 900: '#1f515a',
// 950: '#0f353d',
// },
// 'blue': {
// 50: '#f1f7fd',
// 100: '#dfedfa',
// 200: '#c7dff6',
// 300: '#a1caef',
// 400: '#7db3e8',
// 500: '#5390de',
// 600: '#3e74d2',
// 700: '#3561c0',
// 800: '#31509c',
// 900: '#2c467c',
// 950: '#1f2c4c',
// },
// 'indigo': {
// 50: '#eff3fe',
// 100: '#e3e7fc',
// 200: '#cbd4fa',
// 300: '#acb7f5',
// 400: '#8b92ee',
// 500: '#7d7de8',
// 600: '#5d53d8',
// 700: '#5044be',
// 800: '#41399a',
// 900: '#38357a',
// 950: '#221f47',
// },
// 'gray': {
// 50: '#e6e6e6',
// 100: '#d9d9d9',
// 200: '#c2c2c2',
// 300: '#a1a1a1',
// 400: '#787878',
// 500: '#5e5e5e',
// 600: '#4d4d4d',
// 700: '#404040',
// 800: '#363636',
// 900: '#2e2e2e',
// 950: '#1a1a1a',
// },
// },
},
},
plugins: [
forms,
typography,
skeleton({
themes: {
custom: [
vinTheme
]
}
}),
],
}

103
vin-theme Normal file
View File

@ -0,0 +1,103 @@
import type { CustomThemeConfig } from '@skeletonlabs/tw-plugin';
export const vinTheme: CustomThemeConfig = {
name: 'vin-theme',
properties: {
// =~= Theme Properties =~=
"--theme-font-family-base": `Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'`,
"--theme-font-family-heading": `Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'`,
"--theme-font-color-base": "var(--color-surface-400)",
"--theme-font-color-dark": "var(--color-surface-50)",
"--theme-rounded-base": "12px",
"--theme-rounded-container": "12px",
"--theme-border-base": "0px",
// =~= Theme On-X Colors =~=
"--on-primary": "var(--color-surface-500)",
"--on-secondary": "var(--color-surface-500)",
"--on-tertiary": "var(--color-surface-500)",
"--on-success": "var(--color-surface-500)",
"--on-warning": "var(--color-surface-500)",
"--on-error": "var(--color-surface-500)",
"--on-surface": "var(--color-surface-50)",
// =~= Theme Colors =~=
// primary | #7DE8B2
"--color-primary-50": "236 252 243", // #ecfcf3
"--color-primary-100": "229 250 240", // #e5faf0
"--color-primary-200": "223 249 236", // #dff9ec
"--color-primary-300": "203 246 224", // #cbf6e0
"--color-primary-400": "164 239 201", // #a4efc9
"--color-primary-500": "125 232 178", // #7DE8B2
"--color-primary-600": "113 209 160", // #71d1a0
"--color-primary-700": "94 174 134", // #5eae86
"--color-primary-800": "75 139 107", // #4b8b6b
"--color-primary-900": "61 114 87", // #3d7257
// secondary | #7DE8E8
"--color-secondary-50": "236 252 252", // #ecfcfc
"--color-secondary-100": "229 250 250", // #e5fafa
"--color-secondary-200": "223 249 249", // #dff9f9
"--color-secondary-300": "203 246 246", // #cbf6f6
"--color-secondary-400": "164 239 239", // #a4efef
"--color-secondary-500": "125 232 232", // #7DE8E8
"--color-secondary-600": "113 209 209", // #71d1d1
"--color-secondary-700": "94 174 174", // #5eaeae
"--color-secondary-800": "75 139 139", // #4b8b8b
"--color-secondary-900": "61 114 114", // #3d7272
// tertiary | #7D7DE8
"--color-tertiary-50": "236 236 252", // #ececfc
"--color-tertiary-100": "229 229 250", // #e5e5fa
"--color-tertiary-200": "223 223 249", // #dfdff9
"--color-tertiary-300": "203 203 246", // #cbcbf6
"--color-tertiary-400": "164 164 239", // #a4a4ef
"--color-tertiary-500": "125 125 232", // #7D7DE8
"--color-tertiary-600": "113 113 209", // #7171d1
"--color-tertiary-700": "94 94 174", // #5e5eae
"--color-tertiary-800": "75 75 139", // #4b4b8b
"--color-tertiary-900": "61 61 114", // #3d3d72
// success | #7DE8B2
"--color-success-50": "236 252 243", // #ecfcf3
"--color-success-100": "229 250 240", // #e5faf0
"--color-success-200": "223 249 236", // #dff9ec
"--color-success-300": "203 246 224", // #cbf6e0
"--color-success-400": "164 239 201", // #a4efc9
"--color-success-500": "125 232 178", // #7DE8B2
"--color-success-600": "113 209 160", // #71d1a0
"--color-success-700": "94 174 134", // #5eae86
"--color-success-800": "75 139 107", // #4b8b6b
"--color-success-900": "61 114 87", // #3d7257
// warning | #E8D67D
"--color-warning-50": "252 249 236", // #fcf9ec
"--color-warning-100": "250 247 229", // #faf7e5
"--color-warning-200": "249 245 223", // #f9f5df
"--color-warning-300": "246 239 203", // #f6efcb
"--color-warning-400": "239 226 164", // #efe2a4
"--color-warning-500": "232 214 125", // #E8D67D
"--color-warning-600": "209 193 113", // #d1c171
"--color-warning-700": "174 161 94", // #aea15e
"--color-warning-800": "139 128 75", // #8b804b
"--color-warning-900": "114 105 61", // #72693d
// error | #E87D7D
"--color-error-50": "252 236 236", // #fcecec
"--color-error-100": "250 229 229", // #fae5e5
"--color-error-200": "249 223 223", // #f9dfdf
"--color-error-300": "246 203 203", // #f6cbcb
"--color-error-400": "239 164 164", // #efa4a4
"--color-error-500": "232 125 125", // #E87D7D
"--color-error-600": "209 113 113", // #d17171
"--color-error-700": "174 94 94", // #ae5e5e
"--color-error-800": "139 75 75", // #8b4b4b
"--color-error-900": "114 61 61", // #723d3d
// surface | #1A1A1A
"--color-surface-50": "221 221 221", // #dddddd
"--color-surface-100": "209 209 209", // #d1d1d1
"--color-surface-200": "198 198 198", // #c6c6c6
"--color-surface-300": "163 163 163", // #a3a3a3
"--color-surface-400": "95 95 95", // #5f5f5f
"--color-surface-500": "26 26 26", // #1A1A1A
"--color-surface-600": "23 23 23", // #171717
"--color-surface-700": "20 20 20", // #141414
"--color-surface-800": "16 16 16", // #101010
"--color-surface-900": "13 13 13", // #0d0d0d
}
}

View File

@ -1,6 +1,7 @@
import { purgeCss } from 'vite-plugin-tailwind-purgecss';
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [sveltekit()]
plugins: [sveltekit(), purgeCss()]
});