mirror of
https://github.com/gosticks/complai.git
synced 2025-10-16 11:45:36 +00:00
feat: add cross platform css prefix
This commit is contained in:
parent
de58f0714e
commit
2aba054d5e
@ -1,11 +1,13 @@
|
||||
const express = require('express');
|
||||
const express = require("express");
|
||||
const cors = require("cors");
|
||||
bodyParser = require('body-parser');
|
||||
bodyParser = require("body-parser");
|
||||
const app = express();
|
||||
|
||||
app.use(cors({
|
||||
origin: 'https://complai.de/'
|
||||
}));
|
||||
app.use(
|
||||
cors({
|
||||
origin: "https://complai.de/",
|
||||
})
|
||||
);
|
||||
|
||||
// support parsing of application/json type post data
|
||||
app.use(bodyParser.json());
|
||||
@ -22,7 +24,7 @@ app.route("/register").get((req, res) => {
|
||||
} else {
|
||||
res.status(403).end(false);
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
var companies = [];
|
||||
|
||||
@ -47,7 +49,7 @@ app.route("/company").post((req, res) => {
|
||||
|
||||
var id = companies.push(new Company(email, nace, region, size, name));
|
||||
res.status(200).end(id);
|
||||
})
|
||||
});
|
||||
|
||||
// Poll notifications for company
|
||||
app.route("/interpretLaw").post((req, res) => {
|
||||
@ -56,7 +58,7 @@ app.route("/interpretLaw").post((req, res) => {
|
||||
});
|
||||
|
||||
app.listen(8543, () => {
|
||||
console.log('server is runing at port 8543')
|
||||
console.log("server is runing at port 8543");
|
||||
});
|
||||
|
||||
async function getResponse(lawtext, id, res) {
|
||||
@ -68,7 +70,11 @@ async function getResponse(lawtext, id, res) {
|
||||
const openai = new OpenAIApi(configuration);
|
||||
|
||||
const company = companies[id];
|
||||
const prompt = "Betriff eine Firma mit NACE code " + company.nace + " das folgende Gesetzt? Dann, und nur dann, geben Sie in der nächsten Zeile ausführliche Empfehlungen an Unternehmen, die diese Dienste anbieten, zum Umgang mit diesem Gesetz:\n" + lawtext;
|
||||
const prompt =
|
||||
"Betriff eine Firma mit NACE code " +
|
||||
company.nace +
|
||||
" das folgende Gesetzt? Dann, und nur dann, geben Sie in der nächsten Zeile ausführliche Empfehlungen an Unternehmen, die diese Dienste anbieten, zum Umgang mit diesem Gesetz:\n" +
|
||||
lawtext;
|
||||
console.log("sending to openai: " + prompt);
|
||||
|
||||
try {
|
||||
@ -79,7 +85,7 @@ async function getResponse(lawtext, id, res) {
|
||||
max_tokens: 1000,
|
||||
top_p: 1,
|
||||
frequency_penalty: 0,
|
||||
presence_penalty: 0
|
||||
presence_penalty: 0,
|
||||
});
|
||||
|
||||
console.log("got from openai: " + JSON.stringify(response.data));
|
||||
|
||||
@ -7,12 +7,6 @@ Codepen: https://codepen.io/supah/
|
||||
|
||||
-->
|
||||
<div>
|
||||
<div class="wrapper">
|
||||
<div class="ball" />
|
||||
<div class="ball" />
|
||||
<div class="ball" />
|
||||
</div>
|
||||
|
||||
<svg>
|
||||
<defs>
|
||||
<filter id="filter">
|
||||
@ -27,6 +21,12 @@ Codepen: https://codepen.io/supah/
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="ball" />
|
||||
<div class="ball" />
|
||||
<div class="ball" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
@ -34,7 +34,6 @@ Codepen: https://codepen.io/supah/
|
||||
$radius: 80px;
|
||||
|
||||
svg {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
@ -44,6 +43,7 @@ Codepen: https://codepen.io/supah/
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
filter: url('#filter');
|
||||
-webkit-filter: url('#filter');
|
||||
}
|
||||
|
||||
.ball {
|
||||
|
||||
@ -111,6 +111,7 @@ body {
|
||||
--color-light: #fff;
|
||||
--color-light-raw: #fff;
|
||||
--color-primary: rgb(82, 188, 131); //#005F6A;
|
||||
--color-primary-2: rgb(44, 110, 75); //#005F6A;
|
||||
--color-primary-raw: 82, 188, 131; //#005F6A;
|
||||
--color-secondary: #72ecfa;
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
<img src="/nicholas.jpeg" />
|
||||
</div>
|
||||
<span>
|
||||
<h3 class="name">Nicholas</h3>
|
||||
<h3 class="name">Nicholas Trofin</h3>
|
||||
<span>Flutter Dev</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -1,17 +1,14 @@
|
||||
import adapter from '@sveltejs/adapter-static';
|
||||
import { vitePreprocess } from '@sveltejs/kit/vite';
|
||||
import postcssJitProps from 'postcss-jit-props';
|
||||
import autoprefixer from 'autoprefixer';
|
||||
import OpenProps from 'open-props';
|
||||
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
const config = {
|
||||
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
|
||||
// for more information about preprocessors
|
||||
preprocess: vitePreprocess({
|
||||
postcss: {
|
||||
plugins: [postcssJitProps(OpenProps)]
|
||||
}
|
||||
}),
|
||||
preprocess: vitePreprocess({}),
|
||||
|
||||
kit: {
|
||||
adapter: adapter()
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { sveltekit } from '@sveltejs/kit/vite';
|
||||
import svg from '@poppanator/sveltekit-svg';
|
||||
import type { UserConfig } from 'vite';
|
||||
import autoprefixer from 'autoprefixer';
|
||||
|
||||
const config: UserConfig = {
|
||||
plugins: [
|
||||
@ -20,7 +21,12 @@ const config: UserConfig = {
|
||||
]
|
||||
}
|
||||
})
|
||||
]
|
||||
],
|
||||
css: {
|
||||
postcss: {
|
||||
plugins: [autoprefixer]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user