diff --git a/README.md b/README.md index b19f781..8646ee0 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ git filter-branch -f --index-filter 'git rm -rf --cached --ignore-unmatch .yarn/ git filter-branch -f --index-filter 'git rm -rf --cached --ignore-unmatch docs' HEAD git push --force ``` - +jbfdbcvjslksfdlkrljhfgdsnfhn - [ ] anpassen - `.env` diff --git a/api/collections/fields/pagebuilder.yml b/api/collections/fields/pagebuilder.yml index 3e03617..b049974 100644 --- a/api/collections/fields/pagebuilder.yml +++ b/api/collections/fields/pagebuilder.yml @@ -7,6 +7,11 @@ meta: folding: previewFolded: titleForWork previewUnfolded: titleForWork + metaElements: + - maxWidth + - iconBackgroundImage + - iconBackgroundTitle + - noGap subFields: - name: title type: string @@ -42,6 +47,8 @@ subFields: previewFolded: contentType previewUnfolded: contentType direction: horizontal + metaElements: + subFields: - name: contentType type: string @@ -76,6 +83,7 @@ subFields: type: object meta: label: Boxenliste + widget: containerLessObject dependsOn: eval: $parent.contentType == 'boxlist' subFields: @@ -93,6 +101,7 @@ subFields: type: object meta: label: Icon Informationsbrett + widget: containerLessObject dependsOn: eval: $parent.contentType == 'iconInfoBoard' subFields: diff --git a/api/hooks/forms/post_return.js b/api/hooks/forms/post_return.js index ff59b4c..08b27e2 100644 --- a/api/hooks/forms/post_return.js +++ b/api/hooks/forms/post_return.js @@ -67,7 +67,7 @@ // @ts-ignore delete tempForm[undefined] context.smtp.sendMail({ - to: "allkids.erfurt@gmail.com", + to: "info@allkids-erfurt.de", from: "mail@webmakers.de", subject: "AllKids " + formTitle, html: context.tpl.execute(context.fs.readFile("templates/form_mail.html"), { diff --git a/api/hooks/lib/ssr.js b/api/hooks/lib/ssr.js index 0f1def6..eb304d0 100644 --- a/api/hooks/lib/ssr.js +++ b/api/hooks/lib/ssr.js @@ -3,6 +3,7 @@ const { apiClientBaseURL } = require("../config-client") /** * convert object to string * @param {any} obj object + * @returns {Object | undefined} */ function obj2str(obj) { if (Array.isArray(obj)) { diff --git a/api/hooks/lib/utils.js b/api/hooks/lib/utils.js index c5cc25f..d08ae54 100644 --- a/api/hooks/lib/utils.js +++ b/api/hooks/lib/utils.js @@ -9,6 +9,7 @@ function log(str) { /** * convert object to string * @param {any} obj object + * @returns {Object | undefined} */ function obj2str(obj) { if (Array.isArray(obj)) { @@ -46,16 +47,22 @@ function clearSSRCache() { var info = context.db.deleteMany("ssr", {}) context.response.header("X-SSR-Cleared", info.removed) } - +/** + * @param {{ [x: string]: any; }[]} dbObjs + */ function calculateAverageDynamically(dbObjs) { const sumObj = {} let count = 0 - dbObjs.forEach((obj) => { + dbObjs.forEach((/** @type {{ [x: string]: any; }} */ obj) => { accumulate(obj, sumObj) count++ }) + /** + * @param {{ [x: string]: any; }} sourceObj + * @param {{ [x: string]: any; }} targetObj + */ function accumulate(sourceObj, targetObj) { for (const key in sourceObj) { if (typeof sourceObj[key] === "number") { @@ -67,6 +74,9 @@ function calculateAverageDynamically(dbObjs) { } } + /** + * @param {{ [x: string]: any; }} targetObj + */ function average(targetObj) { for (const key in targetObj) { if (typeof targetObj[key] === "number") { @@ -81,6 +91,9 @@ function calculateAverageDynamically(dbObjs) { return sumObj } +/** + * @param {string} url + */ function run(url) { const response = context.http .fetch(url, { @@ -133,6 +146,7 @@ function setUpQuery(subPath = "/") { let query = `${api}?` for (let key in parameters) { + // @ts-ignore query += `${key}=${parameters[key]}&` } query += params // Append other parameters without URL encoding diff --git a/api/hooks/lighthouse/post_create.js b/api/hooks/lighthouse/post_create.js index 4855200..e3f1038 100644 --- a/api/hooks/lighthouse/post_create.js +++ b/api/hooks/lighthouse/post_create.js @@ -7,6 +7,7 @@ var { setUpQuery, calculateAverageDynamically, run } = require("../lib/utils") } let dbObjs = [] urls.forEach((url) => { + console.log("URL:", url) dbObjs.push(run(url)) }) let dbObject = calculateAverageDynamically(dbObjs) diff --git a/frontend/src/lib/components/Footer.svelte b/frontend/src/lib/components/Footer.svelte index 45b26b1..59d734f 100644 --- a/frontend/src/lib/components/Footer.svelte +++ b/frontend/src/lib/components/Footer.svelte @@ -16,8 +16,7 @@

Tel.: 0178 4124555

-

Email: allkids.erfurt@gmail.com

-

Erstellt von: Robin Grenzdörfer

+

Email: info@allkids-erfurt.de

@@ -32,9 +31,8 @@ class="darklight" on:click="{() => { const body = document.querySelector('body') - if (body) { - body.classList.toggle('darkTheme') - } + if (body) body.classList.toggle('darkTheme') + $darkMode = !$darkMode }}" > diff --git a/frontend/src/lib/components/pagebuilder/form/datepicker.svelte b/frontend/src/lib/components/pagebuilder/form/datepicker.svelte index 5a251c5..4e84789 100644 --- a/frontend/src/lib/components/pagebuilder/form/datepicker.svelte +++ b/frontend/src/lib/components/pagebuilder/form/datepicker.svelte @@ -2,7 +2,6 @@ import { CalendarView } from "fluent-svelte" import type { Writable } from "svelte/store" - export let groupTitle: string export let datePickerProps: DatePickerProps export let formValues: Writable @@ -112,7 +111,395 @@