diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..afea8717 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM node:19.8-alpine3.16 + +EXPOSE 3000 +RUN npm i -g pnpm + +WORKDIR /online-energieausweis +COPY ./package.json ./ +RUN pnpm install --prod +COPY . . + +CMD ["pnpm", "run", "build:production"] \ No newline at end of file diff --git a/astro.config.mjs b/astro.config.mjs index 08071ca4..fd949b8c 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,19 +1,23 @@ import { defineConfig } from "astro/config"; - import svelte from "@astrojs/svelte"; -// https://astro.build/config import tailwind from "@astrojs/tailwind"; // https://astro.build/config import node from "@astrojs/node"; +// https://astro.build/config +import mdx from "@astrojs/mdx"; + // https://astro.build/config export default defineConfig({ - integrations: [svelte(), tailwind()], + integrations: [svelte(), tailwind(), mdx()], outDir: "./dist", output: "server", adapter: node({ - mode: "standalone" - }) + mode: "middleware" + }), + server: { + port: 3000 + } }); \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..0e9f0a47 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,20 @@ +version: '3' +services: + online-energieausweis: + build: ./ + container_name: online-energieausweis + command: pnpm run dev --host + links: + - db + environment: + PORT: 3000 + DB_CONNECTION: postgres://user:secure1@db/main + NODE_ENV: "development" + ports: + - 3000:3000 + volumes: + - ./:/online-energieausweis + db: + build: ../database + ports: + - "5436:5432" \ No newline at end of file diff --git a/package.json b/package.json index ee9cc903..4c03ec2a 100644 --- a/package.json +++ b/package.json @@ -10,16 +10,18 @@ "astro": "astro", "test:e2e": "cypress run", "test:unit": "vitest", - "format": "prettier --write ." + "format": "prettier --write .", + "build:production": "astro build && node server.js" }, "private": true, "dependencies": { + "@astrojs/mdx": "^0.18.2", "@astrojs/node": "^5.1.0", "@astrojs/svelte": "^2.0.2", "@astrojs/tailwind": "^3.1.0", "astro": "^2.1.7", - "bcrypt": "^5.1.0", "cookiejs": "^2.1.2", + "express": "^4.18.2", "jwt-simple": "^0.5.6", "knex": "^2.4.2", "moment": "^2.29.4", @@ -31,7 +33,6 @@ "zod": "^3.21.4" }, "devDependencies": { - "@types/bcrypt": "^5.0.0", "@types/uuid": "^9.0.1", "@typescript-eslint/eslint-plugin": "^5.36.1", "@typescript-eslint/parser": "^5.36.1", diff --git a/server.js b/server.js new file mode 100644 index 00000000..04dce09b --- /dev/null +++ b/server.js @@ -0,0 +1,8 @@ +import express from 'express'; +import { handler as ssrHandler } from './dist/server/entry.mjs'; + +const app = express(); +app.use(express.static('dist/client/')) +app.use(ssrHandler); + +app.listen(80); \ No newline at end of file diff --git a/src/components/Ausweis/Hilfe.astro b/src/components/Ausweis/Hilfe.astro new file mode 100644 index 00000000..705b9615 --- /dev/null +++ b/src/components/Ausweis/Hilfe.astro @@ -0,0 +1,26 @@ +
+
+ +
+ Gerne helfen wir Ihnen wenn Sie nicht weiterkommen oder Fragen haben. Kurze Fragen zum Formular oder der Ausweisart werden kostenfrei telefonisch unter 040/209339850 beantwortet (bis 5min). Sollten Sie Unterstützung bei der Erstellung benötgen oder lieber die Arbeit von unserem Ingenieurbüro erledigen lassen, bieten wir Ihnen folgende Hilfen an. Bitte treffen Sie Ihre Auswahl und klicken auf weiter: +
+ +
+
Verbrauchsausweis online inkl. ausführlicher telefonischer Beratung für 60 € inkl. MwSt.
+
+
+
+
Verbrauchsausweis offline für 180 € inkl. MwSt. (Sie schicken uns 3 Verbrauchsabrechnungen zu)
+
+
+
+
Bedarfsausweis offline für 290 € inkl. MwSt. (Sie schicken uns Grundriss- und Ansichtspläne zu)
+
+
+ +
+
+
+ +
+
\ No newline at end of file diff --git a/src/components/Ausweis/PerformanceScore.svelte b/src/components/Ausweis/PerformanceScore.svelte new file mode 100644 index 00000000..9668d52a --- /dev/null +++ b/src/components/Ausweis/PerformanceScore.svelte @@ -0,0 +1,20 @@ +
+
+
+
+ pfeil +
+
+ pfeil +
+
+
+
diff --git a/src/components/Ausweis/ProgressBar.astro b/src/components/Ausweis/ProgressBar.astro new file mode 100644 index 00000000..41d7f1fc --- /dev/null +++ b/src/components/Ausweis/ProgressBar.astro @@ -0,0 +1,31 @@ +
+
+
+
+
+ 1 + 2 + 3 +
+ +
+

Gebäudedaten

+

Kundendaten

+

Kaufabschluss

