Small fixes (#196)

This commit is contained in:
Thomas Miceli
2024-01-04 04:44:56 +01:00
parent 7c1d6e8bfd
commit d85917bfb2
20 changed files with 41 additions and 27 deletions

View File

@ -8,6 +8,7 @@ document.addEventListener('DOMContentLoaded', () => {
});
const setSetting = (key: string, value: string) => {
// @ts-ignore
const baseUrl = window.opengist_base_url || '';
const data = new URLSearchParams();
data.append('key', key);

2
public/embed.scss vendored
View File

@ -11,7 +11,7 @@
@tailwind components;
@tailwind utilities;
@config "../tailwind-embed.config.js";
@config "./tailwind-embed.config.js";
.html {
-webkit-text-size-adjust: 100%;

12
public/postcss.config.js vendored Normal file
View File

@ -0,0 +1,12 @@
module.exports = {
plugins: {
'postcss-import': {},
'tailwindcss/nesting': {},
tailwindcss: {
config: "./public/tailwind.config.js",
},
autoprefixer: {},
'postcss-selector-namespace': {namespace() {return (process.env.EMBED) ? '.opengist-embed' : '';}},
cssnano: {},
},
}

2
public/style.css vendored
View File

@ -2,7 +2,7 @@
@tailwind components;
@tailwind utilities;
@config "../tailwind.config.js";
@config "./tailwind.config.js";
@layer base {
ul, ol {

48
public/tailwind-embed.config.js vendored Normal file
View File

@ -0,0 +1,48 @@
const colors = require('tailwindcss/colors')
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./templates/pages/gist_embed.html",
],
theme: {
colors: {
white: colors.white,
black: colors.black,
gray: {
50: "#EEEFF1",
100: "#DEDFE3",
200: "#BABCC5",
300: "#999CA8",
400: "#75798A",
500: "#585B68",
600: "#464853",
700: "#363840",
800: "#232429",
900: "#131316"
},
primary: {
50: '#d6e1ff',
100: '#d1dfff',
200: '#b9d2fe',
300: '#84b1fb',
400: '#74a4f6',
500: '#588fee',
600: '#3c79e2',
700: '#356fc0',
800: '#2d6195',
900: '#2a5574',
950: '#173040',
},
slate: colors.slate
},
extend: {
borderWidth: {
'1': '1px',
}
},
},
plugins: [],
darkMode: 'class',
}

51
public/tailwind.config.js vendored Normal file
View File

@ -0,0 +1,51 @@
const colors = require('tailwindcss/colors')
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./templates/**/*.html",
],
theme: {
colors: {
transparent: 'transparent',
current: 'currentColor',
white: colors.white,
black: colors.black,
gray: {
50: "#EEEFF1",
100: "#DEDFE3",
200: "#BABCC5",
300: "#999CA8",
400: "#75798A",
500: "#585B68",
600: "#464853",
700: "#363840",
800: "#232429",
900: "#131316"
},
rose: colors.rose,
primary: {
50: '#d6e1ff',
100: '#d1dfff',
200: '#b9d2fe',
300: '#84b1fb',
400: '#74a4f6',
500: '#588fee',
600: '#3c79e2',
700: '#356fc0',
800: '#2d6195',
900: '#2a5574',
950: '#173040',
},
slate: colors.slate
},
extend: {
borderWidth: {
'1': '1px',
}
},
},
plugins: [require("@tailwindcss/typography"),require('@tailwindcss/forms')],
darkMode: 'class',
}

12
public/tsconfig.json Normal file
View File

@ -0,0 +1,12 @@
{
"compilerOptions": {
"esModuleInterop": true
},
"files": [
"main.ts",
"editor.ts",
"admin.ts",
"gist.ts",
"embed.ts",
],
}

22
public/vite.config.js vendored Normal file
View File

@ -0,0 +1,22 @@
import { defineConfig } from 'vite'
export default defineConfig({
root: './public',
build: {
// generate manifest.json in outDir
outDir: '',
assetsDir: 'assets',
manifest: true,
rollupOptions: {
input: [
'./public/main.ts',
'./public/editor.ts',
'./public/admin.ts',
'./public/gist.ts',
'./public/embed.ts'
]
},
assetsInlineLimit: 0,
}
})