Compare commits

..

4 Commits

Author SHA1 Message Date
philipp lang 62ab03bf15 Add parent attributes
continuous-integration/drone/push Build is passing Details
2024-05-03 22:20:14 +02:00
philipp lang 46d2e653c3 Lint 2024-05-03 21:52:29 +02:00
philipp lang 1b096e7780 Add hot shortcut to run dev server 2024-05-03 21:46:40 +02:00
philipp lang 892fbe3fb3 Lint 2024-05-03 21:46:29 +02:00
3 changed files with 52 additions and 36 deletions

View File

@ -1,33 +1,34 @@
{ {
"name": "vite-theme", "name": "vite-theme",
"version": "1.0.0", "version": "1.0.0",
"description": "Vite Theme", "description": "Vite Theme",
"main": "index.js", "main": "index.js",
"directories": { "directories": {
"test": "tests" "test": "tests"
}, },
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"production": "vite build" "hot": "vite",
}, "production": "vite build"
"keywords": [], },
"author": "", "keywords": [],
"license": "ISC", "author": "",
"devDependencies": { "license": "ISC",
"autoprefixer": "^10.4.0", "devDependencies": {
"postcss": "^8.4.4", "autoprefixer": "^10.4.0",
"postcss-import": "^14.0.2", "postcss": "^8.4.4",
"tailwindcss": "latest", "postcss-import": "^14.0.2",
"vite": "^2.7.1", "tailwindcss": "latest",
"vite-plugin-live-reload": "^2.1.0" "vite": "^2.7.1",
}, "vite-plugin-live-reload": "^2.1.0"
"dependencies": { },
"@tailwindcss/forms": "^0.5.7", "dependencies": {
"@tailwindcss/typography": "^0.5.0", "@tailwindcss/forms": "^0.5.7",
"alpinejs": "^3.13.5", "@tailwindcss/typography": "^0.5.0",
"dayjs": "^1.11.10", "alpinejs": "^3.13.5",
"dotenv": "^10.0.0", "dayjs": "^1.11.10",
"flowbite": "^2.2.1", "dotenv": "^10.0.0",
"flowbite-datepicker": "^1.2.6" "flowbite": "^2.2.1",
} "flowbite-datepicker": "^1.2.6"
}
} }

View File

@ -1,5 +1,6 @@
<div id="anfrageform" x-data="form"> {% set maingrid = "grid sm:grid-cols-2 md:grid-cols-1 lg:grid-cols-2 gap-3" %}
<div id="anfrageform" x-data="form">
<form data-request="anfrage::onSubmit" data-request-flash class="grid sm:grid-cols-2 md:grid-cols-1 lg:grid-cols-2 gap-3"> <form data-request="anfrage::onSubmit" data-request-flash class="grid sm:grid-cols-2 md:grid-cols-1 lg:grid-cols-2 gap-3">
@ -63,8 +64,24 @@
<textarea id="misc" name="misc" rows="5" class="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 dark:shadow-sm-light"></textarea> <textarea id="misc" name="misc" rows="5" class="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 dark:shadow-sm-light"></textarea>
</div> </div>
<div x-show="isUnder18" class="col-span-full text-sm text-red-900 items-center p-4 border-2 rounded form-group shadow-sm group bg-red-200 border-red-600"> <div x-show="isUnder18" class="col-span-full text-sm items-center p-4 border-2 rounded form-group shadow-sm group bg-red-200 border-red-600">
<span class="font-bold">Bitte beachte:</span> Bei Veranstaltungen mit nicht volljährigen Veranstaltern (z.B. 18. Geburtstag) muss eine Person über 35 Jahre (z.B. Erziehungsberechtigte*r) durchgehend anwesend sein. <div class="text-red-900">
<span class="font-bold">Bitte beachte:</span> Bei Veranstaltungen mit nicht volljährigen Veranstaltern (z.B. 18. Geburtstag) muss eine Person über 35 Jahre (z.B. Erziehungsberechtigte*r) durchgehend anwesend sein.
</div>
<div class="{{maingrid}}">
<div>
<label for="parent_name" class="block text-sm font-bold mt-2 text-red-900 dark:text-white">Name eines Erz. Ber.</label>
<input id="parent_name" name="parent_name" class="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 dark:shadow-sm-light" placeholder="">
</div>
<div>
<label for="parent_email" class="block text-sm font-bold mt-2 text-red-900 dark:text-white">Email eines Erz. Ber.</label>
<input id="parent_email" name="parent_email" class="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 dark:shadow-sm-light" placeholder="">
</div>
<div>
<label for="parent_phone" class="block text-sm font-bold mt-2 text-red-900 dark:text-white">TelNr. eines Erz. Ber.</label>
<input id="parent_phone" name="parent_phone" class="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 dark:shadow-sm-light" placeholder="">
</div>
</div>
</div> </div>
<div class="relative col-span-full"> <div class="relative col-span-full">
@ -80,7 +97,6 @@
</label> </label>
</div> </div>
</div> </div>
<div class="flex justify-center col-span-full mt-5"> <div class="flex justify-center col-span-full mt-5">
<button class="py-2 px-6 rounded bg-blue-900 hover:bg-blue-800 text-lg font-bold text-gray-300" type="submit">Absenden</button> <button class="py-2 px-6 rounded bg-blue-900 hover:bg-blue-800 text-lg font-bold text-gray-300" type="submit">Absenden</button>
</div> </div>

View File

@ -30,7 +30,6 @@ Alpine.data("form", () => ({
return false; return false;
} }
console.log(dayjs(this.birthday, "DD.MM.YYYY").add(18, "year"));
return dayjs(this.birthday, "DD.MM.YYYY") return dayjs(this.birthday, "DD.MM.YYYY")
.add(18, "year") .add(18, "year")
.isAfter(dayjs(this.date, "DD.MM.YYYY")); .isAfter(dayjs(this.date, "DD.MM.YYYY"));