+
+
+ + \ No newline at end of file diff --git a/src/components/BoxWithHeading.astro b/src/components/BoxWithHeading.astro new file mode 100644 index 00000000..2a6d5a23 --- /dev/null +++ b/src/components/BoxWithHeading.astro @@ -0,0 +1,14 @@ +--- +export type Props = { + heading: string +} + +const { heading } = Astro.props; +--- + +
+

{heading}

+
+ +
+
\ No newline at end of file diff --git a/src/components/Header.astro b/src/components/Header.astro index 0bf1b2bf..369710bb 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -1,4 +1,7 @@ --- +import { isLoggedIn } from "../lib/UI/isLoggedIn"; + +const loggedIn = isLoggedIn(Astro); ---
@@ -24,11 +27,11 @@ Energieausweis erstellenEnergieausweis erstellen Kontakt - AGB - Login + AGB + {loggedIn ? Profil : Login} hamburger diff --git a/src/components/Reviews/Diagrams.astro b/src/components/Reviews/Diagrams.astro new file mode 100644 index 00000000..7adc597e --- /dev/null +++ b/src/components/Reviews/Diagrams.astro @@ -0,0 +1,446 @@ +
+
+

Bedienfreundlichkeit

+
+
+
+
+ + + + + + + + + + + + + + + + 74.6% + + + + + 10.4% + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
NoteWert1
Wärmepumpe204
Solarsystem460
Brennwertkessel460
andere Wärmeerzeuger3,306
+
+
+
+ +
+
+
+
+

Preis/Leistung

+
+
+
+
+ + + + + + 22.1% + + + + 26.2% + + + + 26.2% + + + + + 25.4% + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
NoteWert1
Wärmepumpe31
Solarsystem32
Brennwertkessel32
andere Wärmeerzeuger27
+
+
+
+ +
+
+
+
+
+

Kundenservice

+
+
+
+
+ + + + + + + + + + 28% + + + + 28% + + + + + 38.5% + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
NoteWert1
Wärmepumpe77
Solarsystem56
Brennwertkessel56
andere Wärmeerzeuger11
+
+
+
+ +
+
+
+
+
diff --git a/src/components/SidebarLeft.astro b/src/components/SidebarLeft.astro index f1d3caca..654f50b6 100644 --- a/src/components/SidebarLeft.astro +++ b/src/components/SidebarLeft.astro @@ -1,91 +1,195 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/src/components/SidebarRight.astro b/src/components/SidebarRight.astro index 790d4cbb..f3ccf0f9 100644 --- a/src/components/SidebarRight.astro +++ b/src/components/SidebarRight.astro @@ -124,3 +124,10 @@ + + + \ No newline at end of file diff --git a/src/components/Widget.astro b/src/components/Widget.astro deleted file mode 100644 index 223473d4..00000000 --- a/src/components/Widget.astro +++ /dev/null @@ -1,75 +0,0 @@ -
- - -
-
-
-
-
Gebäudetyp
-
-
-
Anlass
-
- - - -
-
- -
-
-
-

powered by

- - IB Cornelsen - -
-
-
-
- - - -
\ No newline at end of file diff --git a/src/components/Widget.svelte b/src/components/Widget.svelte new file mode 100644 index 00000000..0cf84e7a --- /dev/null +++ b/src/components/Widget.svelte @@ -0,0 +1,381 @@ + + +
+
+
+
Gebäudetyp
+ +
+ +
+
Anlass
+ +
+
+ +
+ +
{@html oea_result}
+ +
+
+
+
+ + +
+
+
+
diff --git a/src/layouts/AusweisLayout.astro b/src/layouts/AusweisLayout.astro new file mode 100644 index 00000000..ed3f2e04 --- /dev/null +++ b/src/layouts/AusweisLayout.astro @@ -0,0 +1,121 @@ +--- +import "../style/global.scss" +import Footer from '../components/Footer.astro'; +import Header from '../components/Header.astro'; +import SidebarLeft from '../components/SidebarLeft.astro'; +import SidebarRight from '../components/SidebarRight.astro'; + +export interface Props { + title: string; +} + +const { title } = Astro.props; + +const schema = JSON.stringify({ + '@context': 'http://schema.org', + '@type': 'Corporation', + name: 'IB Cornelsen', + alternateName: 'online-energieausweis.org', + url: 'https://online-energieausweis.org', + logo: 'https://online-energieausweis.org/ib-cornelsen.png', + address: { + '@type': 'PostalAddress', + streetAddress: 'Katendeich 5A', + addressLocality: 'Hamburg', + postalCode: '21035', + addressCountry: 'Deutschland', + email: 'info@online-energieausweis.org', + }, + contactPoint: { + '@type': 'ContactPoint', + telephone: '+49-040-209339850', + faxNumber: '+49-040-209339859', + contactType: 'customer service', + areaServed: 'DE', + availableLanguage: 'German', + }, +}); +--- + + + + + + + + + + + + + + + + + + + + + + + + + + + {title || 'Energieausweis online erstellen - Online Energieausweis'} + + + + +
+
+ +
+ +
+
+