Author SHA1 Message Date
oswaldsimona db939c6660 Anpassungen Event Detail 2026-04-17 23:50:58 +02:00
oswaldsimona 433743069c Anpassungen Event Uebersicht II 2026-04-17 16:09:35 +02:00
oswaldsimona 23f3e85543 Anpassungen Event Übersicht 2026-04-17 15:15:50 +02:00
oswaldsimona 2015454f6c Anpassung Progress Bar Event erstellen 2026-04-17 09:57:41 +02:00
oswaldsimona 9a2c66e026 Anpassung primary-button, badge und Event erstellen 2026-04-15 10:35:35 +02:00
viiivo 9d763b3680 Funktioniert doch nicht also gelöscht 2026-04-12 17:22:54 +02:00
vonburvivien 1c6dcea906 Netlify Deploy Code
Deploy to Netlify / deploy (push) Has been cancelled
Hosting auf Netlify für einfachere User Test
2026-04-12 17:19:52 +02:00
Estelle Köhler 027f722d69 feat: Abmeldefrist-Hinweis auf Event-Detailseite, .hidden fix 2026-04-12 17:16:34 +02:00
Estelle Köhler e91cd8572e fix: proper umlauts across all files, simplify gallery upload, fix Menu spelling, show local events in overview 2026-04-12 15:37:31 +02:00
Estelle Köhler e805abbf12 feat: lightbox gallery, event create UX improvements, cancel modal, footer consistency, Swiss German fixes 2026-04-12 15:18:40 +02:00
Estelle Köhler 4b54c48311 Add snackbar feedback, logout modal, profile pill nav, calendar styling, fix image paths and signup flow 2026-04-12 14:19:09 +02:00
Estelle Köhler 221aa90649 Refactor hero section, update how-it-works cards, add Instagram invite + footer to all pages 2026-04-12 13:43:36 +02:00
Estelle Köhler 5ee62ff604 Resolve merge conflicts and fix styling issues
- Resolve all merge conflicts from main branch pull
- Fix CSS load order: global stylesheet before page-specific on all pages
- Add navigation.js to impressum.html and datenschutz.html
- Unify nav classes across all pages (nav-tab-links + button-small)
- Add footer styles to global stylesheet
- Remove duplicate landingpage.css (redundant with index.css)
- Fix duplicate head/body tags in event_detail.html
- Merge login.js: keep user auth logic + snackbar support
- Merge index-carousel.js: keep dots + responsive resize handling
2026-04-12 10:49:17 +02:00
viiivo d04a7e07de feat: Update CSS styles and enhance JavaScript functionality for event visibility and navigation
Added Comments for easier understanding of code
2026-04-10 18:16:03 +02:00
viiivo c3bea2817c feat: Enhance profile page with tab navigation and event management features
Fix Event anmeldung und abmeldung Button.

12h vor Event beginn wird Adresse angezeigt.
2026-04-10 18:05:46 +02:00
viiivo 1efa4dcd39 feat: Implement user profile management and navigation updates
- Added a new profile page (my_profil.html) for users to manage their events and personal information.
- Introduced a new CSS file (my_profil.css) for styling the profile page.
- Created a JavaScript file (my_profil.js) to handle profile data retrieval, event registration management, and form submission.
- Updated navigation logic (navigation.js) to dynamically display login/signup or event management links based on user authentication status.
- Enhanced event creation and detail pages to support user-specific actions (registration/unregistration).
- Improved login and signup processes to handle user data more robustly, including fallback user creation.
- Refactored event overview to show user-specific events and registrations.
- Added error handling and validation for user input in profile management.
2026-04-10 16:28:44 +02:00
moserysabell 46074df578 Merge pull request 'Anpassungen event erstellung Sprint 1' (#10) from event_create into main
Reviewed-on: #10
2026-04-09 17:24:38 +02:00
Ysabelle Moser ad6b6c2c8c Anpassungen event erstellung Sprint 1 2026-04-09 17:01:37 +02:00
Estelle Köhler 481f3e3934 Fix how-it-works card styling 2026-04-09 12:14:35 +02:00
Estelle Köhler 6b01e178b9 Update how-it-works button styling 2026-04-09 12:07:55 +02:00
Estelle Köhler 642f0d4b80 fix: correct stylesheet references, shorten login snackbar, add datenschutz page 2026-04-03 17:25:34 +02:00
Estelle Köhler 6d3f699ea4 Clean up CSS to use global stylesheet, fix carousel, add impressum page and footer to all pages, update login styles 2026-04-03 16:54:16 +02:00
Estelle Köhler a456caa24a Rename landingpage.css to index.css and rename asset files 2026-04-03 14:26:04 +02:00
«schmona» c6d8df790e Typographie ergänzt H3-H6 2026-03-30 22:25:59 +02:00
«schmona» cba0ab45ba Globales stylesheet verknüpft, Navigation auf allen Seiten angepasst 2026-03-30 22:12:06 +02:00
«schmona» ddd294dd79 Austausch Logo 2026-03-30 01:36:48 +02:00
«schmona» 5c0806dc67 Logo ersetzen 2026-03-30 01:16:04 +02:00
«schmona» 601d416339 Anpassungen stylesheet global 2026-03-30 00:45:56 +02:00
«schmona» 56ed78b4f7 Anpassung css login_Signup 2026-03-29 23:57:00 +02:00
«schmona» 8e1d591d5c Anpassung html Sign up 2026-03-29 23:56:48 +02:00
«schmona» 5a893d7da8 Anpassung html Login 2026-03-29 23:55:54 +02:00
koehleestell 2aa49d93a2 Merge pull request 'feature/index2.0' (#9) from feature/index2.0 into main
Reviewed-on: #9
2026-03-29 19:24:53 +02:00
Estelle Köhler 2f7fed68c8 Fix login page nav: match index layout, rename Login to Anmelden, remove Event erstellen 2026-03-29 19:24:31 +02:00
Estelle Köhler 1b1ea3952b Redesign how-it-works section with custom PNG icons, olive green cards, and update carousel arrows 2026-03-29 19:20:36 +02:00
Estelle Köhler 9ffa0441bc Update carousel info area: remove text, add Instagram icon and invite logo. Replace dots with center arrow navigation. 2026-03-29 18:36:46 +02:00
Estelle Köhler bd5142d54a Merge branch 'css-main' of https://gitea.fhgr.ch/koehleestell/Social_Cooking into feature/index2.0 2026-03-29 17:42:40 +02:00
koehleestell 54b81091a3 Merge pull request 'feature/index2.0' (#8) from feature/index2.0 into main
Reviewed-on: #8
2026-03-29 17:40:52 +02:00
Estelle Köhler e27b942175 Update landing page layout, add how-it-works section, and refine hero image styling 2026-03-29 16:59:21 +02:00
Estelle Köhler a290ec5f88 Update landing page hero and butter background for Invité 2026-03-29 14:56:15 +02:00
Estelle Köhler d9847a907b fix: restore head content deleted during merge 2026-03-29 08:22:10 +02:00
Estelle Köhler 27fd12562e chore: resolve local merge conflict 2026-03-29 08:10:34 +02:00
Estelle Köhler 9015eac2eb Merge feature/landing-page: updated CSS path and added Font Awesome 2026-03-29 08:04:09 +02:00
«schmona» de625bbc49 Anpassung CSS an globales Stylesheet 2026-03-28 17:27:41 +01:00
«schmona» 434d0f34b9 Stylesheet hinzugefügt 2026-03-28 15:53:35 +01:00
viiivo 9c6cf7ace5 Un fixed broken link between event create and back to event overview 2026-03-27 18:02:16 +01:00
viiivo 7662e2db26 Fixed broken link between index and signup / login 2026-03-27 17:59:55 +01:00
viiivo b42dec562d fixed missing pic in italienische tavolata 2026-03-27 17:49:20 +01:00
viiivo edd601d330 feat: enhance event detail and overview pages with improved UI and functionality
- Refactored event_detail.js to include better date formatting, time normalization, and diet label mapping.
- Improved the event detail rendering logic with a more structured layout, including a lightbox for gallery images.
- Updated event_overview.js to support dynamic filtering by location and date, with improved session storage handling.
- Added new SVG assets for location pin and invite logo to enhance visual elements.
2026-03-27 17:48:03 +01:00
Estelle Köhler 352a1c0b54 Update Instagram button and improve visual styling 2026-03-27 15:03:06 +01:00
Estelle Köhler e5f6949ce7 Merge branch 'feature/landing-page' of https://gitea.fhgr.ch/koehleestell/Social_Cooking into feature/landing-page 2026-03-27 14:29:17 +01:00
viiivo c1b9bc85f5 Linked all Pages for continous User Flow 2026-03-27 10:35:57 +01:00
viiivo b15707e855 Merge branch 'main' of https://gitea.fhgr.ch/koehleestell/Social_Cooking 2026-03-27 10:16:03 +01:00
viiivo 17a6984571 Ordnerstruktur aufgesetzt und files nach big merge aufgeräumt, stylings und script im login und signup extrahiert und in seperate files gesetzt, alle verlinkungen überprüft. Namen der Files angepasst für einheitliche benennung. 2026-03-27 10:12:58 +01:00
koehleestell b1a500adbd Merge pull request 'feature/landing-page' (#6) from feature/landing-page into main
Reviewed-on: #6
2026-03-27 10:00:23 +01:00
Estelle Köhler 6f308e1270 Merge remote-tracking branch 'origin/feature/landing-page' into feature/landing-page 2026-03-27 09:59:51 +01:00
Estelle Köhler a45dfa1db9 style: center gallery dots and remove arrow borders 2026-03-27 09:53:20 +01:00
vonburvivien 72bd7f8127 Merge pull request 'style: align navigation and login buttons in header' (#5) from feature/landing-page into main
Reviewed-on: #5
2026-03-27 09:18:12 +01:00
vonburvivien 085fccf217 Merge branch 'main' into feature/landing-page 2026-03-27 09:17:19 +01:00
Estelle Köhler c6690096aa style: align navigation and login buttons in header 2026-03-26 13:55:36 +01:00
koehleestell f8cba9cfcf Merge pull request 'feature/landing-page' (#4) from feature/landing-page into main
Reviewed-on: #4
2026-03-26 12:05:33 +01:00
Estelle Köhler 14ba71eb64 Merge branch main into feature/landing-page and resolve file name conflicts 2026-03-26 12:03:22 +01:00
koehleestell c3c51b9ab0 Merge pull request 'profil-erstellen' (#3) from profil-erstellen into main
Reviewed-on: #3
2026-03-26 11:52:05 +01:00
koehleestell 87bdd772c0 Merge pull request 'event-erstellung' (#2) from event-erstellung into main
Reviewed-on: #2
2026-03-26 11:51:26 +01:00
Estelle Köhler dc8164f898 Rename index.html to landing-page.html to avoid main branch conflict 2026-03-26 11:44:20 +01:00
Ysabelle Moser 9aca5ba218 mehr Kommentare im js.file 2026-03-26 11:42:26 +01:00
Estelle Köhler a01d72a716 Landing page X fixed 2026-03-26 11:38:35 +01:00
Estelle Köhler 7977792071 docs: add human-readable comments to HTML and CSS for the team 2026-03-26 11:08:20 +01:00
Estelle Köhler ce749915ed feat: initial landing page wireframe 2026-03-26 08:54:18 +01:00
viiivo eb02821a93 Added Comments in Code for better understanding. Did 2 Page solution for detail site so that detailsite has it's own url.
Refactor event overview and detail pages: corrected title, enhanced event filtering, and added detail page structure.
2026-03-23 18:24:47 +01:00
viiivo 4da3c0741a Vibecoded basic filter system based on wireframe layout using json and js. rearragend folder strcuture in this branch. 2026-03-23 17:43:03 +01:00
Ysabelle Moser b0e7b68417 Erstellung CSS und JS File für event-create inkl. Anpassung HTML von Event-create 2026-03-22 23:48:59 +01:00
Ysabelle Moser 7e788dafd7 hinzufügen neue seite eventerstellung 2026-03-21 16:29:28 +01:00
52 changed files with 8004 additions and 902 deletions

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
{
"chat.tools.terminal.autoApprove": {
"git remote": true,
"git push": true,
"ssh": true,
"git add": true
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

+12
View File
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="Ebene_1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 24 24">
<!-- Generator: Adobe Illustrator 30.3.0, SVG Export Plug-In . SVG Version: 2.1.3 Build 182) -->
<defs>
<style>
.st0 {
fill: #6b6b05;
}
</style>
</defs>
<path class="st0" d="M9,1v2h6V1h2v2h4c.55,0,1,.45,1,1v16c0,.55-.45,1-1,1H3c-.55,0-1-.45-1-1V4c0-.55.45-1,1-1h4V1h2ZM20,11H4v8h16v-8ZM7,5h-3v4h16v-4h-3v2h-2v-2h-6v2h-2v-2Z"/>
</svg>

After

Width:  |  Height:  |  Size: 497 B

+40
View File
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg fill="#000000" height="800px" width="800px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 298.748 298.748" xml:space="preserve">
<g id="XMLID_1429_">
<g>
<g>
<path d="M89.486,99.966l5.118,2.999l10.451-6.427c1.463-0.9,2.999-1.573,4.57-2.038l-12.606-7.387
c-3.552-2.081-8.113-0.889-10.193,2.661C84.746,93.323,85.937,97.887,89.486,99.966z"/>
<path d="M194.008,187.239c5.392,0,9.764-4.372,9.764-9.764c0-5.393-4.372-9.764-9.764-9.764H99.344
c-5.393,0-9.764,4.372-9.764,9.764c0,5.393,4.372,9.764,9.764,9.764h39.885v46.522h-7.948c-4.113,0-7.447,3.334-7.447,7.447
c0,4.113,3.334,7.447,7.447,7.447h30.791c4.113,0,7.447-3.334,7.447-7.447c0-4.113-3.334-7.447-7.447-7.447h-7.949v-46.522
H194.008z"/>
<path d="M80.72,177.226c-1.169-3.279-3.799-5.825-7.112-6.888l-10.951-3.51l7.194-25.11l-18.93-16.393l30.517,14.102
c2.778,1.283,6.078,1.142,8.782-0.521l29.67-18.248c4.379-2.694,5.746-8.427,3.052-12.806c-2.694-4.379-8.427-5.746-12.806-3.052
l-25.418,15.634l-25.987-12.009l13.749,2.106c-1.581-1.776-3.658-3.147-6.112-3.851l-21.263-6.092
c-3.485-0.998-7.227-0.497-10.326,1.384c-3.099,1.881-5.271,4.97-5.993,8.522l-12.821,63.063
c-0.664,3.266,0.174,6.657,2.283,9.237c0.327,0.4,0.686,0.764,1.06,1.11H7.621c-0.541,0-1.067,0.061-1.576,0.17
C2.603,184.73,0,187.751,0,191.384v49.815c0,4.113,3.334,7.447,7.447,7.447s7.447-3.334,7.447-7.447v-42.401H49.29v42.401
c0,4.113,3.334,7.447,7.447,7.447s7.447-3.334,7.447-7.447v-43.818l15.626,43.848c2.072,5.815,8.466,8.843,14.272,6.772
c5.812-2.071,8.844-8.461,6.773-14.273L80.72,177.226z"/>
<circle cx="66.103" cy="76.449" r="19.243"/>
<circle cx="252.446" cy="69.335" r="19.243"/>
<path d="M291.129,183.905h-14.077c0.415-0.256,0.819-0.532,1.201-0.844c2.579-2.111,4.073-5.268,4.07-8.6l-0.054-64.353
c-0.006-7.573-6.471-13.548-14.029-12.947l-22.049,1.752c-7.156,0.569-12.498,6.831-11.929,13.988l0.922,11.603l1.781-0.025
l16.473-14.381l-15.502,24.067l-29.838,0.426c-5.14,0.073-9.248,4.3-9.175,9.441c0.073,5.095,4.226,9.176,9.305,9.176
c0.045,0,0.091,0,0.136-0.001l34.828-0.498c3.117-0.044,6.005-1.646,7.693-4.267l18.205-28.263l-10.052,33.515
c-1.559,5.197-6.287,8.576-11.439,8.655c-5.26,0.071-3.13,0.042-9.398,0.131l0.362,4.555l-12.661,3.092
c-3.652,0.892-6.611,3.561-7.872,7.102l-20.136,56.505c-2.072,5.812,0.961,12.201,6.773,14.273
c5.812,2.072,12.202-0.963,14.272-6.772l15.626-43.85v43.82c0,4.113,3.335,7.447,7.447,7.447c4.113,0,7.447-3.334,7.447-7.447
v-42.401h34.395v42.401c0,4.113,3.335,7.447,7.447,7.447s7.447-3.334,7.447-7.447v-49.815
C298.748,187.265,295.406,183.905,291.129,183.905z"/>
<path d="M104.088,144.815c-0.057,0.25-0.09,0.502-0.09,0.757c0,4.239,6.881,7.896,16.812,9.586v1.397
c0,2.202,1.786,3.988,3.988,3.988h16.795c2.203,0,3.988-1.786,3.988-3.988v-1.396c9.931-1.69,16.812-5.346,16.812-9.586
c0-0.255-0.032-0.506-0.088-0.755c-0.11-0.487-0.933-0.854-1.915-0.854h-54.387C105.024,143.963,104.2,144.33,104.088,144.815z"
/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

+12
View File
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="Ebene_1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 24 24">
<!-- Generator: Adobe Illustrator 30.3.0, SVG Export Plug-In . SVG Version: 2.1.3 Build 182) -->
<defs>
<style>
.st0 {
fill: #6b6b05;
}
</style>
</defs>
<path class="st0" d="M12,20.9l4.95-4.95c2.73-2.73,2.73-7.17,0-9.9-2.73-2.73-7.17-2.73-9.9,0-2.73,2.73-2.73,7.17,0,9.9l4.95,4.95ZM12,23.73l-6.36-6.36c-3.51-3.51-3.51-9.21,0-12.73,3.51-3.51,9.21-3.51,12.73,0,3.51,3.51,3.51,9.21,0,12.73l-6.36,6.36ZM12,13c1.1,0,2-.9,2-2s-.9-2-2-2-2,.9-2,2,.9,2,2,2ZM12,15c-2.21,0-4-1.79-4-4s1.79-4,4-4,4,1.79,4,4-1.79,4-4,4Z"/>
</svg>

After

Width:  |  Height:  |  Size: 681 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

+82
View File
@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg fill="#000000" height="800px" width="800px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 298.096 298.096" xml:space="preserve">
<g>
<g>
<g>
<path d="M187.592,218.502c-10.82-3.316-27.172-8.32-30.632-20.716c-1.292-4.612-1.276-37.344-0.944-59.436
c20.636-0.22,39.808-1.256,54.66-2.984c27.704-3.224,27.704-7.308,27.704-9.272l-0.044-0.472l0.044-11.252
c0-0.056,0-0.108,0-0.16v-0.008c0-1.964,0-6.048-27.704-9.272c-16.8-1.952-39.12-3.028-62.848-3.028
c-23.732,0-46.048,1.076-62.848,3.028c-27.708,3.224-27.708,7.308-27.708,9.272v11.892c0,1.964,0,6.048,27.708,9.272
c14.852,1.728,34.02,2.764,54.656,2.984c0.332,22.092,0.348,54.824-0.944,59.436c-3.46,12.392-19.808,17.4-30.628,20.712
c-7.596,2.328-11.78,3.608-11.78,6.912c-0.012,0.304-0.044,1.124,0.44,1.86c0.416,0.884,0.996,1.172,0.972,1.148
c4.692,3.48,29.272,5.068,50.128,5.068c20.852,0,45.432-1.584,49.956-4.952c0.764-0.456,1.584-1.516,1.584-3.112
C199.372,222.114,195.188,220.83,187.592,218.502z M147.828,105.906c50.612,0,82.344,4.776,86.308,8.272
c-0.08,0.076-0.156,0.152-0.26,0.228c-0.144,0.104-0.304,0.212-0.496,0.32c-0.22,0.124-0.484,0.244-0.764,0.368
c-0.244,0.108-0.5,0.216-0.792,0.324c-0.34,0.128-0.728,0.256-1.132,0.384c-0.344,0.108-0.688,0.22-1.076,0.328
c-0.46,0.128-0.972,0.26-1.492,0.388c-0.436,0.108-0.876,0.22-1.356,0.328c-0.576,0.132-1.212,0.26-1.852,0.392
c-0.528,0.108-1.048,0.216-1.616,0.32c-0.696,0.132-1.452,0.26-2.208,0.388c-0.616,0.104-1.22,0.208-1.876,0.312
c-0.8,0.128-1.664,0.248-2.52,0.372c-0.712,0.104-1.412,0.208-2.168,0.308c-0.908,0.12-1.884,0.24-2.848,0.356
c-0.796,0.096-1.572,0.196-2.408,0.288c-1.024,0.116-2.116,0.228-3.196,0.336c-0.876,0.092-1.728,0.184-2.64,0.268
c-1.128,0.108-2.324,0.208-3.508,0.312c-0.96,0.084-1.892,0.168-2.884,0.248c-1.236,0.096-2.54,0.188-3.832,0.28
c-1.032,0.072-2.032,0.148-3.096,0.216c-1.34,0.088-2.756,0.164-4.148,0.24c-1.104,0.064-2.18,0.128-3.32,0.188
c-1.46,0.072-2.992,0.136-4.508,0.2c-1.156,0.048-2.272,0.104-3.46,0.148c-1.676,0.064-3.432,0.112-5.172,0.16
c-1.1,0.032-2.16,0.072-3.28,0.1c-2.056,0.052-4.196,0.084-6.332,0.116c-0.88,0.012-1.724,0.036-2.62,0.048
c-3.072,0.036-6.216,0.056-9.444,0.056c-3.22,0-6.36-0.02-9.424-0.056c-1.172-0.016-2.28-0.044-3.428-0.06
c-1.84-0.032-3.704-0.056-5.484-0.1c-1.672-0.04-3.268-0.096-4.884-0.148c-1.156-0.036-2.344-0.068-3.472-0.108
c-2.264-0.084-4.448-0.18-6.6-0.284c-0.38-0.02-0.784-0.032-1.16-0.052c-30.476-1.516-49.04-4.868-51.904-7.492
C65.292,110.71,97.072,105.906,147.828,105.906z M61.276,118.61c0.148,0.072,0.344,0.14,0.504,0.208
c0.228,0.096,0.46,0.188,0.716,0.284c0.3,0.112,0.628,0.224,0.964,0.336c0.288,0.096,0.576,0.196,0.892,0.292
c0.364,0.112,0.772,0.228,1.176,0.34c0.164,0.044,0.304,0.092,0.472,0.136l-4.724,5.66V118.61z M63.196,127.118l5.252-6.3
c0.268,0.06,0.524,0.124,0.808,0.184c0.56,0.124,1.184,0.244,1.796,0.368c0.412,0.084,0.792,0.164,1.228,0.248l-5.536,6.636
C65.284,127.87,64.08,127.49,63.196,127.118z M69.2,128.846l5.66-6.78c0.392,0.064,0.756,0.132,1.164,0.196
c0.884,0.14,1.856,0.28,2.824,0.416l-5.784,6.932C71.66,129.358,70.364,129.102,69.2,128.846z M75.644,130.062l5.856-7.02
c1.124,0.148,2.248,0.292,3.484,0.436c0.192,0.024,0.404,0.04,0.596,0.064l-5.936,7.112
C78.244,130.458,76.888,130.262,75.644,130.062z M82.308,130.998l5.988-7.172c16.376,1.728,37.308,2.68,59.536,2.68
c23.728,0,46.048-1.076,62.848-3.032c1.688-0.196,3.268-0.396,4.756-0.6c0.516-0.072,0.964-0.144,1.46-0.212
c0.932-0.132,1.872-0.268,2.724-0.4c0.524-0.084,0.984-0.168,1.476-0.252c0.74-0.124,1.492-0.248,2.168-0.376
c0.484-0.092,0.916-0.18,1.372-0.272c0.6-0.12,1.208-0.24,1.756-0.36c0.44-0.096,0.832-0.192,1.24-0.288
c0.488-0.116,0.98-0.228,1.424-0.344c0.388-0.1,0.732-0.2,1.088-0.3c0.392-0.112,0.788-0.22,1.144-0.332
c0.332-0.104,0.632-0.204,0.932-0.308c0.316-0.108,0.632-0.216,0.916-0.324c0.272-0.104,0.52-0.204,0.764-0.304
c0.148-0.06,0.328-0.124,0.468-0.184l-0.028,7.28l0.004,0.036c-3,3.508-34.972,8.46-86.512,8.46
C119.56,134.402,97.24,132.906,82.308,130.998z M147.828,229.486c-24.224,0-42.432-1.936-47.24-4.024
c1.372-0.904,5.364-2.128,8.648-3.136c11.652-3.568,29.256-8.96,33.308-23.46c1.764-6.312,1.252-49.452,1.092-60.468h8.372
c-0.16,11.016-0.672,54.156,1.092,60.464c4.052,14.5,21.66,19.896,33.312,23.464c3.312,1.016,7.344,2.248,8.684,3.156
C191.08,227.462,172.596,229.486,147.828,229.486z"/>
<path d="M82.696,153.378H22.28c-0.696,0-1.36,0.14-1.964,0.396c-0.5-8.16-0.996-16.324-1.492-24.484
c0.292,0.052,0.564,0.172,0.872,0.172c0.076,0,0.152,0,0.228-0.004c2.788-0.128,4.952-2.496,4.828-5.284l-2.684-60.356
c-0.12-2.788-2.54-4.992-5.284-4.832c-2.788,0.128-4.952,2.496-4.828,5.284l0.004,0.132c-0.46-0.088-5.384,0.036-7.344,0
L0,64.346v174.592c0,0,7.552,0.192,10.252,0.18c4.652-0.024,4.94-3.596,5.036-4.804c0.788-9.676,1.032-31.124,1.192-45.32
c0.052-4.576,0.096-8.704,0.148-11.012h49.536c0.252,2.24,0.72,6.46,1.232,11.132c1.528,13.912,3.836,34.936,5.224,45.928
c0.144,1.144,1.16,3.396,2.96,3.668c1.38,0.208,2.72,0.172,4.004,0.14l3.344-0.024v-75.368c2.68-0.12,4.84-2.304,4.84-5.02
C87.756,155.65,85.484,153.378,82.696,153.378z M16.88,61.25c0.044,0,0.084,0,0.124,0c1.484,0,2.728,1.172,2.792,2.668
l2.684,60.356c0.072,1.54-1.124,2.844-2.664,2.916c-0.404,0.016-0.788-0.052-1.136-0.18c-0.468-7.72-4.468-62.84-4.468-62.84
C14.144,62.63,15.34,61.322,16.88,61.25z M78.916,234.862c-0.78,0.016-1.524,0.02-2.224-0.044
c-0.06-0.104-0.104-0.216-0.116-0.276c-1.384-10.964-3.688-31.968-5.216-45.864c-1.3-11.836-1.416-12.836-1.484-13.136
l-0.352-1.56H12.876c0,0-0.804,50.472-1.584,60.008c-0.048,0.588-0.124,0.848-0.1,0.892c-0.088,0.024-7.04,0-7.2,0.004V68.39
l0.54,0.008c2.052,0.04,4.092,0.076,6.128-0.012c0.236-0.008,0.392-0.004,0.468-0.016c0.024,0.116,0.056,0.312,0.072,0.616
c0.488,9.028,1.04,18.056,1.588,27.08l0.488,8.02c1.136,18.784,3.712,61.672,3.712,61.672h61.928V234.862z M82.696,161.234H22.28
c-0.564,0-1.06-0.208-1.5-0.5c-0.024-0.18-0.064-0.364-0.076-0.544c-0.08-1.28-0.156-2.56-0.232-3.836
c0.492-0.424,1.112-0.708,1.808-0.708h60.416c1.54,0,2.792,1.252,2.792,2.792S84.236,161.234,82.696,161.234z"/>
<path d="M293.476,64.402c-1.96,0.04-3.92,0.076-5.872-0.012c-0.556-0.02-1.02,0.068-1.48,0.16l0.012-0.28
c0.124-2.788-2.04-5.156-4.828-5.284c-2.916-0.168-5.16,2.044-5.284,4.832l-2.684,60.356c-0.124,2.788,2.04,5.156,4.828,5.284
c0.08,0.004,0.152,0.004,0.228,0.004c0.308,0,0.58-0.116,0.872-0.172c-0.496,8.16-0.988,16.324-1.492,24.484
c-0.604-0.256-1.268-0.396-1.964-0.396h-60.42c-2.788,0-5.06,2.272-5.06,5.064c0,2.712,2.156,4.896,4.84,5.02v75.364l3.344,0.024
c1.284,0.036,2.62,0.072,4.004-0.14c1.8-0.272,2.816-2.524,2.96-3.668c1.388-10.996,3.696-32.016,5.224-45.928
c0.516-4.696,0.98-8.932,1.228-11.132h49.54c0.052,2.308,0.096,6.44,0.148,11.012c0.16,14.192,0.404,35.644,1.192,45.316
c0.092,1.208,0.328,4.68,5.112,4.588c2.384-0.044,10.172,0.04,10.172,0.04V64.342L293.476,64.402z M278.396,127.194
c-0.04,0-0.084,0-0.124,0c-1.54-0.072-2.736-1.376-2.664-2.916l2.684-60.356c0.068-1.536,1.248-2.724,2.916-2.668
c1.54,0.072,2.736,1.376,2.664,2.916l-0.084,1.868c-0.488,0.7-3.912,53.244-4.384,60.96
C279.092,127.118,278.752,127.194,278.396,127.194z M215.392,161.234c-1.54,0-2.792-1.252-2.792-2.792
c0-1.54,1.252-2.792,2.792-2.792h60.416c0.696,0,1.316,0.28,1.808,0.708c-0.08,1.276-0.156,2.556-0.232,3.832
c-0.012,0.18-0.052,0.368-0.076,0.548c-0.44,0.288-0.936,0.496-1.496,0.496H215.392z M294.096,234.886
c-0.16-0.004-6.736,0.032-6.844,0.032c-0.164,0-0.264-0.004-0.296,0.004c-0.04-0.104-0.112-0.364-0.16-0.936
c-0.776-9.536-1.016-30.904-1.176-45.04c-0.088-7.956-0.144-14.968-0.144-14.968h-56.912l-0.352,1.56
c-0.072,0.3-0.184,1.3-1.484,13.136c-1.528,13.9-3.832,34.904-5.212,45.848c-0.016,0.072-0.064,0.184-0.12,0.292
c-0.7,0.068-1.44,0.06-2.224,0.044v-69.1h62.288c0,0,2.212-42.888,3.352-61.672l0.488-8.02c0.552-9.024,1.1-18.052,1.588-27.08
c0.02-0.312,0.048-0.504,0.04-0.592c0.1-0.008,7.168,0,7.168,0V234.886z"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

+9
View File
@@ -0,0 +1,9 @@
<svg width="104" height="50" viewBox="0 0 104 50" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M83.0693 30.3941C83.0693 28.5407 83.4727 26.9102 84.2794 25.5025C85.1121 24.0948 86.283 22.9922 87.7923 22.1945C89.3276 21.3968 91.1491 20.998 93.2569 20.998C94.8963 20.998 96.3665 21.2678 97.6676 21.8074C98.9947 22.347 100.036 23.0743 100.79 23.9893C101.545 24.8808 101.922 25.8661 101.922 26.9453C101.922 28.0715 101.558 28.8692 100.829 29.3384C100.101 29.8076 99.0207 30.0422 97.5895 30.0422H89.3926C89.3926 30.6522 89.6529 31.1566 90.1733 31.5554C90.7198 31.9543 91.6305 32.1537 92.9056 32.1537C93.5561 32.1537 94.1546 32.095 94.7011 31.9777C95.2736 31.8604 95.8461 31.7549 96.4185 31.661C97.017 31.5437 97.6806 31.4851 98.4092 31.4851C99.4501 31.4851 100.309 31.8252 100.985 32.5056C101.662 33.1625 102 34.0775 102 35.2506C102 36.6348 101.207 37.714 99.6192 38.4882C98.0579 39.2624 96.0022 39.6495 93.4521 39.6495C91.6565 39.6495 89.9651 39.3328 88.3778 38.6993C86.8165 38.0659 85.5414 37.0688 84.5526 35.7081C83.5637 34.3239 83.0693 32.5525 83.0693 30.3941ZM95.716 28.8809C96.1063 28.8809 96.2364 28.7167 96.1063 28.3882C96.0022 28.0597 95.6899 27.7196 95.1695 27.3676C94.6491 27.0157 93.8944 26.8398 92.9056 26.8398C91.7606 26.8398 90.9019 27.0627 90.3294 27.5084C89.783 27.9542 89.5097 28.4117 89.5097 28.8809H95.716ZM90.6027 15.7896C91.3313 15.3908 92.0599 15.0154 92.7885 14.6635C93.5171 14.2881 94.3628 13.8541 95.3256 13.3614C96.3145 12.8687 97.2643 12.7045 98.175 12.8687C99.0858 13.0095 99.7493 13.5139 100.166 14.382C100.608 15.25 100.673 16.036 100.361 16.7398C100.049 17.4202 99.359 17.9598 98.2921 18.3586C97.3553 18.7105 96.3014 19.039 95.1305 19.344C93.9855 19.649 93.0097 19.8601 92.203 19.9774C91.5785 20.0713 90.993 20.0243 90.4465 19.8366C89.9001 19.6255 89.4967 19.2149 89.2365 18.6049C89.0023 17.995 89.0153 17.4553 89.2755 16.9861C89.5358 16.5169 89.9781 16.1181 90.6027 15.7896Z" fill="#CD4918"/>
<path d="M75.1806 39.6495C73.8014 39.6495 72.5524 39.368 71.4334 38.8049C70.3405 38.2418 69.4818 37.4442 68.8573 36.4119C68.2327 35.3561 67.9205 34.1244 67.9205 32.7168V26.5231L66.4763 26.699C65.6956 26.7929 65.006 26.5465 64.4075 25.96C63.809 25.3735 63.5098 24.6344 63.5098 23.7429C63.5098 22.8514 63.809 22.1241 64.4075 21.561C65.006 20.9745 65.6956 20.7282 66.4763 20.822L67.9205 20.998L67.8814 18.6049C67.8554 17.6665 68.1547 16.9275 68.7792 16.3879C69.4037 15.8248 70.3145 15.5433 71.5115 15.5433C72.7085 15.5433 73.6323 15.8248 74.2828 16.3879C74.9334 16.9275 75.2326 17.6665 75.1806 18.6049L75.1025 20.998L77.1712 20.7516C78.5764 20.5639 79.6433 20.7986 80.3719 21.4555C81.1005 22.0889 81.4648 22.8514 81.4648 23.7429C81.4648 24.6344 81.1005 25.4086 80.3719 26.0656C79.6693 26.699 78.6415 26.9336 77.2883 26.7694L75.1025 26.5231V31.7666C75.1025 32.0716 75.2196 32.3531 75.4538 32.6112C75.688 32.8458 75.9742 32.9162 76.3125 32.8223C76.7028 32.7285 77.1062 32.5291 77.5225 32.2241C77.9649 31.9191 78.5244 31.7666 79.2009 31.7666C80.2158 31.7666 80.9964 32.095 81.5429 32.752C82.0894 33.4089 82.3626 34.2183 82.3626 35.1802C82.3626 35.9309 82.0633 36.6582 81.4648 37.3621C80.8924 38.0424 80.0727 38.5938 79.0058 39.0161C77.9389 39.4384 76.6638 39.6495 75.1806 39.6495Z" fill="#CD4918"/>
<path d="M54.709 17.0565C54.709 16.0477 55.0473 15.2383 55.7238 14.6283C56.4264 13.9948 57.3892 13.6781 58.6123 13.6781C59.9134 13.6781 60.8762 13.9831 61.5007 14.5931C62.1512 15.2031 62.4765 16.0125 62.4765 17.0213C62.4765 18.0067 62.1512 18.8043 61.5007 19.4143C60.8762 20.0009 59.9134 20.2941 58.6123 20.2941C57.3372 20.2941 56.3614 20.0009 55.6848 19.4143C55.0343 18.8043 54.709 18.0184 54.709 17.0565ZM58.6123 39.5439C57.3892 39.5439 56.4785 39.2389 55.88 38.6289C55.2815 38.0189 54.9822 37.2565 54.9822 36.3415V24.306C54.9822 23.2971 55.2815 22.4995 55.88 21.9129C56.4785 21.3264 57.3892 21.0331 58.6123 21.0331C59.8353 21.0331 60.7461 21.3264 61.3446 21.9129C61.9691 22.4995 62.2813 23.2737 62.2813 24.2356V36.3415C62.2813 37.2565 61.9561 38.0189 61.3055 38.6289C60.681 39.2389 59.7832 39.5439 58.6123 39.5439Z" fill="#CD4918"/>
<path d="M44.0485 39.5439C42.3571 39.5439 40.9129 39.0982 39.7159 38.2067C38.5189 37.3151 37.53 35.8371 36.7494 33.7725L33.6658 25.7488C33.2494 24.6931 33.2494 23.7195 33.6658 22.8279C34.1081 21.9364 34.9148 21.3734 36.0858 21.1387C37.1267 20.9276 38.0374 21.0214 38.8181 21.4203C39.6248 21.8191 40.1973 22.4878 40.5355 23.4262L43.5801 31.4851C43.9444 32.4235 44.3868 33.1156 44.9072 33.5614C45.4537 34.0071 46.1172 34.1127 46.8979 33.8781C47.6265 33.62 48.0168 33.1977 48.0689 32.6112C48.1469 32.0012 48.0038 31.2974 47.6395 30.4997C47.3273 29.7724 46.9109 29.1507 46.3905 28.6346C45.87 28.1184 45.4016 27.5788 44.9853 27.0157C44.5689 26.4527 44.3608 25.7488 44.3608 24.9042C44.3608 23.6843 44.7901 22.7341 45.6488 22.0537C46.5336 21.3499 47.6916 21.0214 49.1228 21.0684C50.3458 21.0918 51.3476 21.4789 52.1283 22.2297C52.9089 22.9804 53.2993 23.9306 53.2993 25.0802C53.2993 25.7137 53.1822 26.394 52.948 27.1213C52.7138 27.8486 52.4536 28.6111 52.1673 29.4088L50.606 33.8429C50.1897 35.016 49.7213 36.0365 49.2008 36.9046C48.7064 37.7492 48.0559 38.4061 47.2492 38.8753C46.4685 39.3211 45.4016 39.5439 44.0485 39.5439Z" fill="#CD4918"/>
<path d="M16.3409 39.544C15.1959 39.544 14.2721 39.239 13.5695 38.629C12.893 37.9956 12.5547 37.2213 12.5547 36.3064V24.658C12.5547 23.6726 12.88 22.8397 13.5305 22.1593C14.1811 21.479 15.1178 21.1388 16.3409 21.1388C17.5379 21.1388 18.4486 21.479 19.0732 22.1593C19.6977 22.8397 20.0099 23.696 20.0099 24.7283V26.4879H20.7125C20.7125 25.1506 20.9728 24.0949 21.4932 23.3207C22.0397 22.5465 22.7292 21.9951 23.5619 21.6667C24.3946 21.3148 25.2273 21.1388 26.06 21.1388C28.0637 21.1388 29.5339 21.7957 30.4707 23.1095C31.4075 24.3999 31.8759 26.2416 31.8759 28.6346V36.3064C31.8759 37.2213 31.5376 37.9956 30.8611 38.629C30.1845 39.239 29.2737 39.544 28.1288 39.544C26.9578 39.544 26.021 39.239 25.3184 38.629C24.6418 37.9956 24.3036 37.2213 24.3036 36.3064V30.0775C24.3036 29.2329 24.1214 28.5759 23.7571 28.1067C23.4188 27.6375 22.9114 27.4029 22.2348 27.4029C21.4542 27.4029 20.8817 27.661 20.5174 28.1771C20.1791 28.6933 20.0099 29.3502 20.0099 30.1478V36.3064C20.0099 37.2213 19.6847 37.9956 19.0341 38.629C18.3836 39.239 17.4858 39.544 16.3409 39.544Z" fill="#CD4918"/>
<path d="M6.05941 39.6144C4.8624 39.6144 3.88658 39.2859 3.13195 38.629C2.37732 37.9721 2 37.1392 2 36.1304V17.5141C2 16.4818 2.36431 15.6137 3.09292 14.9099C3.84755 14.206 4.83638 13.8541 6.05941 13.8541C7.3605 13.8541 8.37535 14.206 9.10397 14.9099C9.8586 15.5902 10.2359 16.4348 10.2359 17.4437V36.1304C10.2359 37.1392 9.83258 37.9721 9.0259 38.629C8.24524 39.2859 7.25641 39.6144 6.05941 39.6144Z" fill="#CD4918"/>
<path d="M19.9137 11.7901C20.0941 12.142 19.9271 12.5614 19.5405 12.7257C19.4344 12.7707 19.323 12.7913 19.2148 12.7913C18.9231 12.7913 18.6448 12.6412 18.5128 12.385C17.8511 11.0957 17.5027 9.53236 17.5027 7.86486C17.5027 7.47638 17.849 7.16108 18.2758 7.16108C18.7025 7.16108 19.0489 7.47638 19.0489 7.86486C19.0489 9.30809 19.355 10.7016 19.9137 11.7901ZM24.4595 7.16108C24.0327 7.16108 23.6864 7.47638 23.6864 7.86486C23.6864 9.30809 23.3792 10.7016 22.8205 11.7901C22.6401 12.142 22.8071 12.5614 23.1937 12.7257C23.2999 12.7707 23.4112 12.7913 23.5194 12.7913C23.8111 12.7913 24.0894 12.6412 24.2214 12.385C24.8832 11.0957 25.2316 9.53236 25.2316 7.86486C25.2316 7.47638 24.8852 7.16108 24.4585 7.16108H24.4595ZM30.3866 8.33405C30.3866 9.38504 29.9722 10.4032 29.2187 11.2008C28.8105 11.6325 28.325 12.3278 28.325 13.1827V17.7178C28.325 19.1414 27.054 20.2984 25.4903 20.2984H17.2439C15.6802 20.2984 14.4092 19.1414 14.4092 17.7178V13.1827C14.4092 12.3278 13.9227 11.6334 13.5155 11.2008C12.7631 10.4022 12.3477 9.3841 12.3477 8.33405C12.3477 6.11291 14.1052 4.28026 16.4904 3.94807C17.5965 2.72255 19.3911 2 21.3671 2C23.3431 2 25.1378 2.72255 26.2438 3.94807C28.628 4.28026 30.3866 6.11291 30.3866 8.33405ZM26.7788 17.7178V16.5449H15.9554V17.7178C15.9554 18.3644 16.5337 18.8908 17.2439 18.8908H25.4903C26.2005 18.8908 26.7788 18.3644 26.7788 17.7178ZM28.8404 8.33405C28.8404 6.74444 27.5189 5.44479 25.7665 5.31341C25.5387 5.29558 25.3326 5.18861 25.1996 5.02064C24.4224 4.02596 22.9535 3.40851 21.3671 3.40851C19.7807 3.40851 18.3118 4.02596 17.5346 5.02064C17.4016 5.18955 17.1955 5.29652 16.9677 5.31341C15.2153 5.44572 13.8938 6.74444 13.8938 8.33405C13.8938 9.05848 14.1691 9.73317 14.6886 10.284C15.5174 11.1633 15.9554 12.1655 15.9554 13.1827V15.1373H26.7788V13.1827C26.7788 12.1655 27.2169 11.1623 28.0456 10.284C28.5662 9.73317 28.8404 9.05848 28.8404 8.33405Z" fill="#CD4918"/>
</svg>

After

Width:  |  Height:  |  Size: 8.4 KiB

+545
View File
@@ -0,0 +1,545 @@
:root {
--max-width: 1120px;
--content-width: 760px;
--header-height: 4.5rem;
--control-min-height: 3rem;
--input-min-height: 3.5rem;
--card-min-height: 6rem;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
.site-header {
background: var(--color-bg);
border-top: 2px solid #232323;
border-bottom: 1px solid var(--color-border);
}
.event-create-page {
width: min(100% - 2rem, var(--max-width));
margin: 0 auto;
padding: var(--space-5) 0 0;
}
.event-flow-header {
display: flex;
justify-content: flex-end;
margin-bottom: var(--space-4);
}
.event-form {
min-height: calc(100vh - var(--header-height) - 9rem);
display: flex;
flex-direction: column;
}
.step {
display: none;
padding: var(--space-4) 0 var(--space-7);
}
.submission-success {
padding: var(--space-4) 0 var(--space-7);
}
.step--active {
display: block;
}
.step-layout {
width: min(100%, var(--content-width));
margin: 0 auto;
display: grid;
gap: var(--space-6);
}
.step-layout--intro {
min-height: 60vh;
align-content: center;
grid-template-columns: 1fr;
gap: var(--space-7);
}
.step-copy,
.step-fields,
.form-field,
fieldset {
display: grid;
gap: var(--space-4);
}
.step-copy {
gap: var(--space-4);
}
.step-fields {
gap: var(--space-5);
}
.form-field,
fieldset {
margin: 0;
padding: 0;
border: 0;
gap: var(--space-3);
}
.step-text {
/* definiert Breite des Beschriebtexts der einzelnen Schritte*/
max-width: 600px;
}
.intro-card,
.review-card {
border: 1px solid var(--color-border);
background: var(--color-surface);
box-shadow: var(--shadow-interaction);
}
.intro-card {
padding: var(--space-6);
border-radius: 1.75rem;
background: linear-gradient(135deg, var(--color-surface), var(--color-surface-soft));
}
.intro-card--image {
width: 100%;
padding: 0;
border: 0;
overflow: hidden;
background: transparent;
box-shadow: none;
}
.intro-image {
width: 100%;
height: 100%;
display: block;
object-fit: cover;
border-radius: var(--radius-lg);
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}
label {
font-family: var(--font-main);
font-weight: 400;
font-size: 1.25rem;
}
legend {
font-size: 1rem;
font-weight: 600;
letter-spacing: var(--ls-sm);
line-height: 1;
margin-bottom: var(--space-3);
}
.field-hint {
margin: -0.25rem 0 0;
color: var(--color-muted);
font-size: 0.95rem;
}
input[type="text"],
input[type="date"],
input[type="time"],
input[type="number"],
textarea {
font-family: var(--font-main);
font-weight: 400;
font-size: 1.25rem;;
padding: 1rem 1.25rem;
border: 1.5px solid var(--olive-light);
border-radius: var(--radius-md);
background: var(--butter-light);
transition: border-color 0.2s ease;
}
/* Blendet die Standard-Buttons für number inputs aus */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
/* Firefox */
input[type="number"] {
-moz-appearance: textfield;
}
textarea {
min-height: 9rem;
resize: vertical;
}
input[type="text"]:hover,
input[type="date"]:hover,
input[type="time"]:hover,
input[type="number"]:hover,
textarea:hover {
border-color: rgba(102, 52, 13, 0.28);
}
input[type="text"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="number"]:focus,
textarea:focus {
border-color: var(--olive-dark);
}
.field-invalid {
border-color: var(--error) !important;
box-shadow: var(--shadow-error);
}
.field-row {
display: grid;
gap: var(--space-4);
}
.option-grid {
display: grid;
gap: var(--space-3);
}
.option-card {
position: relative;
display: grid;
padding: var(--space-31);
border: 1.5px solid var(--olive-light);
border-radius: var(--radius-md);
background: var(--butter-light);
transition: box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}
.option-card:hover {
background: var(--olive-light);
box-shadow: var(--shadow-interaction);
transform: translateY(-3px);
}
.option-card input {
position: absolute;
inset: 0;
opacity: 0;
cursor: pointer;
}
.option-card:has(input:checked) {
border: 1.5px solid var(--olive-light);
background: var(--olive-light);
}
.option-card--invalid {
border-color: var(--tomato) !important;
box-shadow: 0 0 0 2px rgba(212, 75, 36, 0.14);
}
.counter {
display: inline-flex;
align-items: center;
gap: var(--space-3);
}
.counter input {
width: 6rem;
text-align: center;
}
.review-card {
display: grid;
gap: var(--space-4);
padding: 0;
border: 0;
border-radius: 0;
background: transparent;
box-shadow: none;
}
.review-card--success {
display: grid;
gap: var(--space-5);
padding: var(--space-3) 0 0;
border: 0;
border-radius: 0;
background: transparent;
box-shadow: none;
}
.review-list {
display: grid;
gap: var(--space-4);
margin: 0;
}
.review-item {
display: grid;
gap: var(--space-2);
padding: 1rem 1.1rem;
border: 1px solid var(--input-border-soft);
border-radius: 1.125rem;
background: var(--butter-light);
box-shadow: 0 1px 2px rgba(102, 52, 13, 0.04);
cursor: pointer;
transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}
.review-item:last-child {
border-bottom: 1px solid var(--input-border-soft);
}
.review-item:hover {
border-color: rgba(102, 52, 13, 0.28);
background: rgba(247, 246, 230, 0.92);
transform: translateY(-1px);
}
.review-item:focus-visible {
outline: 3px solid rgba(107, 107, 5, 0.2);
outline-offset: 3px;
}
.review-item dt {
font-weight: 700;
}
.review-item dd {
margin: 0;
white-space: pre-wrap;
color: var(--color-text-secondary);
}
.submission-success-actions {
display: flex;
justify-content: center;
}
.flow-footer {
bottom: 0;
backdrop-filter: none;
padding-top: var(--space-4);
padding-bottom: env(safe-area-inset-bottom);
}
.flow-actions {
display: flex;
justify-content: space-between;
align-items: center;
}
.error-message {
order: -1; /* nach oben verschieben */
text-align: center;
width: 100%;
}
.progress-wrap {
width: min(100%, var(--content-width));
margin: 0 auto;
display: flex;
align-items: center;
gap: 0.75rem;
}
.progress-label {
flex-shrink: 0;
font-size: 0.8rem;
font-weight: 600;
color: var(--color-muted);
white-space: nowrap;
}
.progress {
flex: 1;
height: 0.3rem;
background: var(--olive-light);
border-radius: var(--radius-sm);
overflow: hidden;
}
.progress-bar {
display: block;
width: 0;
height: 100%;
background: var(--olive);
border-radius: 999px;
transition: width 0.25s ease;
}
.flow-actions {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-4);
width: min(100%, var(--content-width));
margin: 0 auto;
padding: var(--space-4) 0;
}
.flow-actions-right {
display: flex;
align-items: center;
gap: var(--space-4);
}
.error-message {
min-height: 1.5rem;
margin: 0;
color: var(--color-error);
font-size: 0.95rem;
}
/*.button {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.9rem 1.35rem;
border-radius: var(--radius-pill);
border: 1px solid var(--color-border);
background: transparent;
color: var(--color-text);
cursor: pointer;
}*/
.button--ghost:hover {
background: rgba(0, 0, 0, 0.03);
}
.button--intro {
justify-self: start;
margin-top: var(--space-2);
}
/* Gallery Upload */
.gallery-upload {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.75rem;
}
.gallery-preview {
display: contents;
}
.gallery-thumb {
position: relative;
width: 5.5rem;
height: 5.5rem;
border-radius: var(--radius-sm, 0.5rem);
overflow: hidden;
flex-shrink: 0;
}
.gallery-thumb img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.gallery-thumb-remove {
position: absolute;
top: 0.2rem;
right: 0.2rem;
width: 1.4rem;
height: 1.4rem;
border: 0;
border-radius: 50%;
background: rgba(0, 0, 0, 0.6);
color: #fff;
font-size: 0.85rem;
line-height: 1;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
}
.gallery-add-btn {
width: 5.5rem;
height: 5.5rem;
border: 2px dashed var(--color-border-strong);
border-radius: var(--radius-sm, 0.5rem);
background: transparent;
font-size: 2rem;
color: var(--color-muted);
cursor: pointer;
flex-shrink: 0;
transition: border-color 0.15s, color 0.15s;
}
.gallery-add-btn:hover {
border-color: var(--olive);
color: var(--olive);
}
.site-footer {
width: min(100% - 2rem, var(--max-width));
margin: 0 auto;
padding: var(--space-5) 0 var(--space-6);
color: var(--color-muted);
text-align: center;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
outline: 3px solid var(--color-focus);
outline-offset: 3px;
}
@media (max-width: 767px) {
.site-nav {
flex-wrap: wrap;
padding: var(--space-3) 0;
}
.site-nav-links {
gap: var(--space-3);
}
.flow-actions,
.flow-actions-right {
flex-direction: column;
align-items: stretch;
}
.event-flow-header {
justify-content: flex-start;
}
}
@media (min-width: 768px) {
.step-layout--intro {
width: min(100%, 56rem);
grid-template-columns: 1fr 1fr;
align-items: stretch;
gap: var(--space-8);
}
.field-row {
grid-template-columns: 1fr 1fr;
}
.option-grid--3 {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.option-grid--4 {
grid-template-columns: repeat(4, minmax(0, 1fr));
}
}
File diff suppressed because it is too large. Load diff
+400
View File
@@ -0,0 +1,400 @@
/* ===========================================
INDEX.CSS — Styles specific to index.html
Global styles (reset, variables, body, nav,
brand, typography) are in stylesheet_global.css
=========================================== */
/* --- Navigation overrides (index-specific) --- */
.nav-link {
border: 2px solid var(--olive-light);
transition: background-color 0.2s ease, color 0.2s ease;
}
.nav-link:hover,
.nav-link.active,
.nav-link:focus-visible {
background: var(--olive);
color: var(--white);
border-color: var(--olive);
}
.nav-link--login {
background: var(--olive);
color: var(--white);
border-color: var(--olive);
}
.nav-link--login:hover,
.nav-link--login:focus-visible {
background: var(--white);
color: var(--olive);
border-color: var(--olive);
}
/* --- Page layout --- */
.main-content {
width: min(100% - 4rem, 1120px);
margin: 0 auto;
padding: 0 20px;
}
/* --- Hero section --- */
.hero {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 55px;
margin-bottom: 88px;
align-items: center;
padding: 44px 0;
}
/*
.hero__buttons {
display: flex;
gap: var(--space-3);
flex-wrap: wrap;
}*/
.hero__right {
display: flex;
align-items: center;
justify-content: center;
}
.image-card {
width: 100%;
max-width: 436px;
overflow: hidden;
border-radius: var(--radius-lg);
}
.hero-image {
width: 100%;
max-width: 436px;
max-height: 510px;
height: auto;
border-radius: var(--radius-lg);
object-fit: cover;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}
@media (max-width: 900px) {
.hero {
grid-template-columns: 1fr;
padding: 30px 0;
}
.hero__right {
order: -1;
}
.hero-image {
min-height: 320px;
}
}
/* --- "So funktioniert's" steps --- */
.how-it-works {
margin-bottom: 70px;
}
.how-it-works__header {
text-align: center;
margin-bottom: 32px;
}
.how-it-works__header h2 {
font-size: 2rem;
margin: 0;
color: var(--black);
}
.how-it-works__steps {
display: grid;
grid-template-columns: repeat(3, minmax(180px, 1fr));
gap: 20px;
}
.how-step {
display: flex;
flex-direction: column;
align-items: center;
gap: 12px;
padding: 28px 20px;
background: var(--white);
border-radius: 28px;
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}
.how-step--numbered {
position: relative;
}
.how-step__corner-number {
position: absolute;
top: 12px;
left: 16px;
font-size: 2.2rem;
font-weight: 700;
}
.how-step__corner-number--brown {
color: var(--brown);
}
.how-step__icon {
font-size: 2.4rem;
color: var(--brown);
margin-top: 12px;
}
.how-step__png {
width: 192px;
height: 192px;
object-fit: contain;
}
.how-step__png--brown {
filter: brightness(0) saturate(100%) invert(18%) sepia(56%) saturate(2800%) hue-rotate(16deg) brightness(92%) contrast(95%);
}
.how-step__label {
margin: 0;
font-size: 0.95rem;
line-height: 1.6;
font-weight: 400;
color: var(--black);
text-align: center;
}
.how-step__label--brown {
color: var(--brown);
}
.how-step__label--big {
font-size: 1.25rem;
font-weight: 700;
}
.how-step__footer-pill {
margin-bottom: 4px;
}
.how-step__footer-badges {
display: flex;
gap: var(--space-2);
justify-content: center;
}
.how-step__footer-banner {
width: 100%;
padding: 10px 16px;
background: var(--butter);
border-radius: var(--radius-sm);
text-align: center;
font-family: 'Bagel Fat One', sans-serif;
font-size: 0.85rem;
letter-spacing: 0.12rem;
color: var(--brown);
}
@media (max-width: 900px) {
.how-it-works__steps {
grid-template-columns: 1fr;
}
}
/* --- Carousel gallery --- */
.gallery__carousel {
position: relative;
overflow: hidden;
}
.gallery__track {
display: flex;
gap: 20px;
margin-bottom: 30px;
}
.gallery__item {
flex: 0 0 calc((100% - 40px) / 3);
min-width: calc((100% - 40px) / 3);
border-radius: 24px;
overflow: hidden;
background: var(--white);
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
aspect-ratio: 2 / 3;
cursor: pointer;
}
.gallery__item img {
width: 100%;
height: 100%;
display: block;
object-fit: cover;
}
.gallery__arrow {
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 44px;
height: 44px;
display: grid;
place-items: center;
border-radius: 50%;
background: rgba(0, 0, 0, 0.35);
backdrop-filter: blur(4px);
border: 2px solid rgba(255, 255, 255, 0.4);
color: var(--white);
cursor: pointer;
font-size: 1.2rem;
text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
transition: background 0.2s ease, transform 0.2s ease;
z-index: 2;
}
.gallery__arrow:hover {
background: rgba(0, 0, 0, 0.55);
transform: translateY(-50%) scale(1.1);
}
.gallery__arrow:focus-visible {
outline: 2px solid var(--brown);
outline-offset: 3px;
}
.gallery__arrow--prev {
left: 12px;
}
.gallery__arrow--next {
right: 12px;
}
/* --- Carousel dot indicators --- */
.gallery__dots {
display: flex;
justify-content: center;
gap: 10px;
padding: 12px 0 8px;
}
.gallery__dot {
width: 12px;
height: 12px;
border-radius: 50%;
border: 2px solid var(--brown);
background: transparent;
cursor: pointer;
padding: 0;
transition: background 0.25s ease, transform 0.2s ease;
}
.gallery__dot:hover {
background: rgba(102, 52, 13, 0.3);
transform: scale(1.2);
}
.gallery__dot:focus-visible {
outline: 2px solid var(--brown);
outline-offset: 3px;
}
.gallery__dot--active {
background: var(--brown);
}
@media (max-width: 900px) {
.gallery__track {
gap: 16px;
}
.gallery__item {
flex: 0 0 100%;
min-width: 100%;
}
}
/* --- Gallery info (Instagram link) --- */
.gallery__info {
display: flex;
align-items: center;
gap: 10px;
}
.gallery__icon--instagram {
height: 32px;
width: 32px;
object-fit: contain;
border-radius: 8px;
background: none;
filter: brightness(0) saturate(100%) invert(27%) sepia(81%) saturate(749%) hue-rotate(24deg) brightness(90%) contrast(90%);
}
.gallery__icon--invite {
height: 56px;
width: 56px;
object-fit: contain;
margin-left: 0;
transform: translate(-4%, -1%);
position: relative;
}
/* --- CTA button --- */
.btn {
border: none;
background: var(--olive);
color: var(--white);
padding: 12px 22px;
font-weight: 700;
cursor: pointer;
text-decoration: none;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: var(--radius-pill);
font-size: 0.95rem;
transition: background-color 0.2s ease, transform 0.2s ease;
}
.btn:hover {
background-color: var(--olive-dark);
transform: translateY(-1px);
}
/* --- Footer --- */
.footer {
display: flex;
justify-content: center;
align-items: center;
gap: 24px;
padding: 16px 24px;
border: none;
margin-top: 40px;
}
.footer-link {
color: var(--black);
text-decoration: underline;
font-size: 0.8rem;
font-weight: 400;
}
+329
View File
@@ -0,0 +1,329 @@
/* ===========================================
LOGIN_SIGNUP.CSS — Styles for login & signup
Global styles (reset, variables, body, nav,
typography) are in stylesheet_global.css
=========================================== */
/* --- Page layout --- */
.main-content {
display: flex;
justify-content: center;
align-items: center;
flex: 1;
padding: var(--space-4);
}
.container {
background-color: var(--white);
border-radius: var(--radius-lg);
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
max-width: 1000px;
width: 100%;
display: flex;
gap: var(--space-4);
overflow: hidden;
}
/* --- Image section --- */
.image-section {
flex: 1;
background-color: var(--butter-light);
display: flex;
align-items: center;
justify-content: center;
min-height: 500px;
}
.image-section img {
width: 100%;
height: 100%;
object-fit: cover;
}
/* --- Form section --- */
.form-section {
flex: 1;
padding: 40px;
display: flex;
flex-direction: column;
justify-content: center;
}
h1 {
color: var(--black);
margin-bottom: var(--space-4);
text-align: center;
}
/* --- Form elements --- */
.form-group {
margin-bottom: var(--space-4);
}
label {
display: block;
margin-bottom: var(--space-1);
color: var(--black);
font-weight: 600;
font-size: 0.9rem;
}
input[type="text"],
input[type="email"],
input[type="password"] {
width: 100%;
padding: var(--space-2);
border: 2px solid var(--olive-light);
border-radius: var(--radius-md);
font-size: 0.9rem;
font-family: var(--font-main);
transition: border-color 0.3s ease;
background: var(--white);
color: var(--black);
}
input:focus {
outline: none;
border-color: var(--olive);
box-shadow: 0 0 5px rgba(107, 107, 5, 0.25);
}
button[type="submit"] {
width: 100%;
padding: var(--space-2);
background-color: var(--olive);
color: var(--white);
border: none;
border-radius: var(--radius-pill);
font-size: 1rem;
font-weight: 700;
font-family: var(--font-main);
cursor: pointer;
transition: background-color 0.3s ease, transform 0.2s ease;
margin-top: var(--space-2);
}
button[type="submit"]:hover {
background-color: var(--olive-dark);
transform: translateY(-1px);
}
button[type="submit"]:active {
background-color: var(--olive-dark);
transform: translateY(0);
}
/* --- Info box --- */
.info-box {
background-color: var(--butter-light);
border-left: 4px solid var(--olive);
padding: var(--space-3);
margin-bottom: var(--space-6);
border-radius: 4px;
font-size: 0.9rem;
color: var(--black);
line-height: 1.5;
}
/* --- Hints & errors --- */
.link-text {
margin-top: var(--space-4);
text-align: center;
}
.link-text a{
color: var(--blue);
text-decoration: none;
transition: color 0.3s ease;
}
.link-text a:hover {
color: var(--blue-dark);
text-decoration: underline;
}
.error-message {
color: var(--error);
font-size: 0.8rem;
margin-top: 5px;
display: none;
}
.form-group.has-error input {
border-color: var(--error);
box-shadow: 0 0 5px rgba(212, 75, 36, 0.3);
}
.form-group.has-error .error-message {
display: block;
}
/* --- Modal / Popup --- */
.modal {
display: none;
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.4);
animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.modal.show {
display: flex;
justify-content: center;
align-items: center;
}
.modal-content {
background-color: var(--white);
padding: 40px;
border-radius: var(--radius-lg);
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
max-width: 500px;
width: 90%;
text-align: center;
animation: slideIn 0.3s ease;
}
@keyframes slideIn {
from { transform: translateY(-50px); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}
.modal-header {
position: relative;
margin-bottom: var(--space-4);
}
.modal-header h2 {
color: var(--olive);
font-size: 1.5rem;
}
.close-btn {
position: absolute;
right: 0;
top: 0;
font-size: 28px;
color: var(--black);
background: none;
border: none;
cursor: pointer;
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
}
.modal-body {
color: var(--black);
font-size: 1rem;
line-height: 1.6;
margin-bottom: var(--space-6);
}
.modal-footer {
display: flex;
gap: var(--space-2);
justify-content: center;
}
.btn-primary {
padding: var(--space-2) var(--space-5);
background-color: var(--olive);
color: var(--white);
border: none;
border-radius: var(--radius-pill);
font-size: 1rem;
font-weight: 700;
font-family: var(--font-main);
cursor: pointer;
transition: background-color 0.3s ease;
}
.btn-primary:hover {
background-color: var(--olive-dark);
}
/* --- Footer --- */
.footer {
display: flex;
justify-content: center;
align-items: center;
padding: var(--space-3) var(--space-5);
border: none;
margin-top: 40px;
}
.footer_link {
color: var(--black);
text-decoration: underline;
font-size: 0.8rem;
font-weight: 400;
}
/* --- Responsive --- */
@media (max-width: 768px) {
.container {
flex-direction: column;
}
.image-section {
min-height: 300px;
}
}
/* --- Snackbar --- */
.snackbar {
position: fixed;
bottom: 30px;
left: 50%;
transform: translateX(-50%) translateY(100px);
background: var(--olive);
color: var(--white);
padding: var(--space-3) var(--space-6);
border-radius: var(--radius-pill);
font-size: 1rem;
font-weight: 600;
font-family: var(--font-main);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
opacity: 0;
transition: transform 0.4s ease, opacity 0.4s ease;
z-index: 9999;
pointer-events: none;
}
.snackbar--visible {
transform: translateX(-50%) translateY(0);
opacity: 1;
}
+380
View File
@@ -0,0 +1,380 @@
.profile-page {
/* Reserve a large safe zone below sticky nav so title/actions are never covered. */
margin-top: 0;
padding-top: 6.5rem;
margin-bottom: var(--space-8);
}
/* Kopfbereich mit Titel und Logout-Aktion. */
.profile-hero {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: var(--space-4);
margin-bottom: var(--space-5);
}
.profile-kicker {
margin: 0;
color: var(--olive);
font-size: 1rem;
font-weight: 500;
letter-spacing: var(--ls-la);
}
#profile-headline {
margin: 0.4rem 0;
color: var(--brown);
font-size: clamp(2rem, 4.4vw, 2.8rem);
}
.profile-subline {
margin: 0;
max-width: 48rem;
}
.profile-logout {
border: none;
cursor: pointer;
}
.profile-grid {
display: grid;
grid-template-columns: 1fr;
gap: var(--space-4);
}
.profile-tabs {
display: inline-flex;
flex-wrap: wrap;
gap: var(--space-2);
}
.profile-tab {
border: 2px solid var(--olive);
border-radius: var(--radius-md);
background: var(--butter);
color: var(--black);
padding: 0.45rem 1rem;
min-height: 2.5rem;
font-family: "Jost", sans-serif;
font-size: 1rem;
font-weight: 500;
letter-spacing: var(--ls-ui);
cursor: pointer;
transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.profile-tab:hover,
.profile-tab:focus-visible {
background: #faf8e8;
}
.profile-tab.is-active {
border-color: transparent;
background: var(--olive);
color: var(--white);
}
/* Konsistentes Karten-Layout für alle Profilsektionen. */
.profile-panel {
background: rgba(255, 255, 255, 0.88);
border-radius: var(--radius-lg);
box-shadow: 0 3px 12px rgba(102, 52, 13, 0.1);
padding: var(--space-5);
}
.panel-head {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: var(--space-3);
}
.panel-title {
margin: 0;
color: var(--brown);
font-size: 1.8rem;
}
.panel-count {
min-width: 2rem;
padding: 0.1rem 0.65rem;
border-radius: var(--radius-pill);
background: var(--olive-light);
color: var(--black);
font-size: 0.95rem;
font-weight: 600;
text-align: center;
}
.profile-card-list {
display: grid;
gap: var(--space-2);
}
/* Einzelne Eventkarte für "Meine Events" und "Meine Anmeldungen". */
.profile-event-card {
border: 1px solid rgba(107, 107, 5, 0.25);
border-radius: var(--radius-md);
padding: var(--space-3);
display: flex;
justify-content: space-between;
align-items: center;
gap: var(--space-3);
}
.profile-event-card-clickable {
cursor: pointer;
transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.profile-event-card-clickable:hover {
box-shadow: 0 6px 16px rgba(102, 52, 13, 0.14);
transform: translateY(-1px);
}
.profile-event-title {
margin: 0;
color: var(--black);
font-family: "Jost", sans-serif;
font-size: 1.25rem;
font-weight: 600;
}
.profile-event-meta {
margin: 0.3rem 0 0;
font-size: 0.95rem;
color: var(--olive);
}
.profile-event-address-block {
margin-top: 0.55rem;
padding: 0.6rem 0.75rem;
border-radius: var(--radius-sm);
border-left: 4px solid var(--tomato);
background: rgba(232, 237, 209, 0.65);
}
.profile-event-address-label {
margin: 0;
color: var(--olive);
font-size: 0.72rem;
font-weight: 700;
letter-spacing: var(--ls-la);
text-transform: uppercase;
}
.profile-event-address {
margin: 0.2rem 0 0;
font-size: 0.95rem;
color: var(--black);
font-weight: 600;
line-height: 1.35;
}
.profile-event-link {
flex-shrink: 0;
color: var(--blue);
font-weight: 500;
text-decoration: none;
}
.profile-event-link:hover,
.profile-event-link:focus-visible {
text-decoration: underline;
text-underline-offset: 3px;
}
.profile-event-actions {
display: flex;
align-items: center;
gap: var(--space-2);
}
.profile-unregister-btn {
border: none;
border-radius: var(--radius-md);
background: var(--tomato);
color: var(--butter-light);
padding: 0.45rem 0.95rem;
font-family: "Jost", sans-serif;
font-size: 0.95rem;
font-weight: 500;
cursor: pointer;
transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.profile-cancel-btn {
border: none;
border-radius: var(--radius-md);
background: var(--tomato);
color: var(--butter-light);
padding: 0.45rem 0.95rem;
font-family: "Jost", sans-serif;
font-size: 0.95rem;
font-weight: 500;
cursor: pointer;
transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.profile-cancel-btn:hover,
.profile-cancel-btn:focus-visible {
background: var(--tomato-dark);
transform: translateY(-1px);
box-shadow: 0 4px 10px rgba(188, 74, 52, 0.28);
}
.profile-cancel-btn:active {
transform: translateY(0);
box-shadow: 0 2px 6px rgba(188, 74, 52, 0.25);
}
.profile-unregister-btn:hover,
.profile-unregister-btn:focus-visible {
background: var(--tomato-dark);
transform: translateY(-1px);
box-shadow: 0 4px 10px rgba(188, 74, 52, 0.28);
}
.profile-unregister-btn:active {
transform: translateY(0);
box-shadow: 0 2px 6px rgba(188, 74, 52, 0.25);
}
.profile-empty {
margin: 0;
color: var(--black);
}
.profile-empty-state {
text-align: center;
padding: 2.4rem 1.3rem;
border: 2px solid var(--olive-light);
border-radius: var(--radius-lg);
background: rgba(255, 255, 255, 0.92);
box-shadow: 0 3px 12px rgba(102, 52, 13, 0.08);
}
.profile-empty-kicker {
margin: 0 0 0.5rem;
color: var(--olive);
font-size: 0.8rem;
font-weight: 600;
letter-spacing: var(--ls-la);
text-transform: uppercase;
}
.profile-empty-state h3 {
margin: 0;
font-size: 1.5rem;
color: var(--brown);
}
.profile-empty-state p {
margin: 0.65rem auto 1rem;
max-width: 36rem;
}
.form-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: var(--space-3);
}
.form-group {
margin-bottom: var(--space-3);
}
.form-group label {
display: block;
margin-bottom: 0.35rem;
font-size: 0.95rem;
font-weight: 500;
}
.form-group input {
width: 100%;
border: 1px solid #d8d8d8;
border-radius: var(--radius-sm);
background: var(--white);
padding: 0.7rem 0.85rem;
font-size: 1rem;
}
.form-group input:focus {
outline: 2px solid rgba(107, 107, 5, 0.35);
outline-offset: 1px;
}
.input-hint {
margin: 0.4rem 0 0;
font-size: 0.9rem;
color: #535353;
}
.input-error {
margin-top: 0.35rem;
color: var(--error);
font-size: 0.85rem;
display: none;
}
.form-group.has-error .input-error {
display: block;
}
.form-group.has-error input {
border-color: var(--error);
}
.profile-feedback {
margin: 0.75rem 0 0;
font-size: 0.95rem;
color: var(--olive);
min-height: 1.3rem;
}
.profile-cta-row {
display: flex;
gap: var(--space-2);
margin-top: var(--space-3);
}
.profile-button-secondary {
background: var(--tomato);
}
.profile-button-secondary:hover {
background: var(--tomato-dark);
}
@media (max-width: 48rem) {
.profile-page {
padding-top: 5.5rem;
}
.profile-hero {
flex-direction: column;
align-items: stretch;
}
.profile-logout {
width: max-content;
}
.form-grid {
grid-template-columns: 1fr;
}
.profile-event-card {
flex-direction: column;
align-items: flex-start;
}
.profile-event-actions {
width: 100%;
justify-content: flex-start;
flex-wrap: wrap;
}
}
+663
View File
@@ -0,0 +1,663 @@
/* Font Import */
@import url('https://fonts.googleapis.com/css2?family=Bagel+Fat+One&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Jost:wght@300;400;600&display=swap');
/* Reset / Normalize */
*,
*::before,
*::after {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* Colors + Main Font */
:root {
--max-width: 1200px;
--padding: 1.5rem;
--tomato: #D44B24;
--tomato-dark: #D44B24;
--olive: #6B6B05;
--olive-dark: #545404;
--olive-light: #C8CC7A;
--butter: #F5F1BC;
--butter-light: #FAF9F0;
--white: #ffffff;
--black: #141411;
--brown: #66340d;
--blue: #3489DA;
--blue-dark: #1D70BF;
--error: #FF3B30;
--font-main: 'Jost', sans-serif;
--font-size-base: 1rem;
/* Shadows */
--shadow-interaction: 0 0.1875rem 0.75rem rgba(102, 52, 13, 0.1);
--shadow-error: 0 0 0 2px rgba(255, 59, 48, 0.1);
/* Spacing Scale > 1rem = 16px*/
--space-0: 0.25rem; /* 4px */
--space-01: 0.375rem; /* 6px */
--space-1: 0.5rem; /* 8px */
--space-2: 0.75rem; /* 12px */
--space-3: 1rem; /* 16px */
--space-31: 1.25rem; /* 20px */
--space-4: 1.5rem; /* 24px */
--space-5: 2rem; /* 32px */
--space-6: 2.5rem; /* 40px */
--space-7: 3rem; /* 48px */
--space-8: 4rem; /* 64px */
/* Radius Scale */
--radius-pill: 100rem;
--radius-sm: 0.5rem;
--radius-md: 1rem;
--radius-lg: 2rem;
/* Letter Spacing */
--ls-none: 0;
--ls-sm: 2.5%;
--ls-la: 5%;
}
/* Base Styles */
body {
font-family: var(--font-main);
background-color: var(--butter);
}
img {
max-width: 100%;
display: block;
}
/* Typography */
h1, h2, h3, h4, h5, h6 {
font-family: 'Bagel Fat One';
}
h1 {
font-size: clamp(2.25rem, 5vw, 3rem);
font-weight: 600;
line-height: 120%;
letter-spacing: var(--ls-sm);
color: var(--brown);
margin-bottom: var(--space-5);
}
h2 {
font-size: 2.5rem;
font-weight: 600;
line-height: 120%;
letter-spacing: var(--ls-sm);
color: var(--brown);
margin-bottom: var(--space-4);
}
h3 {
font-size: 2rem;
font-weight: 600;
line-height: 120%;
letter-spacing: var(--ls-sm);
color: var(--brown);
margin-bottom: 1.5rem;
}
p {
font-family: var(--font-main);
font-size: 1.125rem;
line-height: 1.5;
color: var(--black);
margin-bottom: 1rem;
}
.p-small {
font-family: var(--font-main);
font-size: 1rem;
line-height: 1.5;
margin-bottom: 0rem;
}
.link-text a{
color: var(--blue);
margin-top: var(--space-4);
text-decoration: none;
transition: color 0.3s ease;
}
.link-text a:hover {
color: var(--blue-dark);
text-decoration: underline;
}
.link-text-footer{
color: var(--black);
text-decoration: none;
transition: color 0.3s ease;
}
.link-text-footer:hover {
text-decoration: underline;
}
.error-message {
color: var(--error);
font-size: 1rem;
}
/* Layout */
.main-content {
margin-top: var(--space-8);
}
.container {
width: 90%;
max-width: 75rem;
margin: 0 auto;
}
.icon {
width: 20px;
height: 20px;
flex: 0 0 20px;
display: inline-block;
}
/* Top Navigation */
.top-nav-wrap {
position: sticky;
height: 58px;
top: 1rem;
z-index: 100;
background: none;
padding: 0 1rem;
}
.top-nav {
background: var(--white);
/*backdrop-filter: blur(3px) saturate(140%);
-webkit-backdrop-filter: blur(3px) saturate(140%);*/
border-radius: var(--radius-lg);
box-shadow: var(--shadow-interaction);
display: flex;
justify-content: space-between;
align-items: center;
min-height: 3rem;
padding: 0.1875rem 0.75rem 0.1875rem var(--space-5);
max-width: none;
width: 100%;
box-sizing: border-box;
}
.brand {
display: inline-flex;
align-items: center;
height: 3.125rem;
text-decoration: none;
}
.brand img {
width: auto;
height: 100%;
max-width: 6.5rem;
display: block;
}
.nav-tab {
color: var(--black);
font-size: 1.125rem;
font-weight: 400;
letter-spacing: var(--ls-sm);
line-height: 1;
text-decoration: none;
padding-bottom: 4px;
}
.nav-tab:hover, .nav-tab:active,
.nav-tab:focus-visible {
text-decoration: underline;
text-underline-offset: 6px;
text-decoration-thickness: 1.5px;
}
.nav-tab--active {
text-decoration: underline;
text-underline-offset: 6px;
text-decoration-thickness: 1.5px;
}
.nav-tab-links {
display: flex;
align-items: center;
gap: var(--space-5);
}
/* Badge */
.badge {
position: relative;
display: inline-block;
width: fit-content;
color: var(--olive-dark);
font-family: var(--font-main);
font-size: 1rem;
font-weight: 600;
letter-spacing: var(--ls-la);
margin-bottom: var(--space-6);
z-index: 0;
}
.badge::before {
content: "";
position: absolute;
inset: 0;
background-color: var(--olive-light);
margin: -0.25rem -0.75rem;
z-index: -1;
clip-path: polygon(
1.5% 0%,
100% 0%,
98.5% 100%,
0% 100%
);
}
/* Buttons */
.button-primary {
display: inline-block;
padding: var(--space-01) var(--space-4);
background-color: var(--olive);
border: 1.5px solid var(--olive);
border-radius: var(--radius-lg);
font-family: var(--font-main);
font-weight: 400;
font-size: 1.25rem;
color: var(--butter-light);
cursor: pointer;
text-decoration: none;
transition: background-color 0.2s ease, border-color 0.2s ease;
}
.button-primary:hover {
background-color: var(--olive-dark);
border-color: var(--olive-dark);
}
.button-primary:disabled {
border-color: transparent;
background: transparent;
color: var(--olive-dark);
opacity: 0.6;
padding: var(--space-01) 0 var(--space-01) var(--space-4);
cursor: not-allowed;
}
.button-primary-abmelden {
display: inline-block;
padding: 0.375rem 1.5rem;
background-color: var(--blue);
border: 1.5px solid var(--blue);
border-radius: var(--radius-lg);
font-family: var(--font-main);
font-weight: 400;
font-size: 1.25rem;
color: var(--butter-light);
cursor: pointer;
text-decoration: none;
transition: background-color 0.2s ease, border-color 0.2s ease;
}
.button-primary-abmelden:hover,
.button-primary-abmelden:focus-visible {
background: var(--blue-dark);
border-color: var(--blue-dark);
}
.button-secondary {
display: inline-block;
padding: 0.375rem 1.5rem;
background-color: var(--butter);
border: 1.5px solid var(--olive);
border-radius: var(--radius-lg);
font-family: var(--font-main);
font-weight: 400;
font-size: 1.25rem;
color: var(--olive);
cursor: pointer;
text-decoration: none;
transition: color 0.2s ease;
}
.button-secondary:hover {
color: var(--olive-dark);
background-color: var(--olive-light);
border-color: var(--olive-dark);
}
.button--outline {
background-color: transparent;
color: var(--olive);
border: 1.5px solid var(--olive);
}
.button--outline:hover {
background-color: var(--olive-light);
color: var(--black);
}
.counter-button {
width: 44px;
height: 44px;
background-color: var(--olive);
border: 1.5px solid var(--olive);
border-radius: var(--radius-lg);
font-family: var(--font-main);
font-weight: 400;
font-size: 1.25rem;
color: var(--butter);
cursor: pointer;
text-decoration: none;
transition: background-color 0.2s ease, border-color 0.2s ease;
}
.counter-button:hover, .counter-button:focus-visible {
background-color: var(--olive-dark);
border-color: var(--olive-dark);
}
.button-small {
background: var(--olive);
color: var(--butter-light);
font-size: 1.125rem;
font-weight: 400;
letter-spacing: var(--ls-sm);
line-height: 1;
text-decoration: none;
padding: var(--space-1) var(--space-4);
border-radius: var(--radius-md);
}
.button-small:hover, .button-small:active,
.button-small:focus-visible {
background: var(--olive-dark);
color: var(--butter-light);
}
/* Auth-Links in ausgeloggter Navigation: klarer Aktiv-/Default-Zustand. */
.auth-nav-button--default {
background: transparent;
color: var(--olive);
border: 2px solid var(--olive);
}
.auth-nav-button--default:hover,
.auth-nav-button--default:focus-visible {
background: var(--olive-light);
color: var(--black);
}
.auth-nav-button--active {
background: var(--olive);
color: var(--butter-light);
border: 2px solid var(--olive);
}
.profile-pill {
width: 2.375rem;
height: 2.375rem;
border-radius: 1.1875rem;
background: var(--tomato);
color: var(--white);
font-size: 1.0625rem;
font-weight: 400;
letter-spacing: var(--ls-ui);
line-height: 1.3;
display: inline-flex;
align-items: center;
justify-content: center;
text-decoration: none;
}
/* Utilities */
.text-center {
text-align: left;
}
.hidden {
display: none !important;
}
/* Card Footer */
.card-footer {
margin-top: auto;
padding-top: var(--space-3);
width: 100%;
}
/* Text Muted */
.text-muted {
color: #888;
font-size: 0.8rem;
font-weight: 400;
line-height: 1.4;
}
/* Instagram Invite */
.instagram-invite {
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
margin-top: var(--space-7);
}
.instagram-invite__link {
display: flex;
align-items: center;
gap: 16px;
text-decoration: none;
}
.instagram-invite__icon {
height: 32px;
width: 32px;
object-fit: contain;
border-radius: 8px;
filter: brightness(0) saturate(100%) invert(27%) sepia(81%) saturate(749%) hue-rotate(24deg) brightness(90%) contrast(90%);
}
.instagram-invite__logo {
height: 56px;
width: 56px;
object-fit: contain;
}
/* Modal / Popup */
.modal {
display: none;
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.4);
animation: modalFadeIn 0.3s ease;
}
@keyframes modalFadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.modal.show {
display: flex;
justify-content: center;
align-items: center;
}
.modal-content {
background-color: var(--white);
padding: 40px;
border-radius: var(--radius-lg);
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
max-width: 500px;
width: 90%;
text-align: center;
animation: modalSlideIn 0.3s ease;
}
@keyframes modalSlideIn {
from { transform: translateY(-50px); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}
.modal-header {
position: relative;
margin-bottom: var(--space-4);
}
.modal-header h2 {
color: var(--olive);
font-size: 1.5rem;
}
.close-btn {
position: absolute;
right: 0;
top: 0;
font-size: 28px;
color: var(--black);
background: none;
border: none;
cursor: pointer;
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
}
.modal-body {
color: var(--black);
font-size: 1rem;
line-height: 1.6;
margin-bottom: var(--space-6);
}
.modal-footer {
display: flex;
gap: var(--space-2);
justify-content: center;
}
/* Snackbar */
.snackbar {
position: fixed;
bottom: 30px;
left: 50%;
transform: translateX(-50%) translateY(100px);
background: var(--olive);
color: var(--white);
padding: var(--space-3) var(--space-6);
border-radius: var(--radius-pill);
font-size: 1rem;
font-weight: 600;
font-family: var(--font-main);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
opacity: 0;
transition: transform 0.4s ease, opacity 0.4s ease;
z-index: 9999;
pointer-events: none;
}
.snackbar--visible {
transform: translateX(-50%) translateY(0);
opacity: 1;
}
.snackbar--danger {
background: var(--tomato);
}
/* Lightbox */
.lightbox {
position: fixed;
inset: 0;
z-index: 200;
display: none;
align-items: center;
justify-content: center;
padding: 24px;
}
.lightbox.is-open {
display: flex;
}
.lightbox__backdrop {
position: absolute;
inset: 0;
background: rgba(0, 0, 0, 0.75);
}
.lightbox__content {
position: relative;
margin: 0;
max-width: min(96vw, 1100px);
max-height: 90vh;
z-index: 1;
}
.lightbox__image {
display: block;
width: 100%;
max-height: 90vh;
object-fit: contain;
border-radius: 16px;
background: #111;
}
.lightbox__close {
position: absolute;
top: -42px;
right: 0;
border: 0;
background: transparent;
color: var(--white);
font-size: 40px;
line-height: 1;
cursor: pointer;
}
/* Footer */
.footer {
display: flex;
justify-content: space-between;
align-items: center;
gap: 1.5rem;
padding: var(--space-3) var(--space-7);
}
/* Media Queries (Responsive) */
@media (max-width: 48rem) {
.container {
width: 95%;
}
.nav {
flex-direction: column;
}
}
+125
View File
@@ -0,0 +1,125 @@
[
{
"id": 1,
"title": "Italienische Tavolata",
"location": "Luzern",
"address": "Pilatusstrasse 18, 6003 Luzern",
"date": "11. APR. 2026",
"time": "15:30 UHR",
"category": "Dinner",
"diet": "Vegetarisch",
"spots": 6,
"host": {
"name": "Ferdinando",
"initial": "F"
},
"hostMessage": [
"Ciao zusammen! Ich liebe die italienische Küche, nicht nur wegen des Essens, sondern wegen des Gefühls: Alle sitzen an einem langen Tisch, teilen sich grosse Platten und geniessen die Zeit.",
"Genau das möchte ich mit euch teilen. Ich bereite dafür eine klassische Tavolata vor, bei der verschiedene Gerichte in die Mitte des Tisches kommen und sich jeder bedient."
],
"menu": [
"Bruschetta-Variationen und Antipasti",
"Hausgemachte Pasta mit saisonalem Gemüse",
"Optional mit Salsiccia-Ragu",
"Tiramisu als Dolce"
],
"specifications": [
"Glutenfrei"
],
"participants": [
"Ferdinando",
"Alina",
"Ramon",
"Franca"
],
"gallery": [
"https://i.pinimg.com/736x/f8/48/e2/f848e218a5bd6702c9fbb225c8eebb3e.jpg",
"https://i.pinimg.com/736x/b1/3a/00/b13a00d5ee7a93b0e14f757d27043370.jpg",
"https://i.pinimg.com/1200x/78/5b/05/785b052394a8337c9a3b152a9745a580.jpg",
"https://i.pinimg.com/1200x/82/5e/9c/825e9c735e6fccdf6e7a4ac5dc2b2b7b.jpg"
]
},
{
"id": 2,
"title": "Noche Peruana",
"location": "Chur",
"address": "Obere Gasse 41, 7000 Chur",
"date": "16. Juni 2026",
"time": "19:00 UHR",
"category": "Dinner",
"diet": "Omnivore",
"spots": 4,
"host": {
"name": "Camila",
"initial": "C"
},
"hostMessage": [
"¡Hola a todos! Ich lade euch ein auf eine kulinarische Reise nach Peru.",
"Ich koche für euch ein authentisches peruanisches Sharing-Menü, das vor Lebensfreude nur so sprüht. Freut euch auf eine Explosion aus leuchtenden Farben, fein abgestimmter Schärfe und der unverwechselbaren Frische verschiedenster Kräuter.",
"Wir geniessen den Abend gemeinsam in mehreren kleinen Gängen, ganz nach dem Sharing-Prinzip. Dabei entdecken wir die klassischen Aromen meiner Heimatstadt Lima – von traditionell bis modern interpretiert.",
"Es wird gesellig, aromatisch und ein echtes Erlebnis für alle Sinne. ¡Buen provecho!"
],
"menu": [
"Ceviche mit Limette und Koriander",
"Aji de Gallina",
"Lomo Saltado",
"Suspiro a la Limena"
],
"specifications": [
],
"participants": [
"Camila",
"Mara",
"Luis",
"Tobias"
],
"gallery": [
"https://i.pinimg.com/736x/f4/4c/59/f44c597ce62067eef2b03091f30d2279.jpg",
"https://i.pinimg.com/736x/1d/41/eb/1d41ebe23ce4dde7853ab93fce1cfdb2.jpg",
"https://i.pinimg.com/736x/8d/9e/2e/8d9e2e13651f11ef64f661cb1d959738.jpg",
"https://i.pinimg.com/1200x/ee/bf/f0/eebff08d0d4d20e1b4505495925fb1d8.jpg"
]
},
{
"id": 3,
"title": "Japanese Delight",
"location": "Zürich",
"address": "Limmatquai 92, 8001 Zürich",
"date": "02. MAI. 2026",
"time": "12:30 UHR",
"category": "Lunch",
"diet": "Pescetarisch",
"spots": 8,
"host": {
"name": "Akiko",
"initial": "A"
},
"hostMessage": [
"Willkommen zu einem entspannten Lunch mit japanischen Klassikern und hausgemachten Beilagen.",
"Ich zeige euch, wie wir verschiedene kleine Teller kombinieren, damit jeder probieren kann."
],
"menu": [
"Miso Suppe",
"Sashimi Variation",
"Matcha Mochi"
],
"specifications": [
"Glutenfrei",
"Laktosefrei"
],
"participants": [
"Akiko",
"Jan",
"Mina"
],
"gallery": [
"https://i.pinimg.com/1200x/e2/6a/f5/e26af5c24b805081a3f304d240818302.jpg",
"https://i.pinimg.com/736x/21/77/4a/21774adee4ae0e4f7a1494e33ab3856b.jpg",
"https://i.pinimg.com/1200x/b1/fb/3a/b1fb3a7809f4046843904ac8800daacc.jpg",
"https://i.pinimg.com/1200x/c6/93/42/c69342ec621333e853c35bda891d8bc6.jpg"
]
}
]
+101
View File
@@ -0,0 +1,101 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Invité | Datenschutz</title>
<link rel="stylesheet" href="css/stylesheet_global.css" />
<script src="js/navigation.js" defer></script>
</head>
<body>
<header class="top-nav-wrap">
<div class="top-nav">
<a class="brand" href="index.html" aria-label="Zur Startseite">
<img src="assets/logo_invite.svg" alt="Invité">
</a>
<nav class="nav-tab-links" aria-label="Hauptnavigation">
<a class="button-small" href="login.html" aria-label="Login">Login</a>
</nav>
</div>
</header>
<main class="main-content" style="padding: 40px 20px; max-width: 800px; margin: 0 auto;">
<h1>Datenschutzerklärung</h1>
<h2>1. Verantwortliche Stelle</h2>
<p>
Invité GmbH<br>
Musterstrasse 12<br>
7000 Chur<br>
Schweiz<br>
E-Mail: datenschutz@invite-cooking.ch
</p>
<h2>2. Erhebung und Verarbeitung personenbezogener Daten</h2>
<p>
Beim Besuch unserer Website werden automatisch Informationen allgemeiner Natur erfasst.
Diese Informationen (Server-Logfiles) beinhalten die Art des Webbrowsers, das verwendete
Betriebssystem, den Domainnamen Ihres Internet-Service-Providers, Ihre IP-Adresse und
Ähnliches. Sie werden ausschliesslich zur technischen Bereitstellung und Verbesserung
unserer Website verwendet.
</p>
<h2>3. Registrierung und Nutzerkonto</h2>
<p>
Bei der Erstellung eines Nutzerkontos erheben wir folgende Daten: Name, E-Mail-Adresse
und Passwort. Diese Daten werden ausschliesslich zur Bereitstellung unserer Dienste
verwendet und nicht an Dritte weitergegeben.
</p>
<h2>4. Cookies</h2>
<p>
Unsere Website verwendet Cookies, um die Nutzererfahrung zu verbessern. Cookies sind
kleine Textdateien, die auf Ihrem Endgerät gespeichert werden. Sie können die Verwendung
von Cookies in Ihren Browsereinstellungen deaktivieren. Bitte beachten Sie, dass dadurch
die Funktionalität der Website eingeschränkt sein kann.
</p>
<h2>5. Datenweitergabe an Dritte</h2>
<p>
Eine Übermittlung Ihrer persönlichen Daten an Dritte findet nicht statt, es sei denn,
wir sind gesetzlich dazu verpflichtet oder Sie haben Ihre ausdrückliche Einwilligung
erteilt.
</p>
<h2>6. Datensicherheit</h2>
<p>
Wir setzen technische und organisatorische Sicherheitsmassnahmen ein, um Ihre Daten
gegen zufällige oder vorsätzliche Manipulation, Verlust, Zerstörung oder den Zugriff
unberechtigter Personen zu schützen. Unsere Sicherheitsmassnahmen werden entsprechend
der technologischen Entwicklung fortlaufend verbessert.
</p>
<h2>7. Ihre Rechte</h2>
<p>
Sie haben jederzeit das Recht auf Auskunft über die bei uns gespeicherten
personenbezogenen Daten. Ebenso haben Sie das Recht auf Berichtigung, Löschung
oder Einschränkung der Verarbeitung Ihrer Daten. Bitte wenden Sie sich dazu an:
datenschutz@invite-cooking.ch
</p>
<h2>8. Änderungen dieser Datenschutzerklärung</h2>
<p>
Wir behalten uns vor, diese Datenschutzerklärung gelegentlich anzupassen, damit sie
stets den aktuellen rechtlichen Anforderungen entspricht oder um Änderungen unserer
Leistungen umzusetzen. Für Ihren erneuten Besuch gilt dann die neue Datenschutzerklärung.
</p>
</main>
<div class="instagram-invite">
<a href="https://www.instagram.com" target="_blank" rel="noopener noreferrer" class="instagram-invite__link">
<img src="assets/Icon_instagram.png" alt="Instagram" class="instagram-invite__icon" />
<img src="assets/logo_invite.svg" alt="Invité Logo" class="instagram-invite__logo" />
</a>
</div>
<footer class="footer">
<p class="p-small">© Invité</p>
<a href="impressum.html" class="link-text-footer" >Impressum</a>
<a href="datenschutz.html" class="link-text-footer" >Datenschutz</a>
</footer>
</body>
</html>
+446
View File
@@ -0,0 +1,446 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Invité | Event erstellen</title>
<!-- Stylesheet für diese Seite-->
<link rel="stylesheet" href="css/event_create.css" />
<script src="js/navigation.js" defer></script>
<!-- Globales Stylesheet -->
<link rel="stylesheet" href="css/stylesheet_global.css">
</head>
<body>
<!-- Top Navigation mit Seitenlinks -->
<header class="top-nav-wrap">
<div class="top-nav">
<a class="brand" href="index.html" aria-label="Zur Startseite">
<img src="assets/logo_invite.svg" alt="Invite Logo">
</a>
<nav class="nav-tab-links" aria-label="Hauptnavigation">
<a class="button-small" href="login.html" aria-label="Login">Login</a>
</nav>
</div>
</header>
<main class="event-create-page">
<section class="event-flow-header" aria-label="Event erstellen Aktionen">
</section>
<form id="eventForm" class="event-form" novalidate>
<section
class="step step--active step--intro"
data-step="0"
aria-labelledby="intro-title"
>
<div class="step-layout step-layout--intro">
<div class="step-copy">
<p class="badge">Event erstellen</p>
<h1 id="intro-title">Hey <span id="username">{{username}}</span>, was hast du vor?</h1>
<p class="step-text">
Erzähl uns von deiner Idee, vom Essen bis zur Stimmung. Ob Dinner, Brunch
oder etwas ganz Eigenes wir helfen dir dabei, dein Event in sieben Schritten aufzubauen.
</p>
<button type="button" class="button-primary button--intro" data-start-flow>
Los geht’s!
</button>
</div>
<aside class="intro-card intro-card--image" aria-label="Stimmungsbild zur Event-Erstellung">
<img
class="intro-image"
src="assets/eventcreate_foodtable.jpg"
alt="Ein gedeckter Tisch mit gemeinsamem Essen"
/>
</aside>
</div>
</section>
<section class="step" data-step="1" aria-labelledby="step1-title">
<div class="step-layout">
<div class="step-copy">
<p class="badge">Schritt 1</p>
<h2 id="step1-title">Was hast du vor?</h2>
<p class="step-text">
Erzähl uns, was für ein Event du planst. Ist es ein gemütlicher Brunch,
ein Dinner mit Wow-Effekt oder einfach ein entspanntes Mittagessen mit gutem Essen?
</p>
</div>
<div class="step-fields">
<fieldset class="form-field">
<legend>Art des Essens / Eventtyp</legend>
<div class="option-grid option-grid--4">
<label class="option-card">
<input type="radio" name="eventType" value="Brunch" required />
<span>Brunch</span>
</label>
<label class="option-card">
<input type="radio" name="eventType" value="Lunch" />
<span>Lunch</span>
</label>
<label class="option-card">
<input type="radio" name="eventType" value="Kaffee + Kuchen" />
<span>Kaffee + Kuchen</span>
</label>
<label class="option-card">
<input type="radio" name="eventType" value="Dinner" />
<span>Dinner</span>
</label>
</div>
</fieldset>
<fieldset class="form-field">
<legend>Maximale Personenanzahl</legend>
<div class="counter" data-counter>
<button
type="button"
class="counter-button"
data-counter-action="decrease"
aria-label="Personenzahl verringern"
>
−
</button>
<input
type="number"
id="maxGuests"
name="maxGuests"
min="1"
step="1"
value="4"
required
/>
<button
type="button"
class="counter-button"
data-counter-action="increase"
aria-label="Personenzahl erhöhen"
>
+
</button>
</div>
</fieldset>
</div>
</div>
</section>
<section class="step" data-step="2" aria-labelledby="step2-title">
<div class="step-layout">
<div class="step-copy">
<p class="badge">Schritt 2</p>
<h2 id="step2-title">Was kommt auf den Tisch?</h2>
<p class="step-text">
Mach uns neugierig. Was gibt es zu essen? Gibt es eine bestimmte Ernährungsform oder ein Motto? Je mehr du verrätst, desto besser können sich deine Gäste auf dein Event freuen.
</p>
</div>
<div class="step-fields">
<fieldset class="form-field">
<legend>Ernährungsform</legend>
<div class="option-grid option-grid--3">
<label class="option-card">
<input type="radio" name="dietType" value="Omnivor" required />
<span>Omnivor</span>
<small>Fleisch und/oder Fisch</small>
</label>
<label class="option-card">
<input type="radio" name="dietType" value="Vegetarisch" />
<span>Vegetarisch</span>
</label>
<label class="option-card">
<input type="radio" name="dietType" value="Vegan" />
<span>Vegan</span>
</label>
</div>
</fieldset>
<div class="form-field">
<label for="menuDescription">Was ist das Menü?</label>
<textarea id="menuDescription" name="menuDescription" rows="5" required></textarea>
</div>
</div>
</div>
</section>
<section class="step" data-step="3" aria-labelledby="step3-title">
<div class="step-layout">
<div class="step-copy">
<p class="badge">Schritt 3</p>
<h2 id="step3-title">Gibt es etwas zu beachten?</h2>
<p class="step-text">
Gibt es Allergien, Unverträglichkeiten oder andere Hinweise, die für dein Event wichtig sind? So wissen deine Gäste gleich, worauf sie sich einstellen können.
</p>
</div>
<div class="step-fields">
<fieldset class="form-field">
<legend>Allergene / Unverträglichkeiten</legend>
<p class="field-hint">Optional – nur auswählen, wenn es für dein Event relevant ist.</p>
<div class="option-grid option-grid--3">
<label class="option-card option-card--checkbox">
<input type="checkbox" name="allergies" value="glutenfrei" />
<span>glutenfrei</span>
</label>
<label class="option-card option-card--checkbox">
<input type="checkbox" name="allergies" value="laktosefrei" />
<span>laktosefrei</span>
</label>
<label class="option-card option-card--checkbox">
<input type="checkbox" name="allergies" value="ohne Nüsse" />
<span>ohne Nüsse</span>
</label>
</div>
</fieldset>
<div class="form-field">
<label for="allergiesOther">Weitere Unverträglichkeiten oder Hinweise (optional)</label>
<textarea id="allergiesOther" name="allergiesOther" rows="3"></textarea>
</div>
</div>
</div>
</section>
<section class="step" data-step="4" aria-labelledby="step4-title">
<div class="step-layout">
<div class="step-copy">
<p class="badge">Schritt 4</p>
<h2 id="step4-title">Wann findet dein Event statt?</h2>
<p class="step-text">
Wähle Datum und Uhrzeit für dein Event. So können deine Gäste direkt einschätzen, ob der Termin für sie passt.
</p>
</div>
<div class="step-fields">
<div class="field-row">
<div class="form-field">
<label for="eventDate">Datum</label>
<input type="date" id="eventDate" name="eventDate" required />
</div>
<div class="form-field">
<label for="eventTime">Uhrzeit</label>
<input type="time" id="eventTime" name="eventTime" required />
</div>
</div>
</div>
</div>
</section>
<section class="step" data-step="5" aria-labelledby="step5-title">
<div class="step-layout">
<div class="step-copy">
<p class="badge">Schritt 5</p>
<h2 id="step5-title">Wo findet dein Event statt?</h2>
<p class="step-text">
Sag uns, wo dein Event stattfindet. Keine Sorge: Die genaue Adresse sehen Gäste erst nach der Buchung.
</p>
</div>
<div class="step-fields">
<div class="form-field">
<label for="eventAddress">Adresse</label>
<input type="text" id="eventAddress" name="eventAddress" autocomplete="street-address" required />
</div>
<div class="form-field">
<label for="eventCity">Ort</label>
<input type="text" id="eventCity" name="eventCity" autocomplete="address-level2" required />
</div>
</div>
</div>
</section>
<section class="step" data-step="6" aria-labelledby="step6-title">
<div class="step-layout">
<div class="step-copy">
<p class="badge">Schritt 6</p>
<h2 id="step6-title">Gib deinem Event den letzten Schliff.</h2>
<p class="step-text">
Jetzt bekommt dein Event seinen Namen und die Atmosphäre, die Lust aufs Dabeisein macht.
Ein klarer Titel (z.B. "Italienische Tavolata") und ein guter Beschreibungstext (Ablauf etc.) machen den Unterschied.
</p>
</div>
<div class="step-fields">
<div class="form-field">
<label for="eventTitle">Wie soll dein Event heissen?</label>
<input type="text" id="eventTitle" name="eventTitle" required />
</div>
<div class="form-field">
<label for="eventDescription">Beschreibung des Events</label>
<textarea id="eventDescription" name="eventDescription" rows="6" required></textarea>
</div>
<div class="form-field">
<label>Fotos hinzufügen <span class="field-hint-inline">(optional)</span></label>
<div class="gallery-upload">
<div class="gallery-preview" id="galleryPreview"></div>
<button type="button" class="gallery-add-btn" id="galleryAddBtn" aria-label="Foto hinzufügen">+</button>
<input type="file" id="galleryFileInput" accept="image/*" multiple hidden />
</div>
</div>
</div>
</div>
</section>
<section class="step" data-step="7" aria-labelledby="step7-title">
<div class="step-layout">
<div class="step-copy">
<p class="badge">Schritt 7</p>
<h2 id="step7-title">Dein Event auf einen Blick.</h2>
<p class="step-text">
Schau dir alle Details nochmal in Ruhe an. Wenn alles passt,
kannst du dein Event jetzt veröffentlichen und Gäste einladen.
</p>
</div>
<div class="review-card" aria-live="polite">
<dl class="review-list">
<div class="review-item" data-edit-step="1" data-edit-field="eventType" role="button" tabindex="0" aria-label="Eventtyp bearbeiten">
<dt>Eventtyp</dt>
<dd data-review="eventType">–</dd>
</div>
<div class="review-item" data-edit-step="1" data-edit-field="maxGuests" role="button" tabindex="0" aria-label="Maximale Personenanzahl bearbeiten">
<dt>Maximale Personenanzahl</dt>
<dd data-review="maxGuests">–</dd>
</div>
<div class="review-item" data-edit-step="2" data-edit-field="dietType" role="button" tabindex="0" aria-label="Ernährungsform bearbeiten">
<dt>Ernährungsform</dt>
<dd data-review="dietType">–</dd>
</div>
<div class="review-item" data-edit-step="2" data-edit-field="menuDescription" role="button" tabindex="0" aria-label="Menü bearbeiten">
<dt>Menü</dt>
<dd data-review="menuDescription">–</dd>
</div>
<div class="review-item" data-edit-step="3" data-edit-field="allergiesOther" role="button" tabindex="0" aria-label="Allergene und Unverträglichkeiten bearbeiten">
<dt>Allergene / Unverträglichkeiten</dt>
<dd data-review="allergies">Keine Angabe</dd>
</div>
<div class="review-item" data-edit-step="4" data-edit-field="eventDate" role="button" tabindex="0" aria-label="Datum bearbeiten">
<dt>Datum</dt>
<dd data-review="eventDate">–</dd>
</div>
<div class="review-item" data-edit-step="4" data-edit-field="eventTime" role="button" tabindex="0" aria-label="Uhrzeit bearbeiten">
<dt>Uhrzeit</dt>
<dd data-review="eventTime">–</dd>
</div>
<div class="review-item" data-edit-step="5" data-edit-field="eventAddress" role="button" tabindex="0" aria-label="Adresse bearbeiten">
<dt>Adresse</dt>
<dd data-review="eventAddress">–</dd>
</div>
<div class="review-item" data-edit-step="5" data-edit-field="eventCity" role="button" tabindex="0" aria-label="Ort bearbeiten">
<dt>Ort</dt>
<dd data-review="eventCity">–</dd>
</div>
<div class="review-item" data-edit-step="6" data-edit-field="eventTitle" role="button" tabindex="0" aria-label="Eventtitel bearbeiten">
<dt>Eventtitel</dt>
<dd data-review="eventTitle">–</dd>
</div>
<div class="review-item" data-edit-step="6" data-edit-field="eventDescription" role="button" tabindex="0" aria-label="Event-Abend bearbeiten">
<dt>Event-Abend</dt>
<dd data-review="eventDescription">–</dd>
</div>
</dl>
</div>
</div>
</section>
<div class="flow-footer" id="flowFooter" hidden>
<p id="errorMessage" class="error-message" role="alert" aria-live="assertive"></p>
<div class="flow-actions">
<button type="button" id="backButton" class="button-secondary">
Zurück
</button>
<div class="progress-wrap">
<span class="progress-label" id="progressMarkerLabel">
Schritt 1 von 7
</span>
<div class="progress">
<span id="progressBar" class="progress-bar"></span>
</div>
</div>
<button type="button" id="nextButton" class="button-primary">
Weiter
</button>
</div>
<div class="flow-actions-right">
<p id="errorMessage" class="error-message" role="alert" aria-live="assertive"></p>
</div>
</div>
<section
id="submissionSuccess"
class="submission-success"
aria-labelledby="success-title"
aria-live="polite"
hidden
>
<div class="step-layout">
<div class="step-copy">
<p class="badge">Event erstellt</p>
<h2 id="success-title">Dein Event ist ready.</h2>
<p class="step-text">
Sieht gut aus: Deine Idee ist jetzt live und bereit für Gäste.
Im Profil kannst du dein Event anschauen, verwalten oder direkt das nächste planen.
</p>
</div>
<div class="review-card review-card--success">
<div class="submission-success-actions">
<a class="button-primary" href="my_profil.html">Weiter zu deinem Profil</a>
</div>
</div>
</div>
</section>
</form>
</main>
<div class="instagram-invite">
<a href="https://www.instagram.com" target="_blank" rel="noopener noreferrer" class="instagram-invite__link">
<img src="assets/Icon_instagram.png" alt="Instagram" class="instagram-invite__icon" />
<img src="assets/logo_invite.svg" alt="Invité Logo" class="instagram-invite__logo" />
</a>
</div>
<footer class="footer">
<a href="impressum.html" class="footer-link">Impressum</a>
<a href="datenschutz.html" class="footer-link">Datenschutz</a>
</footer>
<script src="js/event_create.js"></script>
</body>
</html>
+55
View File
@@ -0,0 +1,55 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Event-Detail</title>
<!-- Globales Stylesheet -->
<link rel="stylesheet" href="css/stylesheet_global.css">
<!-- Stylesheet für diese Seite-->
<link rel="stylesheet" href="css/event_overview.css">
<script src="js/navigation.js" defer></script>
</head>
<body>
<!-- Top Navigation mit Seitenlinks -->
<header class="top-nav-wrap">
<div class="top-nav">
<a class="brand" href="index.html" aria-label="Zur Startseite">
<img src="assets/logo_invite.svg" alt="Invite Logo">
</a>
<nav class="nav-tab-links" aria-label="Hauptnavigation">
<a class="button-small" href="login.html" aria-label="Login">Login</a>
</nav>
</div>
</header>
<!-- Main content: detail page gets fully injected by JavaScript -->
<main class="container">
<!-- Render target: loading, error state or full detail layout -->
<div id="detail-view">
<p>Lädt Event-Details...</p>
</div>
</main>
<!-- Page logic: fetch by URL id, compose detail UI, handle gallery lightbox -->
<script src="js/event_detail.js"></script>
<!-- Snackbar: Feedback bei An-/Abmeldung -->
<div class="snackbar" id="snackbar"></div>
<!-- Instagram Einladung -->
<div class="instagram-invite">
<a href="https://www.instagram.com" target="_blank" rel="noopener noreferrer" class="instagram-invite__link">
<img src="assets/Icon_instagram.png" alt="Instagram" class="instagram-invite__icon" />
<img src="assets/logo_invite.svg" alt="Invité Logo" class="instagram-invite__logo" />
</a>
</div>
<footer class="footer">
<a href="impressum.html" class="footer-link">Impressum</a>
<a href="datenschutz.html" class="footer-link">Datenschutz</a>
</footer>
</body>
</html>
+87
View File
@@ -0,0 +1,87 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Event-Overview</title>
<!-- Stylesheet für diese Seite-->
<link rel="stylesheet" href="css/event_overview.css">
<script src="js/navigation.js" defer></script>
<!-- Globales Stylesheet -->
<link rel="stylesheet" href="css/stylesheet_global.css">
</head>
<body>
<!-- Top Navigation mit Seitenlinks -->
<header class="top-nav-wrap">
<div class="top-nav">
<a class="brand" href="index.html" aria-label="Zur Startseite">
<img src="assets/logo_invite.svg" alt="Invite Logo">
</a>
<nav class="nav-tab-links" aria-label="Hauptnavigation">
<a class="button-small" href="login.html" aria-label="Login">Login</a>
</nav>
</div>
</header>
<!-- Main content: page headline, filter controls and dynamic event list -->
<main class="container">
<!-- Page headline -->
<h1>Events</h1>
<!-- Filter section: category chips + location/date filters -->
<section class="filter-section">
<p class="filter-label">Was darf es sein?</p>
<div class="filter-row">
<!-- Primary category filter buttons -->
<div class="category-group">
<button class="category-item active" type="button" data-cat="ALLE">Alle</button>
<button class="category-item" type="button" data-cat="BRUNCH">Brunch</button>
<button class="category-item" type="button" data-cat="LUNCH">Lunch</button>
<button class="category-item" type="button" data-cat="COFFEE">Kaffee + Kuchen</button>
<button class="category-item" type="button" data-cat="DINNER">Dinner</button>
</div>
<!-- Secondary filters populated/handled by JavaScript -->
<div class="meta-filter-group" aria-label="Weitere Filter">
<label class="meta-filter" for="location-filter">
<span>Ort</span>
<select id="location-filter">
<option value="ALLE_ORTE">Alle Orte</option>
</select>
</label>
<label class="meta-filter" for="date-filter">
<span>Datum</span>
<input id="date-filter" type="date">
</label>
</div>
</div>
</section>
<!-- Render target: event cards or empty state -->
<section id="event-grid" class="event-list"></section>
</main>
<!-- Seitenlogik: Daten laden, filtern und Event-Karten rendern -->
<script src="js/event_overview.js"></script>
<!-- Snackbar: Feedback bei An-/Abmeldung -->
<div class="snackbar" id="snackbar"></div>
<!-- Instagram Einladung -->
<div class="instagram-invite">
<a href="https://www.instagram.com" target="_blank" rel="noopener noreferrer" class="instagram-invite__link">
<img src="assets/Icon_instagram.png" alt="Instagram" class="instagram-invite__icon" />
<img src="assets/logo_invite.svg" alt="Invité Logo" class="instagram-invite__logo" />
</a>
</div>
<footer class="footer">
<a href="impressum.html" class="footer-link">Impressum</a>
<a href="datenschutz.html" class="footer-link">Datenschutz</a>
</footer>
</body>
</html>
+74
View File
@@ -0,0 +1,74 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Invité | Impressum</title>
<link rel="stylesheet" href="css/stylesheet_global.css" />
<script src="js/navigation.js" defer></script>
</head>
<body>
<header class="top-nav-wrap">
<div class="top-nav">
<a class="brand" href="index.html" aria-label="Zur Startseite">
<img src="assets/logo_invite.svg" alt="Invité">
</a>
<nav class="nav-tab-links" aria-label="Hauptnavigation">
<a class="button-small" href="login.html" aria-label="Login">Login</a>
</nav>
</div>
</header>
<main class="main-content" style="padding: 40px 20px; max-width: 800px; margin: 0 auto;">
<h1>Impressum</h1>
<h2>Angaben gemäss § 5 TMG</h2>
<p>
Invité GmbH<br>
Musterstrasse 12<br>
7000 Chur<br>
Schweiz
</p>
<h2>Kontakt</h2>
<p>
Telefon: +41 81 123 45 67<br>
E-Mail: info@invite-cooking.ch
</p>
<h2>Vertretungsberechtigte Person</h2>
<p>Max Mustermann, Geschäftsführer</p>
<h2>Handelsregistereintrag</h2>
<p>
Eingetragen im Handelsregister des Kantons Graubünden<br>
Firmennummer: CHE-123.456.789
</p>
<h2>Haftungsausschluss</h2>
<p>
Die Inhalte dieser Website wurden mit grösster Sorgfalt erstellt. Für die Richtigkeit,
Vollständigkeit und Aktualität der Inhalte können wir jedoch keine Gewähr übernehmen.
</p>
<h2>Urheberrecht</h2>
<p>
Die durch die Seitenbetreiber erstellten Inhalte und Werke auf diesen Seiten unterliegen
dem schweizerischen Urheberrecht. Die Vervielfältigung, Bearbeitung, Verbreitung und jede
Art der Verwertung ausserhalb der Grenzen des Urheberrechtes bedürfen der schriftlichen
Zustimmung des jeweiligen Autors bzw. Erstellers.
</p>
</main>
<div class="instagram-invite">
<a href="https://www.instagram.com" target="_blank" rel="noopener noreferrer" class="instagram-invite__link">
<img src="assets/Icon_instagram.png" alt="Instagram" class="instagram-invite__icon" />
<img src="assets/logo_invite.svg" alt="Invité Logo" class="instagram-invite__logo" />
</a>
</div>
<footer class="footer">
<a href="impressum.html" class="footer-link">Impressum</a>
<a href="datenschutz.html" class="footer-link">Datenschutz</a>
</footer>
</body>
</html>
+163 -7
View File
@@ -1,12 +1,168 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="de">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title> <title>Invité</title>
<link rel="stylesheet" href="stylesheet.css">
</head>
<body>
<!-- Stylesheet für diese Seite-->
<link rel="stylesheet" href="css/index.css">
<!-- Globales Stylesheet -->
<link rel="stylesheet" href="css/stylesheet_global.css">
<!-- Font Awesome Icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
<script src="js/navigation.js" defer></script>
</head>
<body>
<!-- Top Navigation mit Seitenlinks -->
<header class="top-nav-wrap">
<div class="top-nav">
<a class="brand" href="index.html" aria-label="Zur Startseite">
<img src="assets/logo_invite.svg" alt="Invité">
</a>
<nav class="nav-tab-links" aria-label="Hauptnavigation">
<a class="button-small" href="login.html" aria-label="Login">Login</a>
</nav>
</div>
</header>
<main class="main-content">
<!-- Hero: uses .hero, .btn, .image-card, and .hero-image for a polished first impression -->
<section class="hero">
<div class="hero__left">
<span class="badge">einfach. lecker. gemeinsam.</span>
<h1>Teile deine Leidenschaft, geniesse gemeinsam.</h1>
<p>Ob du als leidenschaftlicher Hobbykoch Gastgeber sein möchtest oder als Feinschmecker einen Platz an einem lokalen Tisch suchst Invité verbindet Menschen durch die Kraft einer gemeinsamen Mahlzeit.</p>
<a class="button-primary" href="signup.html">Anmelden</a>
</div>
<div class="hero__right">
<div class="image-card">
<img class="hero-image" src="assets/index_ingredients.jpg" alt="Startpage Ingredients" />
</div>
</div>
</section>
<section class="how-it-works">
<div class="how-it-works__header">
<h2>So funktioniert's</h2>
</div>
<div class="how-it-works__steps">
<article class="how-step how-step--numbered">
<span class="how-step__corner-number how-step__corner-number--brown">1</span>
<i class="fa-solid fa-id-card how-step__icon"></i>
<p class="how-step__label how-step__label--brown how-step__label--big">Anmelden & Dabeisein</p>
<p class="how-step__label">Erstelle kurz dein Profil und zeig uns deinen Geschmack. Bei uns zählt der Mensch am Tisch, nicht der Lebenslauf.</p>
<div class="card-footer">
<div class="how-step__footer-banner">
<span>QUICK SETUP · 2 MIN</span>
</div>
</div>
</article>
<article class="how-step how-step--numbered">
<span class="how-step__corner-number how-step__corner-number--brown">2</span>
<i class="fa-solid fa-magnifying-glass-location how-step__icon"></i>
<p class="how-step__label how-step__label--brown how-step__label--big">Tisch finden oder decken</p>
<p class="how-step__label">Entdecke spontane Events in deiner Nähe oder öffne deine eigene Küche. Du entscheidest, ob du Gast oder Gastgeber bist</p>
<div class="card-footer">
<div class="how-step__footer-banner">
<span>GASTGEBER · GAST</span>
</div>
</div>
</article>
<article class="how-step how-step--numbered">
<span class="how-step__corner-number how-step__corner-number--brown">3</span>
<i class="fa-solid fa-utensils how-step__icon"></i>
<p class="how-step__label how-step__label--brown how-step__label--big">Teile den Tisch</p>
<p class="how-step__label">Triff neue Leute in entspannter Atmosphäre. Geniesse gutes Essen in Gesellschaft und mach aus einer Mahlzeit eine echte Begegnung.</p>
<div class="card-footer">
<div class="how-step__footer-banner">
<span>GEMEINSAM GENIESSEN</span>
</div>
</div>
</article>
</div>
</section>
<!-- Main Content: uses .gallery, .gallery__carousel, .gallery__track, .gallery__item, and .gallery__info to present event carousel content -->
<section class="gallery" aria-label="Bildergalerie" aria-roledescription="Karussell">
<div class="gallery__carousel">
<button type="button" class="gallery__arrow gallery__arrow--prev" aria-label="Vorheriges Bild">
<i class="fas fa-chevron-left"></i>
</button>
<div class="gallery__track" aria-live="polite">
<article class="gallery__item" role="group" aria-roledescription="Folie" aria-label="Bild 1 von 12">
<img src="assets/index_Red checkered social eating.jpg" alt="Red checkered social eating">
</article>
<article class="gallery__item" role="group" aria-roledescription="Folie" aria-label="Bild 2 von 12">
<img src="assets/index_Pasta and many forks.jpg" alt="Pasta and many forks">
</article>
<article class="gallery__item" role="group" aria-roledescription="Folie" aria-label="Bild 3 von 12">
<img src="assets/index_Zoomed in asian eating.jpg" alt="Zoomed in asian eating">
</article>
<article class="gallery__item" role="group" aria-roledescription="Folie" aria-label="Bild 4 von 12">
<img src="assets/index_Burger eating together.jpg" alt="Burger eating together">
</article>
<article class="gallery__item" role="group" aria-roledescription="Folie" aria-label="Bild 5 von 12">
<img src="assets/index_Cake cutting figs.jpg" alt="Cake cutting figs">
</article>
<article class="gallery__item" role="group" aria-roledescription="Folie" aria-label="Bild 6 von 12">
<img src="assets/index_Cooking woman at home.jpg" alt="Cooking woman at home">
</article>
<article class="gallery__item" role="group" aria-roledescription="Folie" aria-label="Bild 7 von 12">
<img src="assets/index_Eating and laughing girls.jpg" alt="Eating and laughing girls">
</article>
<article class="gallery__item" role="group" aria-roledescription="Folie" aria-label="Bild 8 von 12">
<img src="assets/index_Pasta in cheese.jpg" alt="Pasta in cheese">
</article>
<article class="gallery__item" role="group" aria-roledescription="Folie" aria-label="Bild 9 von 12">
<img src="assets/index_Salad roommates.jpg" alt="Salad roommates">
</article>
<article class="gallery__item" role="group" aria-roledescription="Folie" aria-label="Bild 10 von 12">
<img src="assets/index_Sharing food table.jpg" alt="Sharing food table">
</article>
<article class="gallery__item" role="group" aria-roledescription="Folie" aria-label="Bild 11 von 12">
<img src="assets/index_Spicy food zoomed.jpg" alt="Spicy food zoomed">
</article>
<article class="gallery__item" role="group" aria-roledescription="Folie" aria-label="Bild 12 von 12">
<img src="assets/index_cooking.jpg" alt="Cooking">
</article>
</div>
<button type="button" class="gallery__arrow gallery__arrow--next" aria-label="Nächstes Bild">
<i class="fas fa-chevron-right"></i>
</button>
</div>
<div class="gallery__dots" role="tablist" aria-label="Seite auswählen"></div>
<div class="instagram-invite">
<a href="https://www.instagram.com" target="_blank" rel="noopener noreferrer" class="instagram-invite__link">
<img src="assets/Icon_instagram.png" alt="Instagram" class="instagram-invite__icon" />
<img src="assets/logo_invite.svg" alt="Invité Logo" class="instagram-invite__logo" />
</a>
</div>
</section>
</main>
<!-- Lightbox: Bildansicht vergrössert -->
<div class="lightbox" id="gallery-lightbox" aria-hidden="true">
<div class="lightbox__backdrop" data-close-lightbox></div>
<figure class="lightbox__content" role="dialog" aria-modal="true" aria-label="Bildansicht">
<button class="lightbox__close" type="button" aria-label="Schliessen">&times;</button>
<img class="lightbox__image" src="" alt="Grossansicht">
</figure>
</div>
<script src="js/index-carousel.js"></script>
<footer class="footer">
<a href="impressum.html" class="footer-link">Impressum</a>
<a href="datenschutz.html" class="footer-link">Datenschutz</a>
</footer>
</body> </body>
</html> </html>
View File
Whitespace-only changes.
+846
View File
@@ -0,0 +1,846 @@
// =============================
// SETUP: Wichtige HTML-Elemente holen
// Diese Konstanten verbinden unser JavaScript mit dem HTML.
// So können wir später Buttons, Formularfelder und Bereiche steuern.
// =============================
const form = document.getElementById("eventForm");
const steps = Array.from(document.querySelectorAll(".step"));
const backButton = document.getElementById("backButton");
const nextButton = document.getElementById("nextButton");
const progressBar = document.getElementById("progressBar");
const progressMarkerLabel = document.getElementById("progressMarkerLabel");
const errorMessage = document.getElementById("errorMessage");
const usernameElement = document.getElementById("username");
const flowFooter = document.getElementById("flowFooter");
const submissionSuccess = document.getElementById("submissionSuccess");
const EVENTS_STORAGE_KEY = "socialCookingEvents";
const CURRENT_USER_KEY = "socialCookingCurrentUser";
// =============================
// STATE: aktueller Schritt im Flow
// currentStep merkt sich, auf welchem Schritt der User gerade ist.
// lastStep ist der letzte Schritt im Formular.
// =============================
let currentStep = 0;
const lastStep = steps.length - 1;
// Text für den Weiter-Button je nach Schritt
const nextLabels = {
0: "Weiter",
1: "Weiter",
2: "Weiter",
3: "Weiter",
4: "Weiter",
5: "Weiter",
6: "Weiter",
7: "Event veröffentlichen"
};
// Liest den aktiven Benutzer aus localStorage und setzt den Anzeigenamen im Header.
function getCurrentUser() {
try {
const raw = localStorage.getItem(CURRENT_USER_KEY);
return raw ? JSON.parse(raw) : null;
} catch (error) {
console.error("Aktueller Benutzer konnte nicht gelesen werden:", error);
return null;
}
}
const currentUser = getCurrentUser();
const displayName = currentUser?.vorname?.trim() || "Mia";
usernameElement.textContent = displayName;
// =============================
// STEP 1: Kleine Hilfsfunktionen
// Diese Funktionen helfen uns später an mehreren Stellen im Code.
// =============================
/**
* Gibt alle Eingabefelder eines bestimmten Schritts zurück.
* Rückgabe: Array mit input-, textarea- und select-Feldern.
*/
function getStepFields(stepIndex) {
return Array.from(
steps[stepIndex].querySelectorAll("input, textarea, select")
);
}
/**
* Zeigt eine Fehlermeldung im Formular an.
* Wenn keine Nachricht übergeben wird, wird die Meldung geleert.
*/
function setErrorMessage(message = "") {
errorMessage.textContent = message;
}
/**
* Entfernt alle Fehlermarkierungen innerhalb eines Schritts.
*/
function clearStepInvalidState(stepIndex) {
if (!steps[stepIndex]) return;
steps[stepIndex]
.querySelectorAll(".field-invalid, .option-card--invalid")
.forEach(element => {
element.classList.remove("field-invalid", "option-card--invalid");
});
}
/**
* Markiert ein einzelnes Feld visuell als ungültig.
*/
function markFieldInvalid(field) {
field.classList.add("field-invalid");
}
/**
* Markiert eine ganze Radio-Gruppe visuell als ungültig.
*/
function markRadioGroupInvalid(group) {
group.forEach(field => {
const card = field.closest(".option-card");
if (card) {
card.classList.add("option-card--invalid");
}
});
}
// =============================
// STEP 2: Schritt anzeigen & Oberfläche aktualisieren
// showStep() ist eine der wichtigsten Funktionen:
// Sie bestimmt, welcher Schritt sichtbar ist,
// und aktualisiert gleichzeitig die restliche Oberfläche.
// =============================
/**
* Zeigt den gewünschten Schritt an.
* Dabei werden auch Buttons, Progress Bar und Review aktualisiert.
*/
function showStep(index, pushHistory = true) {
currentStep = index;
submissionSuccess.hidden = true;
clearStepInvalidState(index);
// Nur der aktuelle Schritt soll sichtbar sein
steps.forEach((step, stepIndex) => {
step.classList.toggle("step--active", stepIndex === index);
});
updateFlowVisibility(index);
updateReviewIfNeeded(index);
updateProgressBar(index, lastStep);
setErrorMessage("");
// Browser-History aktualisieren, damit Zurück-Taste funktioniert
if (pushHistory) {
history.pushState({ step: index }, "");
}
// Für bessere UX: bei jedem Schritt wieder nach oben scrollen
window.scrollTo({ top: 0, behavior: "smooth" });
}
/**
* Steuert Sichtbarkeit von Footer und Buttons.
* Im Intro-Schritt werden Footer und Zurück-Button versteckt.
* Zusätzlich bekommt der Weiter-Button je nach Schritt ein anderes Label.
*/
function updateFlowVisibility(stepIndex) {
const isIntroStep = stepIndex === 0;
flowFooter.hidden = isIntroStep;
backButton.hidden = isIntroStep;
nextButton.textContent = nextLabels[stepIndex];
}
// =============================
// STEP 3: Fortschrittsanzeige
// Die Progress Bar zeigt, wie weit der User im Flow ist.
// Das Intro zählt noch nicht als eigentlicher Formularschritt.
// =============================
/**
* Berechnet den Fortschritt in Prozent und setzt die Breite der Progress Bar.
* Beispiel:
* - Intro = 0%
* - erster echter Formularschritt = 0%
* - letzter Schritt = 100%
*/
function updateProgressBar(stepIndex, totalStepIndex) {
const totalFormSteps = totalStepIndex;
let progress = 0;
let markerStep = 1;
if (stepIndex > 0) {
progress = ((stepIndex) / totalFormSteps) * 100;
markerStep = stepIndex;
}
progressBar.style.width = `${progress}%`;
progressMarkerLabel.textContent = `Schritt ${markerStep} von ${totalFormSteps}`;
}
// =============================
// STEP 4: Review-Daten vorbereiten
// Im letzten Schritt werden alle eingegebenen Daten nochmals angezeigt.
// Dafür brauchen wir Funktionen, die Feldwerte sauber auslesen und formatieren.
// =============================
/**
* Führt das Update der Review nur aus,
* wenn wirklich der letzte Schritt geöffnet ist.
*/
function updateReviewIfNeeded(stepIndex) {
if (stepIndex === lastStep) {
updateReview();
}
}
/**
* Gibt den Wert eines Formularfeldes zurück.
* Rückgabe:
* - eingegebener Text / ausgewählte Option
* - oder "–", falls nichts vorhanden ist
*/
function getFieldValue(name) {
const field = form.elements[name];
if (!field) return "–";
// Spezialfall: Radio-Gruppen verhalten sich anders als normale Inputs
if (field instanceof RadioNodeList) {
return field.value || "–";
}
return field.value.trim() || "–";
}
/**
* Gibt alle ausgewählten Checkbox-Werte als Text zurück.
* Beispiel: "Vegetarisch, Vegan"
* Falls nichts ausgewählt wurde: "Keine Angabe"
*/
function getCheckboxValues(name) {
const checked = Array.from(
form.querySelectorAll(`input[name="${name}"]:checked`)
);
return checked.length
? checked.map(item => item.value).join(", ")
: "Keine Angabe";
}
/**
* Formatiert ein Datum für die Review-Anzeige.
* Beispiel: aus "2026-03-26" wird "26.03.2026"
*/
function formatDate(value) {
if (!value || value === "–") return "–";
const date = new Date(value);
if (Number.isNaN(date.getTime())) return value;
return new Intl.DateTimeFormat("de-CH", {
day: "2-digit",
month: "2-digit",
year: "numeric"
}).format(date);
}
/**
* Schreibt einen Wert in das passende Feld der Review-Ansicht.
* Gesucht wird ein HTML-Element mit data-review="..."
*/
function updateReviewField(fieldName, value) {
const target = document.querySelector(`[data-review="${fieldName}"]`);
if (target) {
target.textContent = value;
}
}
/**
* Baut den Text für Allergien / Hinweise zusammen.
* Dabei werden Checkboxen und zusätzliches Freitextfeld kombiniert.
*/
function buildAllergiesReviewValue() {
const selected = getCheckboxValues("allergies");
const notes = getFieldValue("allergiesOther");
if (selected === "Keine Angabe" && notes === "–") return "Keine Angabe";
if (selected !== "Keine Angabe" && notes !== "–") {
return `${selected}, ${notes}`;
}
return selected !== "Keine Angabe" ? selected : notes;
}
/**
* Liest alle wichtigen Formularwerte aus
* und schreibt sie gesammelt in die Review-Ansicht.
*/
function updateReview() {
const reviewValues = getReviewValues();
Object.entries(reviewValues).forEach(([key, value]) => {
updateReviewField(key, value);
});
}
/**
* Liest alle wichtigen Formularwerte gesammelt aus.
*/
function getReviewValues() {
return {
eventTitle: getFieldValue("eventTitle"),
eventType: getFieldValue("eventType"),
menuDescription: getFieldValue("menuDescription"),
eventDescription: getFieldValue("eventDescription"),
maxGuests: getFieldValue("maxGuests"),
dietType: getFieldValue("dietType"),
allergies: buildAllergiesReviewValue(),
eventDate: formatDate(getFieldValue("eventDate")),
eventTime: getFieldValue("eventTime"),
eventAddress: getFieldValue("eventAddress"),
eventCity: getFieldValue("eventCity")
};
}
/**
* Liest lokal gespeicherte Events robust aus dem Browser-Storage.
*/
function getStoredEvents() {
try {
const stored = localStorage.getItem(EVENTS_STORAGE_KEY);
return stored ? JSON.parse(stored) : [];
} catch (error) {
console.error("Lokale Events konnten nicht gelesen werden:", error);
return [];
}
}
/**
* Speichert die komplette Eventliste zurück in den Browser-Storage.
*/
function setStoredEvents(events) {
localStorage.setItem(EVENTS_STORAGE_KEY, JSON.stringify(events));
}
/**
* Formatiert ein ISO-Datum in das bestehende Eventformat der Demo-Daten.
*/
function formatDateForStorage(value) {
if (!value) return "";
const date = new Date(value);
if (Number.isNaN(date.getTime())) return value;
const monthMap = {
0: "JAN",
1: "FEB",
2: "MRZ",
3: "APR",
4: "MAI",
5: "JUN",
6: "JUL",
7: "AUG",
8: "SEP",
9: "OKT",
10: "NOV",
11: "DEZ"
};
const day = String(date.getDate()).padStart(2, "0");
const month = monthMap[date.getMonth()];
const year = date.getFullYear();
return `${day}. ${month}. ${year}`;
}
/**
* Formatiert die Zeit in das bestehende Eventformat der Demo-Daten.
*/
function formatTimeForStorage(value) {
return value ? `${value} UHR` : "";
}
/**
* Zerlegt das Menü-Textarea in saubere Listenpunkte.
*/
function buildMenuItems(value) {
return value
.split("\n")
.map(item => item.replace(/^[•-]\s*/, "").trim())
.filter(Boolean);
}
/**
* Leitet den gewählten Eventtyp in die Kategorien der Übersicht über.
*/
function mapEventTypeToCategory(value) {
const categoryMap = {
Brunch: "BRUNCH",
Lunch: "LUNCH",
Dinner: "DINNER",
"Kaffee + Kuchen": "COFFEE"
};
return categoryMap[value] || value.toUpperCase();
}
/**
* Baut aus den Formulardaten ein lokal speicherbares Event-Objekt.
*/
function buildStoredEvent() {
const eventType = getFieldValue("eventType");
const dietType = getFieldValue("dietType");
const menuDescription = form.elements.menuDescription.value.trim();
const eventDescription = form.elements.eventDescription.value.trim();
const eventDate = form.elements.eventDate.value;
const eventTime = form.elements.eventTime.value;
const eventCity = form.elements.eventCity.value.trim();
return {
id: Date.now(),
title: form.elements.eventTitle.value.trim(),
location: eventCity,
address: form.elements.eventAddress.value.trim(),
date: formatDateForStorage(eventDate),
time: formatTimeForStorage(eventTime),
category: mapEventTypeToCategory(eventType),
diet: dietType,
spots: Number(form.elements.maxGuests.value),
host: {
name: usernameElement.textContent.trim() || "Host",
initial: (usernameElement.textContent.trim().charAt(0) || "H").toUpperCase()
},
hostEmail: currentUser?.email || "",
hostMessage: [eventDescription],
menu: buildMenuItems(menuDescription),
specifications: getCheckboxValues("allergies") === "Keine Angabe"
? []
: getCheckboxValues("allergies").split(", ").filter(Boolean),
allergiesNote: form.elements.allergiesOther.value.trim(),
// Host wird separat geführt und nicht als angemeldeter Gast gezählt.
participants: [],
gallery: [...galleryImages],
createdAt: new Date().toISOString(),
source: "local"
};
}
/**
* Speichert das aktuell erstellte Event lokal im Browser.
*/
function saveCurrentEvent() {
const storedEvents = getStoredEvents();
const nextEvents = [buildStoredEvent(), ...storedEvents];
setStoredEvents(nextEvents);
}
// =============================
// STEP 5: Validierung
// Bevor der User weitergehen darf, prüfen wir:
// 1. Sind Pflichtfelder ausgefüllt?
// 2. Wurde bei Pflicht-Radios etwas ausgewählt?
// =============================
/**
* Prüft, ob der aktuelle Schritt gültig ist.
* Rückgabe:
* - true = alles okay
* - false = es gibt einen Fehler
*/
function validateCurrentStep() {
// Intro und Review müssen nicht validiert werden
if (currentStep === 0 || currentStep === lastStep) return true;
const fields = getStepFields(currentStep);
clearStepInvalidState(currentStep);
// Zuerst Radio-Gruppen prüfen
const radioCheck = validateRadioGroups(fields);
if (!radioCheck.isValid) {
setErrorMessage(radioCheck.message);
return false;
}
// Danach normale Pflichtfelder prüfen
const requiredCheck = validateRequiredFields(fields);
if (!requiredCheck.isValid) {
setErrorMessage(requiredCheck.message);
return false;
}
setErrorMessage("");
return true;
}
/**
* Prüft alle Radio-Gruppen eines Schritts.
* Rückgabe:
* - Objekt mit isValid: true/false
* - bei Fehler zusätzlich eine passende Meldung
*/
function validateRadioGroups(fields) {
const names = [...new Set(fields.filter(f => f.type === "radio").map(f => f.name))];
for (const name of names) {
const group = Array.from(form.querySelectorAll(`input[name="${name}"]`));
const required = group.some(f => f.required);
const selected = group.some(f => f.checked);
if (required && !selected) {
markRadioGroupInvalid(group);
return {
isValid: false,
message: "Bitte wähle eine Option aus."
};
}
}
return { isValid: true };
}
/**
* Prüft alle Pflichtfelder ausser Radios und Checkboxen.
* Rückgabe:
* - Objekt mit isValid: true/false
* - bei Fehler zusätzlich eine passende Meldung
*/
function validateRequiredFields(fields) {
for (const field of fields) {
if (field.type === "radio" || field.type === "checkbox") continue;
if (!field.checkValidity()) {
markFieldInvalid(field);
return {
isValid: false,
message: "Bitte fülle alle Pflichtfelder aus."
};
}
}
return { isValid: true };
}
// =============================
// STEP 6: Navigation mit Zurück / Weiter
// Diese Funktionen bestimmen, was beim Klicken auf die Buttons passiert.
// =============================
/**
* Einen Schritt zurückgehen.
* Wenn der User im ersten Formularschritt ist, geht es zurück zum Intro.
*/
function handleBackClick() {
if (currentStep > 1) {
showStep(currentStep - 1);
} else {
showStep(0);
}
}
/**
* Einen Schritt weitergehen.
* Vorher wird geprüft, ob der aktuelle Schritt gültig ist.
* Im letzten Schritt wird stattdessen das Formular abgeschickt.
*/
function handleNextClick() {
if (!validateCurrentStep()) return;
if (currentStep < lastStep) {
showStep(currentStep + 1);
} else {
form.requestSubmit();
}
}
// =============================
// STEP 7: Submit
// Aktuell ist das nur eine Demo.
// Später könnte hier ein API-Call oder Speichern in einer Datenbank passieren.
// =============================
/**
* Reagiert auf das Absenden des Formulars.
* preventDefault verhindert, dass die Seite neu lädt.
*/
function handleFormSubmit(event) {
event.preventDefault();
saveCurrentEvent();
steps.forEach(step => step.classList.remove("step--active"));
flowFooter.hidden = true;
submissionSuccess.hidden = false;
setErrorMessage("");
window.scrollTo({ top: 0, behavior: "smooth" });
}
// =============================
// STEP 8: Counter-Felder (+ / -)
// Für Zahlenfelder wie z. B. Anzahl Gäste.
// =============================
/**
* Sucht alle Counter-Komponenten
* und verbindet die Plus-/Minus-Buttons mit den passenden Funktionen.
*/
function registerCounterHandlers() {
document.querySelectorAll("[data-counter]").forEach(counter => {
const input = counter.querySelector("input[type='number']");
const dec = counter.querySelector("[data-counter-action='decrease']");
const inc = counter.querySelector("[data-counter-action='increase']");
dec.addEventListener("click", () => updateCounterValue(input, -1));
inc.addEventListener("click", () => updateCounterValue(input, 1));
});
}
/**
* Erhöht oder verringert den Wert eines Zahlenfelds.
* Der Wert darf dabei nie kleiner als das definierte Minimum werden.
*/
function updateCounterValue(input, change) {
const min = Number(input.min || 1);
const currentValue = Number(input.value || min);
input.value = Math.max(min, currentValue + change);
}
/**
* Macht aus "-"+Enter im Menüfeld eine einfache Bullet-Liste.
*/
function registerMenuBulletHandler() {
const menuField = document.getElementById("menuDescription");
if (!menuField) return;
menuField.addEventListener("keydown", event => {
if (event.key !== "Enter") return;
const { selectionStart, selectionEnd, value } = menuField;
const lineStart = value.lastIndexOf("\n", selectionStart - 1) + 1;
const lineEnd = value.indexOf("\n", selectionStart);
const currentLineEnd = lineEnd === -1 ? value.length : lineEnd;
const currentLine = value.slice(lineStart, currentLineEnd);
const trimmedLine = currentLine.trim();
if (trimmedLine !== "-" && !currentLine.startsWith("• ")) return;
event.preventDefault();
const isEmptyBullet = currentLine.trim() === "•";
if (isEmptyBullet) {
const beforeLine = value.slice(0, lineStart);
const afterLine = value.slice(currentLineEnd);
const separator = beforeLine.endsWith("\n") || afterLine.startsWith("\n") ? "" : "\n";
const nextValue = `${beforeLine}${separator}${afterLine}`.replace(/\n{3,}/g, "\n\n");
menuField.value = nextValue;
const caretPosition = Math.min(lineStart, nextValue.length);
menuField.setSelectionRange(caretPosition, caretPosition);
menuField.dispatchEvent(new Event("input", { bubbles: true }));
return;
}
const bulletLine = currentLine.startsWith("• ") ? currentLine : currentLine.replace("-", "•");
const updatedLine = bulletLine.startsWith("• ") ? bulletLine : `• ${trimmedLine.slice(1).trimStart()}`;
const beforeLine = value.slice(0, lineStart);
const afterLine = value.slice(currentLineEnd);
const nextValue = `${beforeLine}${updatedLine}\n• ${afterLine}`;
const caretPosition = beforeLine.length + updatedLine.length + 3;
menuField.value = nextValue;
menuField.setSelectionRange(caretPosition, caretPosition);
menuField.dispatchEvent(new Event("input", { bubbles: true }));
});
}
/**
* Springt aus der Review zurück zum passenden Schritt
* und fokussiert das gewünschte Feld für direktes Weiterbearbeiten.
*/
function registerReviewEditHandlers() {
document.querySelectorAll(".review-item[data-edit-step]").forEach(item => {
const activateEdit = () => {
const stepIndex = Number(item.dataset.editStep);
const fieldName = item.dataset.editField;
showStep(stepIndex);
focusFieldByName(fieldName);
};
item.addEventListener("click", activateEdit);
item.addEventListener("keydown", event => {
if (event.key === "Enter" || event.key === " ") {
event.preventDefault();
activateEdit();
}
});
});
}
/**
* Entfernt Fehlermarkierungen, sobald der User ein Feld korrigiert.
*/
function registerValidationFeedbackHandlers() {
form.querySelectorAll("input, textarea, select").forEach(field => {
const clearInvalidState = () => {
field.classList.remove("field-invalid");
if (field.type === "radio") {
const group = Array.from(form.querySelectorAll(`input[name="${field.name}"]`));
const hasSelection = group.some(item => item.checked);
if (hasSelection) {
group.forEach(item => {
const card = item.closest(".option-card");
if (card) {
card.classList.remove("option-card--invalid");
}
});
}
}
};
field.addEventListener("input", clearInvalidState);
field.addEventListener("change", clearInvalidState);
});
}
/**
* Setzt den Fokus auf ein bestimmtes Feld oder die erste Option einer Radio-Gruppe.
*/
function focusFieldByName(fieldName) {
const field = form.elements[fieldName];
if (!field) return;
const focusTarget = field instanceof RadioNodeList ? field[0] : field;
if (focusTarget && typeof focusTarget.focus === "function") {
window.setTimeout(() => {
focusTarget.focus();
}, 150);
}
}
// =============================
// STEP 8b: Galerie-Upload (Fotos hinzufügen)
// =============================
const galleryImages = [];
function registerGalleryHandlers() {
const addBtn = document.getElementById("galleryAddBtn");
const fileInput = document.getElementById("galleryFileInput");
const preview = document.getElementById("galleryPreview");
if (!addBtn) return;
// Klick auf + öffnet direkt den Datei-Dialog
addBtn.addEventListener("click", () => {
fileInput.click();
});
// Datei(en) hochladen
fileInput.addEventListener("change", () => {
Array.from(fileInput.files).forEach(file => {
if (!file.type.startsWith("image/")) return;
const reader = new FileReader();
reader.onload = (e) => {
addGalleryImage(e.target.result);
};
reader.readAsDataURL(file);
});
fileInput.value = "";
});
function addGalleryImage(src) {
galleryImages.push(src);
renderGalleryPreview();
}
function removeGalleryImage(index) {
galleryImages.splice(index, 1);
renderGalleryPreview();
}
function renderGalleryPreview() {
preview.innerHTML = "";
galleryImages.forEach((src, i) => {
const thumb = document.createElement("div");
thumb.className = "gallery-thumb";
thumb.innerHTML = `
<img src="${src}" alt="Foto ${i + 1}">
<button type="button" class="gallery-thumb-remove" aria-label="Foto entfernen">&times;</button>
`;
thumb.querySelector(".gallery-thumb-remove").addEventListener("click", () => {
removeGalleryImage(i);
});
preview.appendChild(thumb);
});
}
}
// =============================
// STEP 9: Alles starten
// Hier werden alle Event Listener registriert
// und der Flow startet mit dem Intro-Schritt.
// =============================
/**
* Initialisiert den kompletten Event-Erstellungs-Flow.
* Diese Funktion wird einmal beim Laden der Seite aufgerufen.
*/
function initEventCreationFlow() {
// Buttons, die den Flow starten
document.querySelectorAll("[data-start-flow]").forEach(btn => {
btn.addEventListener("click", () => showStep(1));
});
// Navigation
backButton.addEventListener("click", handleBackClick);
nextButton.addEventListener("click", handleNextClick);
// Formular absenden
form.addEventListener("submit", handleFormSubmit);
// Counter aktivieren
registerCounterHandlers();
registerMenuBulletHandler();
registerValidationFeedbackHandlers();
registerReviewEditHandlers();
registerGalleryHandlers();
// Browser-Zurück-Taste: vorherigen Schritt wiederherstellen
window.addEventListener("popstate", (e) => {
if (e.state && typeof e.state.step === "number") {
showStep(e.state.step, false);
} else {
showStep(0, false);
}
});
// Startzustand: Intro anzeigen
submissionSuccess.hidden = true;
showStep(0);
// Initialen History-Eintrag ersetzen, damit Step 0 im Verlauf ist
history.replaceState({ step: 0 }, "");
}
// Startpunkt des Skripts
initEventCreationFlow();
+580
View File
@@ -0,0 +1,580 @@
document.addEventListener('DOMContentLoaded', async () => {
const EVENTS_STORAGE_KEY = 'socialCookingEvents';
const CURRENT_USER_KEY = 'socialCookingCurrentUser';
const REGISTRATION_STORAGE_KEY = 'socialCookingRegistrations';
// -------------------------------------------------------------
// DOM entry point and shared asset path.
// -------------------------------------------------------------
const detailContainer = document.getElementById('detail-view');
const locationIconPath = 'assets/icon_location.svg';
const calendarIconPath = 'assets/icon_calendar.svg';
const currentUser = getCurrentUser();
// Read event id from query string (detail page deep-link support).
const params = new URLSearchParams(window.location.search);
const eventId = parseInt(params.get('id'));
if (!eventId) {
window.location.href = 'event_overview.html';
return;
}
function getStoredEvents() {
try {
const stored = localStorage.getItem(EVENTS_STORAGE_KEY);
return stored ? JSON.parse(stored) : [];
} catch (error) {
console.error('Lokale Events konnten nicht gelesen werden.', error);
return [];
}
}
function getCurrentUser() {
try {
const stored = localStorage.getItem(CURRENT_USER_KEY);
return stored ? JSON.parse(stored) : null;
} catch (error) {
console.error('Aktueller Benutzer konnte nicht gelesen werden.', error);
return null;
}
}
function getRegistrationMap() {
try {
const stored = localStorage.getItem(REGISTRATION_STORAGE_KEY);
return stored ? JSON.parse(stored) : {};
} catch (error) {
console.error('Anmeldedaten konnten nicht gelesen werden.', error);
return {};
}
}
function setRegistrationMap(registrationMap) {
localStorage.setItem(REGISTRATION_STORAGE_KEY, JSON.stringify(registrationMap));
}
function parseEventDateTime(event) {
if (!event?.date) {
return null;
}
const dateValue = String(event.date).trim();
const isoDateMatch = dateValue.match(/^(\d{4})-(\d{2})-(\d{2})$/);
let year;
let month;
let day;
if (isoDateMatch) {
year = Number(isoDateMatch[1]);
month = Number(isoDateMatch[2]);
day = Number(isoDateMatch[3]);
} else {
const monthMap = {
JAN: 1,
FEB: 2,
'MÄR': 3,
MRZ: 3,
APR: 4,
MAI: 5,
JUN: 6,
JUL: 7,
AUG: 8,
SEP: 9,
OKT: 10,
NOV: 11,
DEZ: 12
};
const localizedMatch = dateValue.match(/^(\d{1,2})\.\s*([A-ZÄÖÜ]{3})\.\s*(\d{4})$/);
if (!localizedMatch) {
return null;
}
day = Number(localizedMatch[1]);
month = monthMap[localizedMatch[2]];
year = Number(localizedMatch[3]);
if (!month) {
return null;
}
}
const timeMatch = String(event.time || '').match(/(\d{1,2}):(\d{2})/);
const hours = timeMatch ? Number(timeMatch[1]) : 0;
const minutes = timeMatch ? Number(timeMatch[2]) : 0;
return new Date(year, month - 1, day, hours, minutes, 0, 0);
}
function isRegistrationClosedForEvent(event) {
const eventDateTime = parseEventDateTime(event);
if (!eventDateTime || Number.isNaN(eventDateTime.getTime())) {
return false;
}
const msUntilStart = eventDateTime.getTime() - Date.now();
const twelveHoursInMs = 12 * 60 * 60 * 1000;
return msUntilStart <= twelveHoursInMs;
}
// Abmeldefrist: 1 Tag (24 h) vor Eventstart.
function getDeregistrationInfo(event) {
const eventDateTime = parseEventDateTime(event);
if (!eventDateTime || Number.isNaN(eventDateTime.getTime())) {
return { daysLeft: null, isClosed: false };
}
const oneDayMs = 24 * 60 * 60 * 1000;
const deadlineMs = eventDateTime.getTime() - oneDayMs;
const msUntilDeadline = deadlineMs - Date.now();
if (msUntilDeadline <= 0) {
return { daysLeft: 0, isClosed: true };
}
const daysLeft = Math.ceil(msUntilDeadline / oneDayMs);
return { daysLeft, isClosed: false };
}
// Adresse ist nur im 12h-Fenster VOR Eventstart sichtbar.
function isAddressVisibleWindow(event) {
const eventDateTime = parseEventDateTime(event);
if (!eventDateTime || Number.isNaN(eventDateTime.getTime())) {
return false;
}
const msUntilStart = eventDateTime.getTime() - Date.now();
const twelveHoursInMs = 12 * 60 * 60 * 1000;
return msUntilStart >= 0 && msUntilStart <= twelveHoursInMs;
}
function countRegistrationsForEvent(registrationMap, eventId) {
return Object.values(registrationMap).reduce((count, ids) => {
const hasEvent = Array.isArray(ids)
&& ids.map(id => Number(id)).includes(Number(eventId));
return hasEvent ? count + 1 : count;
}, 0);
}
// Ermittelt, ob das Event vom aktuell eingeloggten Benutzer erstellt wurde.
function isEventOwnedByCurrentUser(event, user) {
if (!event || !user) {
return false;
}
const userEmail = String(user.email || '').trim().toLowerCase();
const hostEmail = String(event.hostEmail || '').trim().toLowerCase();
if (userEmail && hostEmail) {
return userEmail === hostEmail;
}
// Fallback für ältere Datensätze ohne hostEmail.
const userFirstName = String(user.vorname || '').trim().toLowerCase();
const hostName = String(event.host?.name || '').trim().toLowerCase();
return Boolean(userFirstName && hostName && userFirstName === hostName);
}
// Prüft, ob der aktuelle Benutzer bereits in der Teilnehmerliste des Events steht.
function isUserListedInEventParticipants(event, user) {
if (!event || !user || !Array.isArray(event.participants)) {
return false;
}
const participantSet = new Set(
event.participants
.map(name => String(name || '').trim().toLowerCase())
.filter(Boolean)
);
const userFirstName = String(user.vorname || '').trim().toLowerCase();
const userFullName = `${String(user.vorname || '').trim()} ${String(user.nachname || '').trim()}`
.trim()
.toLowerCase();
return Boolean(
(userFirstName && participantSet.has(userFirstName))
|| (userFullName && participantSet.has(userFullName))
);
}
// Fetch data source and resolve the matching event record.
try {
const response = await fetch('data/events.json');
const apiEvents = await response.json();
const allEvents = [...getStoredEvents(), ...apiEvents];
const event = allEvents.find(e => e.id === eventId);
if (event) {
renderDetailPage(event);
} else {
detailContainer.innerHTML = "<h1>Event wurde nicht gefunden.</h1><a href='event_overview.html'>Zurück zur Übersicht</a>";
}
} catch (error) {
console.error("Fehler beim Laden der Details:", error);
}
// Format localized date token into full readable date.
function formatEventDate(dateString) {
const labels = {
JAN: 'Januar',
FEB: 'Februar',
'MÄR': 'März',
MRZ: 'März',
APR: 'April',
MAI: 'Mai',
JUN: 'Juni',
JUL: 'Juli',
AUG: 'August',
SEP: 'September',
OKT: 'Oktober',
NOV: 'November',
DEZ: 'Dezember'
};
const match = dateString.match(/^(\d{1,2})\.\s*([A-ZÄÖÜ]{3})\.\s*(\d{4})$/);
if (!match) {
return dateString;
}
const day = Number(match[1]);
const monthLabel = labels[match[2]];
const year = match[3];
return monthLabel ? `${day}. ${monthLabel} ${year}` : dateString;
}
// Normalize time casing for UI consistency.
function formatEventTime(timeString) {
return timeString.replace('UHR', 'Uhr').trim();
}
// Map diet keys to readable labels while keeping unknown values untouched.
function getDietLabel(diet) {
const labels = {
VEGGIE: 'Vegetarisch',
VEGAN: 'Vegan',
FLEISCH: 'Fleisch',
FISCH: 'Fisch'
};
return labels[diet] || diet;
}
// Compose and inject the full detail UI for a single event.
function renderDetailPage(event) {
// Core display values and resilient fallbacks for optional data fields.
const displayDate = formatEventDate(event.date);
const displayTime = formatEventTime(event.time);
const dietLabel = getDietLabel(event.diet);
const eventCategory = event.category || 'EVENT';
const hostName = event.host?.name || 'Host';
const hostInitial = (event.host?.initial || hostName.charAt(0) || 'H').charAt(0).toUpperCase();
const hostMessage = Array.isArray(event.hostMessage) && event.hostMessage.length > 0
? event.hostMessage
: ['Der Host hat für dieses Event noch keine Nachricht hinterlegt.'];
const menuItems = Array.isArray(event.menu) && event.menu.length > 0
? event.menu
: ['Menü wird in Kürze bekannt gegeben.'];
const specifications = Array.isArray(event.specifications) && event.specifications.length > 0
? event.specifications
: [];
const participants = Array.isArray(event.participants) ? event.participants : [];
const galleryImages = Array.isArray(event.gallery) && event.gallery.length > 0
? event.gallery
: [event.image, event.image, event.image];
const visibleParticipants = participants.slice(0, 6);
const registrationMap = getRegistrationMap();
const extraRegistrations = countRegistrationsForEvent(registrationMap, event.id);
const remainingParticipants = Math.max(0, participants.length + extraRegistrations - visibleParticipants.length);
const totalGuests = Number.isFinite(event.spots) ? event.spots : 0;
const confirmedGuests = participants.length + extraRegistrations;
const freePlaces = Math.max(0, totalGuests - confirmedGuests);
const isFull = freePlaces === 0;
const isRegistrationClosed = isRegistrationClosedForEvent(event);
const isOwnEvent = isEventOwnedByCurrentUser(event, currentUser);
const deregInfo = getDeregistrationInfo(event);
const userRegistrations = currentUser?.email && Array.isArray(registrationMap[currentUser.email])
? registrationMap[currentUser.email].map(id => Number(id))
: [];
const isRegistered = userRegistrations.includes(Number(event.id));
const isListedParticipant = isUserListedInEventParticipants(event, currentUser);
const hasAddressAccess = isRegistered || isListedParticipant;
const actionButtonLabel = isOwnEvent
? 'Dein Event!'
: !currentUser
? 'Einloggen'
: isRegistered
? (deregInfo.isClosed ? 'Abmeldung geschlossen' : 'Abmelden')
: isRegistrationClosed
? 'Anmeldung geschlossen'
: 'Anmelden';
const actionButtonDisabled = isOwnEvent
|| (!isRegistered && (isFull || isRegistrationClosed))
|| (isRegistered && deregInfo.isClosed);
const actionButtonVariantClass = isOwnEvent
? ' detail-primary-btn-own'
: isRegistered
? ' detail-primary-btn-danger'
: isRegistrationClosed
? ' detail-primary-btn-danger'
: ' detail-primary-btn-register';
const shouldRevealAddress = Boolean(event.address) && isAddressVisibleWindow(event) && hasAddressAccess;
const addressPanelMarkup = shouldRevealAddress
? `
<article class="detail-panel">
<h2 class="detail-section-title">Adresse</h2>
<p>${event.address}</p>
</article>
`
: '';
const detailChips = [
`<span class="event-tag">${eventCategory}</span>`,
`<span class="event-tag">${dietLabel}</span>`,
...specifications.map(item => `<span class="event-tag">${item}</span>`)
].join('');
// Render complete detail page layout including:
// hero metadata, host card, menu, participants, gallery and sticky action bar.
detailContainer.innerHTML = `
<div class="detail-page">
<a class="detail-back" href="event_overview.html">
<span aria-hidden="true">&lsaquo;</span>
Alle Events
</a>
<section class="detail-hero">
<div class="detail-top-row">
<span class="event-location">
<img src="${locationIconPath}" class="icon" alt="">
${event.location}
</span>
<span class="event-date-time"> <img src="${calendarIconPath}" class="icon" alt=""> ${displayDate} | ${displayTime} |
${confirmedGuests}/${totalGuests} Gäste <span class="event-location">
</div>
<h1 class="detail-title">${event.title}</h1>
<div class="event-meta-row detail-chip-row">
${detailChips}
</div>
</section>
<section class="detail-content-grid">
<div class="detail-side-stack">
<article class="detail-panel">
<header class="host-header">
<span class="host-role">Host</span>
<span class="host-name">${hostName}</span>
</header>
${hostMessage.map(paragraph => `<p>${paragraph}</p>`).join('')}
</article>
<article class="detail-panel">
<h2 class="detail-section-title">Menu</h2>
<ul class="detail-menu-list">
${menuItems.map(item => `<li>${item}</li>`).join('')}
</ul>
</article>
<article class="detail-panel">
<div class="detail-participants-head">
<h2 class="detail-section-title">Teilnehmer</h2>
<button type="button" class="detail-participants-link" data-show-all-participants>Alle ansehen</button>
</div>
<div class="detail-avatar-row" data-participants-row>
${visibleParticipants.map(name => `<span class="participant-avatar">${name.charAt(0).toUpperCase()}</span>`).join('')}
${remainingParticipants > 0 ? `<span class="participant-more">+${remainingParticipants}</span>` : ''}
</div>
<div class="detail-participants-full hidden" data-participants-full>
${participants.map(name => `
<div class="detail-participant-item">
<span class="participant-name">${name}</span>
</div>
`).join('')}
</div>
</article>
${addressPanelMarkup}
</div>
<div class="detail-gallery detail-gallery-large">
${galleryImages.slice(0, 9).map((img, index) => `
<button class="detail-gallery-item" type="button" aria-label="Bild ${index + 1} gross anzeigen" data-fullsrc="${img}">
<img src="${img}" alt="${event.title} Bild ${index + 1}" class="detail-gallery-image">
</button>
`).join('')}
</div>
</section>
<section class="detail-action-bar">
<div class="detail-action-summary">
<small class="detail-action-meta">
<span class="event-location detail-action-location">
<img src="${locationIconPath}" alt="">
${event.location}
</span>
<span class="detail-action-meta-text">| ${displayDate} | ${displayTime} | ${confirmedGuests}/${totalGuests} Gäste</span>
</small>
<strong>${event.title}</strong>
</div>
<div class="detail-action-buttons">
<span class="detail-spots-pill${isFull ? ' detail-spots-pill-full' : ''}">
${isFull ? 'AUSGEBUCHT' : `${freePlaces} Plätze frei`}
</span>
<div class="detail-action-btn-wrap">
<button class="detail-primary-btn${actionButtonVariantClass}" type="button" data-register-button ${actionButtonDisabled ? 'disabled' : ''}>
${actionButtonLabel}
</button>
${isRegistered && deregInfo.daysLeft !== null ? `
<small class="detail-dereg-hint${deregInfo.isClosed ? ' detail-dereg-hint--closed' : ''}">
${deregInfo.isClosed
? 'Abmeldefrist abgelaufen'
: deregInfo.daysLeft === 1
? 'Noch 1 Tag zur Abmeldung'
: `Noch ${deregInfo.daysLeft} Tage zur Abmeldung`}
</small>
` : ''}
</div>
</div>
</section>
<div class="detail-lightbox" aria-hidden="true">
<div class="detail-lightbox-backdrop" data-close-lightbox="true"></div>
<figure class="detail-lightbox-content" role="dialog" aria-modal="true" aria-label="Bildansicht">
<button class="detail-lightbox-close" type="button" aria-label="Schliessen">&times;</button>
<img class="detail-lightbox-image" src="" alt="Grossansicht Eventbild">
</figure>
</div>
</div>
`;
// ---------------------------------------------------------
// Lightbox behavior for gallery images:
// open on image click, close via backdrop, close button or ESC.
// ---------------------------------------------------------
const lightbox = detailContainer.querySelector('.detail-lightbox');
const lightboxImage = detailContainer.querySelector('.detail-lightbox-image');
const lightboxClose = detailContainer.querySelector('.detail-lightbox-close');
const galleryButtons = detailContainer.querySelectorAll('.detail-gallery-item');
const registerButton = detailContainer.querySelector('[data-register-button]');
// Harte Absicherung: Eigene Events sind auf der Detailseite immer deaktiviert.
if (registerButton && isOwnEvent) {
registerButton.disabled = true;
registerButton.textContent = 'Dein Event!';
registerButton.setAttribute('aria-disabled', 'true');
}
// Anmeldung toggeln und im lokalen Registrierungs-Store persistieren.
if (registerButton) {
registerButton.addEventListener('click', () => {
if (isOwnEvent) {
return;
}
if (!currentUser || !currentUser.email) {
window.location.href = 'login.html';
return;
}
const nextRegistrationMap = getRegistrationMap();
const currentList = Array.isArray(nextRegistrationMap[currentUser.email])
? nextRegistrationMap[currentUser.email].map(id => Number(id))
: [];
const registrationSet = new Set(currentList);
if (registrationSet.has(Number(event.id))) {
registrationSet.delete(Number(event.id));
// Snackbar: Feedback bei Abmeldung.
const snackbar = document.getElementById('snackbar');
if (snackbar) {
snackbar.textContent = 'Du wurdest erfolgreich abgemeldet.';
snackbar.classList.add('snackbar--danger', 'snackbar--visible');
setTimeout(() => {
snackbar.classList.remove('snackbar--visible');
setTimeout(() => snackbar.classList.remove('snackbar--danger'), 400);
}, 3000);
}
} else if (!isFull && !isRegistrationClosed) {
registrationSet.add(Number(event.id));
// Snackbar: Feedback bei Anmeldung.
const snackbar = document.getElementById('snackbar');
if (snackbar) {
snackbar.textContent = 'Du wurdest erfolgreich angemeldet.';
snackbar.classList.add('snackbar--visible');
setTimeout(() => snackbar.classList.remove('snackbar--visible'), 3000);
}
}
nextRegistrationMap[currentUser.email] = Array.from(registrationSet);
setRegistrationMap(nextRegistrationMap);
// Re-Render aktualisiert Buttonzustand und CTA ohne Seitenreload.
renderDetailPage(event);
});
}
// "Alle ansehen": Teilnehmerliste aufklappen / zuklappen.
const showAllBtn = detailContainer.querySelector('[data-show-all-participants]');
const avatarRow = detailContainer.querySelector('[data-participants-row]');
const fullList = detailContainer.querySelector('[data-participants-full]');
if (showAllBtn && avatarRow && fullList) {
showAllBtn.addEventListener('click', () => {
const isExpanded = !fullList.classList.contains('hidden');
fullList.classList.toggle('hidden');
avatarRow.classList.toggle('hidden');
showAllBtn.textContent = isExpanded ? 'Alle ansehen' : 'Weniger anzeigen';
});
}
// Central close helper to keep all close paths consistent.
function closeLightbox() {
if (!lightbox) {
return;
}
lightbox.classList.remove('is-open');
lightbox.setAttribute('aria-hidden', 'true');
}
if (lightbox && lightboxImage) {
// Open with selected image source.
galleryButtons.forEach(button => {
button.addEventListener('click', () => {
const imageSrc = button.getAttribute('data-fullsrc');
if (!imageSrc) {
return;
}
lightboxImage.src = imageSrc;
lightbox.classList.add('is-open');
lightbox.setAttribute('aria-hidden', 'false');
});
});
// Close when user clicks on backdrop.
lightbox.addEventListener('click', event => {
const target = event.target;
if (target instanceof HTMLElement && target.hasAttribute('data-close-lightbox')) {
closeLightbox();
}
});
// Close via dedicated icon/button.
lightboxClose?.addEventListener('click', closeLightbox);
// Close with keyboard for accessibility.
document.addEventListener('keydown', event => {
if (event.key === 'Escape') {
closeLightbox();
}
});
}
}
});
+490
View File
@@ -0,0 +1,490 @@
document.addEventListener('DOMContentLoaded', () => {
const EVENTS_STORAGE_KEY = 'socialCookingEvents';
const CURRENT_USER_KEY = 'socialCookingCurrentUser';
const REGISTRATION_STORAGE_KEY = 'socialCookingRegistrations';
// -------------------------------------------------------------
// DOM references used throughout the page lifecycle.
// -------------------------------------------------------------
const eventGrid = document.getElementById('event-grid');
const filterButtons = document.querySelectorAll('.category-item');
const locationFilter = document.getElementById('location-filter');
const dateFilter = document.getElementById('date-filter');
const locationIconPath = 'assets/icon_location.svg';
const calendarIconPath = 'assets/icon_calendar.svg';
// -------------------------------------------------------------
// In-memory state for fetched events and currently active category.
// -------------------------------------------------------------
let allEvents = [];
let activeCategory = 'ALLE';
const currentUser = getCurrentUser();
function getCurrentUser() {
try {
const stored = localStorage.getItem(CURRENT_USER_KEY);
return stored ? JSON.parse(stored) : null;
} catch (error) {
console.error('Aktueller Benutzer konnte nicht gelesen werden.', error);
return null;
}
}
// Prüft, ob ein Event dem aktuellen Benutzer gehört.
function isEventOwnedByCurrentUser(event, user) {
if (!event || !user) {
return false;
}
const userEmail = String(user.email || '').trim().toLowerCase();
const hostEmail = String(event.hostEmail || '').trim().toLowerCase();
if (userEmail && hostEmail) {
return userEmail === hostEmail;
}
const userFirstName = String(user.vorname || '').trim().toLowerCase();
const hostName = String(event.host?.name || '').trim().toLowerCase();
return Boolean(userFirstName && hostName && userFirstName === hostName);
}
function getStoredEvents() {
try {
const stored = localStorage.getItem(EVENTS_STORAGE_KEY);
return stored ? JSON.parse(stored) : [];
} catch (error) {
console.error('Lokale Events konnten nicht gelesen werden.', error);
return [];
}
}
function getRegistrationMap() {
try {
const stored = localStorage.getItem(REGISTRATION_STORAGE_KEY);
return stored ? JSON.parse(stored) : {};
} catch (error) {
console.error('Anmeldedaten konnten nicht gelesen werden.', error);
return {};
}
}
function setRegistrationMap(registrationMap) {
localStorage.setItem(REGISTRATION_STORAGE_KEY, JSON.stringify(registrationMap));
}
// -------------------------------------------------------------
// Initial data bootstrap:
// 1) fetch JSON,
// 2) populate select options,
// 3) restore filter state from sessionStorage,
// 4) render filtered list.
// -------------------------------------------------------------
async function fetchEvents() {
try {
const response = await fetch('data/events.json');
const apiEvents = await response.json();
const localEvents = getStoredEvents();
allEvents = [...localEvents, ...apiEvents];
populateMetaFilters();
const savedCategory = sessionStorage.getItem('activeFilter') || 'ALLE';
const savedLocation = sessionStorage.getItem('activeLocation') || 'ALLE_ORTE';
const savedDate = sessionStorage.getItem('activeDate') || '';
activeCategory = savedCategory;
if (locationFilter) {
locationFilter.value = hasOption(locationFilter, savedLocation) ? savedLocation : 'ALLE_ORTE';
}
if (dateFilter) {
dateFilter.value = savedDate;
}
applyFilters();
} catch (error) {
console.error('Fehler:', error);
eventGrid.innerHTML = '<p>Events konnten nicht geladen werden.</p>';
}
}
// Build location options dynamically from loaded events.
function populateMetaFilters() {
const locations = [...new Set(allEvents.map(event => event.location))].sort();
if (locationFilter) {
locations.forEach(location => {
const option = document.createElement('option');
option.value = location;
option.textContent = location;
locationFilter.appendChild(option);
});
}
}
// Convert localized event date (e.g. 19. MÄR. 2026) into ISO format for date input comparison.
function parseEventDateToIso(dateString) {
if (/^\d{4}-\d{2}-\d{2}$/.test(dateString)) {
return dateString;
}
const months = {
JAN: '01',
FEB: '02',
'MÄR': '03',
MRZ: '03',
APR: '04',
MAI: '05',
JUN: '06',
JUL: '07',
AUG: '08',
SEP: '09',
OKT: '10',
NOV: '11',
DEZ: '12'
};
const match = dateString.match(/^(\d{1,2})\.\s*([A-ZÄÖÜ]{3})\.\s*(\d{4})$/);
if (!match) {
return '';
}
const day = String(match[1]).padStart(2, '0');
const month = months[match[2]];
const year = match[3];
return month ? `${year}-${month}-${day}` : '';
}
// Convert short month notation into full German month label for UI display.
function formatEventDate(dateString) {
if (/^\d{4}-\d{2}-\d{2}$/.test(dateString)) {
const [year, month, day] = dateString.split('-');
return `${Number(day)}. ${['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'][Number(month) - 1]} ${year}`;
}
const labels = {
JAN: 'Januar',
FEB: 'Februar',
'MÄR': 'März',
MRZ: 'März',
APR: 'April',
MAI: 'Mai',
JUN: 'Juni',
JUL: 'Juli',
AUG: 'August',
SEP: 'September',
OKT: 'Oktober',
NOV: 'November',
DEZ: 'Dezember'
};
const match = dateString.match(/^(\d{1,2})\.\s*([A-ZÄÖÜ]{3})\.\s*(\d{4})$/);
if (!match) {
return dateString;
}
const day = Number(match[1]);
const monthLabel = labels[match[2]];
const year = match[3];
return monthLabel ? `${day}. ${monthLabel} ${year}` : dateString;
}
// Normalize time label from UHR to Uhr for consistent typography.
function formatEventTime(timeString) {
if (!timeString) {
return '';
}
return timeString.includes('UHR')
? timeString.replace('UHR', 'Uhr').trim()
: `${timeString} Uhr`;
}
// Baut aus Eventdatum/-zeit ein Date-Objekt für Fristlogik und Vergleiche.
function parseEventDateTime(event) {
if (!event?.date) {
return null;
}
const dateValue = String(event.date).trim();
const isoDateMatch = dateValue.match(/^(\d{4})-(\d{2})-(\d{2})$/);
let year;
let month;
let day;
if (isoDateMatch) {
year = Number(isoDateMatch[1]);
month = Number(isoDateMatch[2]);
day = Number(isoDateMatch[3]);
} else {
const monthMap = {
JAN: 1,
FEB: 2,
'MÄR': 3,
MRZ: 3,
APR: 4,
MAI: 5,
JUN: 6,
JUL: 7,
AUG: 8,
SEP: 9,
OKT: 10,
NOV: 11,
DEZ: 12
};
const localizedMatch = dateValue.match(/^(\d{1,2})\.\s*([A-ZÄÖÜ]{3})\.\s*(\d{4})$/);
if (!localizedMatch) {
return null;
}
day = Number(localizedMatch[1]);
month = monthMap[localizedMatch[2]];
year = Number(localizedMatch[3]);
if (!month) {
return null;
}
}
const timeMatch = String(event.time || '').match(/(\d{1,2}):(\d{2})/);
const hours = timeMatch ? Number(timeMatch[1]) : 0;
const minutes = timeMatch ? Number(timeMatch[2]) : 0;
return new Date(year, month - 1, day, hours, minutes, 0, 0);
}
// Zählt eindeutige Registrierungen eines Events über alle Benutzer.
function countRegistrationsForEvent(registrationMap, eventId) {
return Object.values(registrationMap).reduce((count, ids) => {
const hasEvent = Array.isArray(ids)
&& ids.map(id => Number(id)).includes(Number(eventId));
return hasEvent ? count + 1 : count;
}, 0);
}
// Schliesst neue Anmeldungen ab 12h vor Start (inkl. bereits gestarteter Events).
function isRegistrationClosedForEvent(event) {
const eventDateTime = parseEventDateTime(event);
if (!eventDateTime || Number.isNaN(eventDateTime.getTime())) {
return false;
}
const msUntilStart = eventDateTime.getTime() - Date.now();
const twelveHoursInMs = 12 * 60 * 60 * 1000;
return msUntilStart <= twelveHoursInMs;
}
// Safely verify whether a value exists in the given select element.
function hasOption(selectElement, value) {
return Array.from(selectElement.options).some(option => option.value === value);
}
// Apply all filters together (category, location, date), update button state, render and persist.
function applyFilters() {
const selectedLocation = locationFilter ? locationFilter.value : 'ALLE_ORTE';
const selectedDate = dateFilter ? dateFilter.value : '';
filterButtons.forEach(btn => {
if (btn.getAttribute('data-cat') === activeCategory) {
btn.classList.add('active');
} else {
btn.classList.remove('active');
}
});
const filtered = allEvents.filter(event => {
const categoryMatch = activeCategory === 'ALLE' || event.category === activeCategory;
const locationMatch = selectedLocation === 'ALLE_ORTE' || event.location === selectedLocation;
const eventDateIso = parseEventDateToIso(event.date);
const dateMatch = !selectedDate || eventDateIso === selectedDate;
return categoryMatch && locationMatch && dateMatch;
});
renderEvents(filtered);
sessionStorage.setItem('activeFilter', activeCategory);
sessionStorage.setItem('activeLocation', selectedLocation);
sessionStorage.setItem('activeDate', selectedDate);
}
// Render either:
// - empty state call-to-action when no results match,
// - or event cards with status and metadata.
function renderEvents(events) {
eventGrid.innerHTML = '';
const registrationMap = getRegistrationMap();
const userRegistrationSet = currentUser?.email && Array.isArray(registrationMap[currentUser.email])
? new Set(registrationMap[currentUser.email].map(id => Number(id)))
: new Set();
if (events.length === 0) {
eventGrid.innerHTML = `
<div class="empty-state">
<p class="empty-state-kicker">Keine Treffer</p>
<h3>Schade, aktuell gibt es hier keine Events.</h3>
<p>Starte dein eigenes Event und bringe die Community an deinen Tisch.</p>
<a class="empty-state-link" href="event_create.html">
<button class="empty-state-btn" type="button">Event erstellen</button>
</a>
</div>
`;
return;
}
events.forEach(event => {
// Card shell and click-through navigation to detail page.
const card = document.createElement('article');
card.className = 'event-card';
card.style.cursor = 'pointer';
card.addEventListener('click', clickedEvent => {
if (clickedEvent.target instanceof HTMLElement && clickedEvent.target.closest('button')) {
return;
}
window.location.href = `event_detail.html?id=${event.id}`;
});
const displayDate = formatEventDate(event.date);
const displayTime = formatEventTime(event.time);
// Capacity logic:
// spots = total capacity, participants.length = booked seats.
const baseParticipants = Array.isArray(event.participants) ? event.participants.length : 0;
const extraRegistrations = countRegistrationsForEvent(registrationMap, event.id);
const bookedSeats = baseParticipants + extraRegistrations;
const totalCapacity = event.spots;
const freePlaces = Math.max(0, totalCapacity - bookedSeats);
const isFull = freePlaces === 0;
const isOwnEvent = isEventOwnedByCurrentUser(event, currentUser);
const isRegistered = userRegistrationSet.has(Number(event.id));
const isRegistrationClosed = isRegistrationClosedForEvent(event);
// Build optional specification chips only when data exists.
const specsChips = event.specifications && event.specifications.length > 0
? event.specifications.map(spec => `<span class="event-tag">${spec}</span>`).join('')
: '';
const actionMarkup = isOwnEvent
? '<button class="button-primary" type="button" data-registration-action="own" disabled>Dein Event!</button>'
: isRegistered
? '<button class="button-primary button-primary-abmelden" type="button" data-registration-action="unregister">Abmelden</button>'
: isRegistrationClosed
? '<button class="button-primary" button-primary-abmelden" type="button" data-registration-action="closed" disabled>Anmeldung geschlossen</button>'
: isFull
? ''
: !currentUser
? '<button class="button-primary btn-primary-register" type="button" data-registration-action="login">Anmelden</button>'
: '<button class="button-primary btn-primary-register" type="button" data-registration-action="register">Anmelden</button>';
card.innerHTML = `
<div class="event-main">
<div class="event-top-row">
<span class="event-location">
<img src="${locationIconPath}" class="icon" alt="">
${event.location}
</span>
<span class="event-date-time"> <img src="${calendarIconPath}" class="icon" alt=""> ${displayDate} | ${displayTime}
</span>
<span class="event-date-time"> ${bookedSeats}/${totalCapacity} Gäste</span>
</div>
<h2>${event.title}</h2>
<div class="event-meta-row">
<span class="event-tag">${event.category}</span>
<span class="event-tag">${event.diet}</span>
${specsChips}
</div>
</div>
<div class="event-side${isFull ? ' event-side-full' : ''}">
<span class="event-spots${isFull ? ' event-spots-full' : ''}">${isFull ? 'Ausgebucht' : `${freePlaces} Plätze frei`}</span>
${actionMarkup}
</div>
`;
const actionButton = card.querySelector('[data-registration-action]');
if (actionButton) {
actionButton.addEventListener('click', clickEvent => {
clickEvent.stopPropagation();
const action = actionButton.getAttribute('data-registration-action');
if (action === 'own') {
return;
}
if (action === 'closed') {
return;
}
if (action === 'login') {
window.location.href = 'login.html';
return;
}
if (!currentUser?.email) {
window.location.href = 'login.html';
return;
}
const nextRegistrationMap = getRegistrationMap();
const currentIds = Array.isArray(nextRegistrationMap[currentUser.email])
? nextRegistrationMap[currentUser.email].map(id => Number(id))
: [];
const idSet = new Set(currentIds);
// Abmeldung: Benutzer vom Event entfernen und Snackbar anzeigen.
if (action === 'unregister') {
idSet.delete(Number(event.id));
const snackbar = document.getElementById('snackbar');
if (snackbar) {
snackbar.textContent = 'Du wurdest erfolgreich abgemeldet.';
snackbar.classList.add('snackbar--danger', 'snackbar--visible');
setTimeout(() => {
snackbar.classList.remove('snackbar--visible');
setTimeout(() => snackbar.classList.remove('snackbar--danger'), 400);
}, 3000);
}
}
// Anmeldung: Benutzer zum Event hinzufügen und Snackbar anzeigen.
if (action === 'register' && !isFull && !isRegistrationClosed) {
idSet.add(Number(event.id));
const snackbar = document.getElementById('snackbar');
if (snackbar) {
snackbar.textContent = 'Du wurdest erfolgreich angemeldet.';
snackbar.classList.add('snackbar--visible');
setTimeout(() => snackbar.classList.remove('snackbar--visible'), 3000);
}
}
nextRegistrationMap[currentUser.email] = Array.from(idSet);
setRegistrationMap(nextRegistrationMap);
applyFilters();
});
}
eventGrid.appendChild(card);
});
}
// Category filter interactions.
filterButtons.forEach(button => {
button.addEventListener('click', () => {
activeCategory = button.getAttribute('data-cat');
applyFilters();
});
});
// Secondary filter interactions.
if (locationFilter) {
locationFilter.addEventListener('change', applyFilters);
}
if (dateFilter) {
dateFilter.addEventListener('change', applyFilters);
}
// Kick off initial load/render cycle.
fetchEvents();
});
+143
View File
@@ -0,0 +1,143 @@
// =============================================
// Galerie-Karussell (Startseite)
// Diese Datei steuert die Foto-Galerie mit Pfeilen.
// =============================================
// Wichtige Elemente aus dem HTML holen.
const carouselTrack = document.querySelector('.gallery__track');
const prevArrow = document.querySelector('.gallery__arrow--prev');
const nextArrow = document.querySelector('.gallery__arrow--next');
const dotsContainer = document.querySelector('.gallery__dots');
// Nur ausführen, wenn die Galerie auf der Seite vorhanden ist.
if (carouselTrack) {
// Alle einzelnen Karten/Bilder im Track sammeln.
const items = Array.from(carouselTrack.querySelectorAll('.gallery__item'));
// Auf Mobile zeigen wir 1 Bild, auf Desktop 3 Bilder pro "Seite".
const getItemsPerPage = () => (window.matchMedia('(max-width: 900px)').matches ? 1 : 3);
let itemsPerPage = getItemsPerPage();
let pageCount = Math.ceil(items.length / itemsPerPage);
let activePage = 0;
var dots = [];
function buildDots() {
if (!dotsContainer) return;
dotsContainer.innerHTML = '';
dots = [];
for (var i = 0; i < pageCount; i++) {
var dot = document.createElement('button');
dot.type = 'button';
dot.className = 'gallery__dot' + (i === activePage ? ' gallery__dot--active' : '');
dot.setAttribute('role', 'tab');
dot.setAttribute('aria-selected', i === activePage ? 'true' : 'false');
dot.setAttribute('aria-label', 'Seite ' + (i + 1) + ' von ' + pageCount);
dot.dataset.page = i;
dot.addEventListener('click', function() {
goToPage(parseInt(this.dataset.page));
});
dotsContainer.appendChild(dot);
dots.push(dot);
}
}
function updateDots() {
dots.forEach(function(dot, i) {
dot.classList.toggle('gallery__dot--active', i === activePage);
dot.setAttribute('aria-selected', i === activePage ? 'true' : 'false');
});
}
function updateTrack() {
var gap = parseFloat(getComputedStyle(carouselTrack).gap) || 20;
var itemWidth = items[0].getBoundingClientRect().width;
var offset = activePage * (itemWidth + gap) * itemsPerPage;
carouselTrack.style.transform = 'translateX(-' + offset + 'px)';
carouselTrack.style.transition = 'transform 0.4s ease';
updateDots();
}
function goToPage(page) {
activePage = page;
updateTrack();
}
// Geht zur nächsten Seite (mit Wrap-around am Ende).
function showNext() {
activePage = (activePage + 1) % pageCount;
updateTrack();
}
// Geht zur vorherigen Seite (mit Wrap-around zum Ende).
function showPrev() {
activePage = (activePage - 1 + pageCount) % pageCount;
updateTrack();
}
buildDots();
// Klick-Steuerung der Pfeile.
if (nextArrow) nextArrow.addEventListener('click', showNext);
if (prevArrow) prevArrow.addEventListener('click', showPrev);
// Tastatur-Support für Barrierefreiheit.
document.addEventListener('keydown', function(event) {
if (event.key === 'ArrowRight') showNext();
if (event.key === 'ArrowLeft') showPrev();
});
// Reagiert auf Bildschirmgrössen-Änderungen.
window.addEventListener('resize', function() {
var newPerPage = getItemsPerPage();
if (newPerPage !== itemsPerPage) {
itemsPerPage = newPerPage;
pageCount = Math.ceil(items.length / itemsPerPage);
activePage = 0;
}
buildDots();
updateTrack();
});
// =============================================
// Lightbox: Bild vergrössern bei Klick
// =============================================
const lightbox = document.getElementById('gallery-lightbox');
const lightboxImage = lightbox ? lightbox.querySelector('.lightbox__image') : null;
function openLightbox(src, alt) {
if (!lightbox || !lightboxImage) return;
lightboxImage.src = src;
lightboxImage.alt = alt || 'Grossansicht';
lightbox.classList.add('is-open');
lightbox.setAttribute('aria-hidden', 'false');
}
function closeLightbox() {
if (!lightbox) return;
lightbox.classList.remove('is-open');
lightbox.setAttribute('aria-hidden', 'true');
lightboxImage.src = '';
}
// Klick auf Galerie-Bild öffnet die Lightbox.
items.forEach(function(item) {
var img = item.querySelector('img');
if (img) {
item.addEventListener('click', function() {
openLightbox(img.src, img.alt);
});
}
});
// Lightbox schliessen: Backdrop, Close-Button oder ESC-Taste.
if (lightbox) {
lightbox.querySelector('.lightbox__close').addEventListener('click', closeLightbox);
lightbox.querySelector('[data-close-lightbox]').addEventListener('click', closeLightbox);
document.addEventListener('keydown', function(e) {
if (e.key === 'Escape' && lightbox.classList.contains('is-open')) {
closeLightbox();
}
});
}
}
+52
View File
@@ -0,0 +1,52 @@
// =============================================
// Mini-Galerie auf der Landingpage
// Diese Datei hebt immer ein Bild hervor und
// erlaubt Navigation mit Pfeilen/Tastatur.
// =============================================
// Elemente aus dem DOM lesen.
const prevBtn = document.querySelector('.arrow--prev');
const nextBtn = document.querySelector('.arrow--next');
const items = Array.from(document.querySelectorAll('.gallery__item'));
let activeIndex = 0;
// Aktualisiert die Darstellung aller Bilder:
// - aktives Bild ist klar sichtbar
// - inaktive Bilder sind abgeblendet
function updateGallery() {
items.forEach((item, i) => {
item.style.opacity = i === activeIndex ? '1' : '0.35';
item.style.transform = i === activeIndex ? 'scale(1)' : 'scale(0.95)';
});
}
// Ein Schritt nach rechts.
function showNext() {
if (!items.length) return;
activeIndex = (activeIndex + 1) % items.length;
updateGallery();
}
// Ein Schritt nach links.
function showPrev() {
if (!items.length) return;
activeIndex = (activeIndex - 1 + items.length) % items.length;
updateGallery();
}
// Event-Handler nur registrieren, wenn die Buttons existieren.
if (nextBtn) nextBtn.addEventListener('click', showNext);
if (prevBtn) prevBtn.addEventListener('click', showPrev);
// Tastatursteuerung für bessere Bedienbarkeit.
document.addEventListener('keydown', (event) => {
if (event.key === 'ArrowRight') {
showNext();
}
if (event.key === 'ArrowLeft') {
showPrev();
}
});
// Initialen Zustand einmal setzen.
updateGallery();
+135
View File
@@ -0,0 +1,135 @@
// =============================================
// Login-Logik
// Diese Datei validiert die Eingaben, sucht den
// Benutzer im localStorage und legt die Session an.
// =============================================
// Formular und Felder aus dem HTML holen.
const loginForm = document.getElementById('loginForm');
const emailInput = document.getElementById('email');
const passwortInput = document.getElementById('passwort');
const emailError = document.getElementById('emailError');
const passwortError = document.getElementById('passwortError');
const USERS_STORAGE_KEY = 'socialCookingUsers';
const CURRENT_USER_KEY = 'socialCookingCurrentUser';
// Liest alle registrierten Benutzer robust aus localStorage.
function getStoredUsers() {
try {
const raw = localStorage.getItem(USERS_STORAGE_KEY);
return raw ? JSON.parse(raw) : [];
} catch (error) {
console.error('Benutzerdaten konnten nicht gelesen werden.', error);
return [];
}
}
// Speichert den aktiven Benutzer für nachfolgende Seiten.
function setCurrentUser(user) {
localStorage.setItem(CURRENT_USER_KEY, JSON.stringify(user));
}
// Erstellt einen Demo-Benutzer, falls für die E-Mail noch kein Account existiert.
function createFallbackUser(email, passwort) {
const localPart = email.split('@')[0] || 'Gast';
const normalized = localPart.replace(/[._-]/g, ' ').trim();
const guessedVorname = normalized ? normalized.split(' ')[0] : 'Gast';
return {
id: Date.now(),
vorname: guessedVorname.charAt(0).toUpperCase() + guessedVorname.slice(1),
nachname: '',
email,
passwort,
createdAt: new Date().toISOString(),
source: 'login-fallback'
};
}
// Validierungsfunktion
function validateForm(event) {
event.preventDefault();
let isValid = true;
// Email-Validierung
const emailValue = emailInput.value.trim();
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
const emailGroup = emailInput.parentElement;
if (!emailValue) {
emailGroup.classList.add('has-error');
emailError.textContent = 'Bitte gib deine E-Mail Adresse ein.';
isValid = false;
} else if (!emailRegex.test(emailValue)) {
emailGroup.classList.add('has-error');
emailError.textContent = 'Bitte gib eine gültige E-Mail Adresse ein.';
isValid = false;
} else {
emailGroup.classList.remove('has-error');
}
// Passwort-Validierung
const passwortValue = passwortInput.value;
const passwortGroup = passwortInput.parentElement;
if (!passwortValue) {
passwortGroup.classList.add('has-error');
passwortError.textContent = 'Bitte gib dein Passwort ein.';
isValid = false;
} else if (passwortValue.length < 6) {
passwortGroup.classList.add('has-error');
passwortError.textContent = 'Dein Passwort ist zu kurz. Bitte überprüfe dein Passwort.';
isValid = false;
} else {
passwortGroup.classList.remove('has-error');
}
// Wenn alle Validierungen bestanden, prüfen wir:
// 1) gibt es den Benutzer schon?
// 2) ist das Passwort korrekt?
// Danach speichern wir die aktive Session.
if (isValid) {
const users = getStoredUsers();
const matchedUser = users.find(user => user.email?.toLowerCase() === emailValue.toLowerCase());
if (matchedUser && matchedUser.passwort !== passwortValue) {
passwortGroup.classList.add('has-error');
passwortError.textContent = 'Das Passwort ist nicht korrekt.';
return;
}
const userToLogin = matchedUser || createFallbackUser(emailValue, passwortValue);
setCurrentUser(userToLogin);
// Snackbar anzeigen und dann zur Event-Übersicht weiterleiten.
var snackbar = document.getElementById('snackbar');
if (snackbar) {
snackbar.classList.add('snackbar--visible');
setTimeout(function() {
window.location.href = 'event_overview.html';
}, 2000);
} else {
window.location.href = 'event_overview.html';
}
}
}
// Fehlerbehandlung bei Input-Änderung (entfernt Fehler wenn Benutzer korrigiert)
emailInput.addEventListener('input', function() {
const emailGroup = this.parentElement;
if (this.value.trim()) {
emailGroup.classList.remove('has-error');
}
});
passwortInput.addEventListener('input', function() {
const passwortGroup = this.parentElement;
if (this.value) {
passwortGroup.classList.remove('has-error');
}
});
// Form Submit Event
loginForm.addEventListener('submit', validateForm);
+636
View File
@@ -0,0 +1,636 @@
document.addEventListener('DOMContentLoaded', () => {
const EVENTS_STORAGE_KEY = 'socialCookingEvents';
const USERS_STORAGE_KEY = 'socialCookingUsers';
const CURRENT_USER_KEY = 'socialCookingCurrentUser';
const REGISTRATION_STORAGE_KEY = 'socialCookingRegistrations';
// Zentrale DOM-Referenzen für klare, testbare Funktionen.
const loggedOutState = document.getElementById('logged-out-state');
const loggedInContent = document.getElementById('logged-in-content');
const profileHeadline = document.getElementById('profile-headline');
const profileSubline = document.getElementById('profile-subline');
const logoutButton = document.getElementById('logout-button');
const profileTabButtons = Array.from(document.querySelectorAll('[data-profile-tab]'));
const profileTabPanels = Array.from(document.querySelectorAll('[data-profile-panel]'));
const myEventsCount = document.getElementById('my-events-count');
const myRegistrationsCount = document.getElementById('my-registrations-count');
const myEventsList = document.getElementById('my-events-list');
const myRegistrationsList = document.getElementById('my-registrations-list');
const profileForm = document.getElementById('profile-form');
const profileFeedback = document.getElementById('profile-feedback');
const vornameInput = document.getElementById('vorname');
const nachnameInput = document.getElementById('nachname');
const emailInput = document.getElementById('email');
const passwortInput = document.getElementById('passwort');
let currentUser = getCurrentUser();
let allEvents = [];
init();
async function init() {
if (!currentUser) {
renderLoggedOutState();
return;
}
renderLoggedInState(currentUser);
bindFormHandlers();
activateProfileTab('hosting');
allEvents = await loadAllEvents();
renderMyEvents(allEvents, currentUser);
renderMyRegistrations(allEvents, currentUser);
}
// Liest den aktuell eingeloggten Benutzer robust aus dem Storage.
function getCurrentUser() {
try {
const raw = localStorage.getItem(CURRENT_USER_KEY);
return raw ? JSON.parse(raw) : null;
} catch (error) {
console.error('Der aktuelle Benutzer konnte nicht geladen werden.', error);
return null;
}
}
// Liest lokal erstellte Events aus dem Storage.
function getStoredEvents() {
try {
const raw = localStorage.getItem(EVENTS_STORAGE_KEY);
return raw ? JSON.parse(raw) : [];
} catch (error) {
console.error('Lokale Events konnten nicht gelesen werden.', error);
return [];
}
}
// Liest den Anmeldestatus pro Benutzer-E-Mail.
function getRegistrationMap() {
try {
const raw = localStorage.getItem(REGISTRATION_STORAGE_KEY);
return raw ? JSON.parse(raw) : {};
} catch (error) {
console.error('Anmeldedaten konnten nicht gelesen werden.', error);
return {};
}
}
// Schreibt den gesamten Registrierungszustand in localStorage.
function setRegistrationMap(registrationMap) {
localStorage.setItem(REGISTRATION_STORAGE_KEY, JSON.stringify(registrationMap));
}
// Schreibt die lokal erstellten Events in den Storage.
function setStoredEvents(events) {
localStorage.setItem(EVENTS_STORAGE_KEY, JSON.stringify(events));
}
// Fuehrt JSON-Daten und lokal erstellte Events in einer Liste zusammen.
async function loadAllEvents() {
try {
const response = await fetch('data/events.json');
const apiEvents = await response.json();
return [...getStoredEvents(), ...apiEvents];
} catch (error) {
console.error('Events konnten nicht geladen werden.', error);
return getStoredEvents();
}
}
// Schaltet in den ausgeloggten Zustand und blendet geschuetzte Inhalte aus.
function renderLoggedOutState() {
loggedOutState.classList.remove('hidden');
loggedInContent.classList.add('hidden');
logoutButton.classList.add('hidden');
profileHeadline.textContent = 'Mein Profil';
profileSubline.textContent = 'Bitte logge dich ein, um deinen Bereich zu sehen.';
}
// Füllt Überschriften und Formular mit den aktuellen Benutzerdaten.
function renderLoggedInState(user) {
loggedOutState.classList.add('hidden');
loggedInContent.classList.remove('hidden');
logoutButton.classList.remove('hidden');
profileHeadline.textContent = `Hallo ${user.vorname || 'Gast'}`;
profileSubline.textContent = 'Hier kannst du deine Events und Anmeldungen verwalten.';
vornameInput.value = user.vorname || '';
nachnameInput.value = user.nachname || '';
emailInput.value = user.email || '';
}
// Bindet Submit-, Input- und Logout-Verhalten an die Profilseite.
function bindFormHandlers() {
profileForm.addEventListener('submit', handleProfileSubmit);
myRegistrationsList.addEventListener('click', handleRegistrationListClick);
myEventsList.addEventListener('click', handleHostedListClick);
profileTabButtons.forEach(button => {
button.addEventListener('click', () => {
const tabName = button.getAttribute('data-profile-tab');
if (!tabName) {
return;
}
activateProfileTab(tabName);
});
});
[vornameInput, nachnameInput, emailInput, passwortInput].forEach(input => {
input.addEventListener('input', () => {
input.parentElement.classList.remove('has-error');
profileFeedback.textContent = '';
});
});
logoutButton.addEventListener('click', () => {
const logoutModal = document.getElementById('logoutModal');
logoutModal.classList.add('show');
document.body.style.overflow = 'hidden';
});
}
// Globale Funktionen für das Logout-Modal.
window.closeLogoutModal = function() {
const logoutModal = document.getElementById('logoutModal');
logoutModal.classList.remove('show');
document.body.style.overflow = 'auto';
};
window.confirmLogout = function() {
localStorage.removeItem(CURRENT_USER_KEY);
window.location.href = 'index.html';
};
// Reagiert auf Aktionen in der Liste "Meine Events" per Event Delegation.
function handleHostedListClick(event) {
const target = event.target;
if (!(target instanceof HTMLElement)) {
return;
}
const cancelButton = target.closest('[data-cancel-event-id]');
if (cancelButton && currentUser?.email) {
const eventId = Number(cancelButton.getAttribute('data-cancel-event-id'));
if (Number.isFinite(eventId)) {
openCancelEventModal(eventId);
}
return;
}
if (target.closest('a, button')) {
return;
}
const card = target.closest('[data-event-id]');
if (!card) {
return;
}
const eventId = Number(card.getAttribute('data-event-id'));
if (!Number.isFinite(eventId)) {
return;
}
window.location.href = `event_detail.html?id=${eventId}`;
}
// Schaltet den sichtbaren Profilbereich per Tabname um.
function activateProfileTab(tabName) {
profileTabButtons.forEach(button => {
const isActive = button.getAttribute('data-profile-tab') === tabName;
button.classList.toggle('is-active', isActive);
button.setAttribute('aria-selected', isActive ? 'true' : 'false');
});
profileTabPanels.forEach(panel => {
const isActive = panel.getAttribute('data-profile-panel') === tabName;
panel.classList.toggle('hidden', !isActive);
});
}
// Reagiert auf Aktionen in der Liste "Meine Anmeldungen" per Event Delegation.
function handleRegistrationListClick(event) {
const target = event.target;
if (!(target instanceof HTMLElement)) {
return;
}
const unregisterButton = target.closest('[data-unregister-id]');
if (unregisterButton) {
if (!currentUser?.email) {
return;
}
const eventId = Number(unregisterButton.getAttribute('data-unregister-id'));
if (!Number.isFinite(eventId)) {
return;
}
unregisterFromEvent(eventId, currentUser.email);
// Snackbar: Feedback bei erfolgreicher Abmeldung.
const snackbar = document.getElementById('snackbar');
if (snackbar) {
snackbar.textContent = 'Du wurdest erfolgreich abgemeldet.';
snackbar.classList.add('snackbar--danger', 'snackbar--visible');
setTimeout(() => {
snackbar.classList.remove('snackbar--visible');
setTimeout(() => snackbar.classList.remove('snackbar--danger'), 400);
}, 3000);
}
return;
}
if (target.closest('a, button')) {
return;
}
const card = target.closest('[data-event-id]');
if (!card) {
return;
}
const eventId = Number(card.getAttribute('data-event-id'));
if (!Number.isFinite(eventId)) {
return;
}
window.location.href = `event_detail.html?id=${eventId}`;
}
// Sagt ein gehostetes Event ab (aus eigener Profilansicht entfernen).
let pendingCancelEventId = null;
function openCancelEventModal(eventId) {
pendingCancelEventId = eventId;
const modal = document.getElementById('cancelEventModal');
modal.classList.add('show');
}
window.closeCancelEventModal = function() {
pendingCancelEventId = null;
const modal = document.getElementById('cancelEventModal');
modal.classList.remove('show');
};
document.getElementById('confirmCancelEventBtn').addEventListener('click', function() {
if (pendingCancelEventId !== null && currentUser?.email) {
cancelHostedEvent(pendingCancelEventId, currentUser.email);
}
closeCancelEventModal();
});
// Schliesst das Modal bei Klick ausserhalb des Inhalts.
document.getElementById('cancelEventModal').addEventListener('click', function(e) {
if (e.target === this) {
closeCancelEventModal();
}
});
function cancelHostedEvent(eventId, userEmail) {
// Lokal erstellte, eigene Events werden direkt aus dem Storage geloescht.
const storedEvents = getStoredEvents();
const nextStoredEvents = storedEvents.filter(event => {
const isTargetEvent = Number(event.id) === eventId;
const isOwnedByUser = normalizeText(event.hostEmail || '') === normalizeText(userEmail)
|| normalizeText(event.host?.name || '') === normalizeText(currentUser?.vorname || '');
return !(isTargetEvent && isOwnedByUser);
});
setStoredEvents(nextStoredEvents);
// Event-ID für alle Benutzer aus den Anmeldungen entfernen.
const registrationMap = getRegistrationMap();
Object.keys(registrationMap).forEach(email => {
const ids = Array.isArray(registrationMap[email])
? registrationMap[email].map(id => Number(id)).filter(Number.isFinite)
: [];
registrationMap[email] = ids.filter(id => id !== eventId);
});
setRegistrationMap(registrationMap);
allEvents = allEvents.filter(event => Number(event.id) !== eventId);
renderMyEvents(allEvents, currentUser);
renderMyRegistrations(allEvents, currentUser);
profileFeedback.textContent = 'Event wurde abgesagt und aus deinem Hosting entfernt.';
}
// Entfernt eine Event-ID aus der Benutzerliste und aktualisiert die UI sofort.
function unregisterFromEvent(eventId, userEmail) {
const registrationMap = getRegistrationMap();
const currentIds = Array.isArray(registrationMap[userEmail]) ? registrationMap[userEmail] : [];
const nextIds = currentIds
.map(id => Number(id))
.filter(id => Number.isFinite(id) && id !== eventId);
registrationMap[userEmail] = nextIds;
setRegistrationMap(registrationMap);
renderMyRegistrations(allEvents, currentUser);
profileFeedback.textContent = 'Du wurdest von dem Event abgemeldet.';
}
// Validiert Profildaten konsistent und liefert true/false zur Submit-Steuerung.
function validateProfileForm() {
let isValid = true;
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
if (!vornameInput.value.trim()) {
vornameInput.parentElement.classList.add('has-error');
isValid = false;
}
if (!nachnameInput.value.trim()) {
nachnameInput.parentElement.classList.add('has-error');
isValid = false;
}
if (!emailRegex.test(emailInput.value.trim())) {
emailInput.parentElement.classList.add('has-error');
isValid = false;
}
if (passwortInput.value && passwortInput.value.length < 6) {
passwortInput.parentElement.classList.add('has-error');
isValid = false;
}
return isValid;
}
// Speichert Profiländerungen lokal und synchronisiert auch den Benutzerkatalog.
function handleProfileSubmit(event) {
event.preventDefault();
if (!validateProfileForm()) {
profileFeedback.textContent = 'Bitte prüfe die markierten Felder.';
return;
}
const previousEmail = currentUser.email;
const nextUser = {
...currentUser,
vorname: vornameInput.value.trim(),
nachname: nachnameInput.value.trim(),
email: emailInput.value.trim(),
passwort: passwortInput.value ? passwortInput.value : currentUser.passwort,
updatedAt: new Date().toISOString()
};
currentUser = nextUser;
localStorage.setItem(CURRENT_USER_KEY, JSON.stringify(nextUser));
syncUserInUserStore(previousEmail, nextUser);
// Falls sich die E-Mail geändert hat, verschieben wir bestehende Anmeldungen auf die neue E-Mail.
migrateRegistrationEmail(previousEmail, nextUser.email);
passwortInput.value = '';
profileHeadline.textContent = `Hallo ${nextUser.vorname}`;
profileFeedback.textContent = 'Profil erfolgreich gespeichert.';
}
// Synchronisiert einen Benutzer im zentralen User-Array.
function syncUserInUserStore(previousEmail, nextUser) {
let users = [];
try {
const raw = localStorage.getItem(USERS_STORAGE_KEY);
users = raw ? JSON.parse(raw) : [];
} catch (error) {
console.error('Benutzerdaten konnten nicht gelesen werden.', error);
}
const nextUsers = users.filter(user => user.email !== previousEmail && user.email !== nextUser.email);
nextUsers.unshift(nextUser);
localStorage.setItem(USERS_STORAGE_KEY, JSON.stringify(nextUsers));
}
// Migriert bestehende Registrierungen, falls die E-Mail aktualisiert wurde.
function migrateRegistrationEmail(previousEmail, nextEmail) {
if (!previousEmail || !nextEmail || previousEmail === nextEmail) {
return;
}
const map = getRegistrationMap();
const existingRegistrations = Array.isArray(map[previousEmail]) ? map[previousEmail] : [];
const alreadyPresent = Array.isArray(map[nextEmail]) ? map[nextEmail] : [];
map[nextEmail] = Array.from(new Set([...alreadyPresent, ...existingRegistrations]));
delete map[previousEmail];
localStorage.setItem(REGISTRATION_STORAGE_KEY, JSON.stringify(map));
}
// Ermittelt gehostete Events aus lokal erstellten Daten des aktuellen Benutzers.
function getMyHostedEvents(events, user) {
const userFirstName = normalizeText(user.vorname || '');
const userEmail = normalizeText(user.email || '');
return events.filter(event => {
if (event.source !== 'local') {
return false;
}
const hostEmail = normalizeText(event.hostEmail || '');
const hostName = normalizeText(event.host?.name || '');
if (hostEmail && hostEmail === userEmail) {
return true;
}
return userFirstName && hostName === userFirstName;
});
}
// Ermittelt angemeldete Events über die Registration-Map.
function getMyRegisteredEvents(events, user) {
const registrationMap = getRegistrationMap();
const registeredIds = Array.isArray(registrationMap[user.email]) ? registrationMap[user.email] : [];
const idSet = new Set(registeredIds.map(id => Number(id)));
return events.filter(event => idSet.has(Number(event.id)));
}
// Rendert gehostete Events inkl. Zähler.
function renderMyEvents(events, user) {
const hostedEvents = getMyHostedEvents(events, user);
myEventsCount.textContent = String(hostedEvents.length);
renderEventCards(myEventsList, hostedEvents, {
title: 'Noch kein eigenes Event',
text: 'Starte dein erstes Dinner und lade die Community an deinen Tisch ein.',
buttonLabel: 'Event erstellen',
href: 'event_create.html'
}, 'hosting');
}
// Rendert angemeldete Events inkl. Zähler.
function renderMyRegistrations(events, user) {
const registeredEvents = getMyRegisteredEvents(events, user);
myRegistrationsCount.textContent = String(registeredEvents.length);
renderEventCards(myRegistrationsList, registeredEvents, {
title: 'Noch keine Anmeldungen',
text: 'Entdecke spannende Dinner in deiner Naehe und melde dich direkt an.',
buttonLabel: 'Events entdecken',
href: 'event_overview.html'
}, 'registrations');
}
// Baut die Eventkarten für beide Listen in einheitlichem Markup.
function renderEventCards(container, events, emptyStateConfig, mode) {
container.innerHTML = '';
if (events.length === 0) {
const emptyElement = document.createElement('div');
emptyElement.className = 'profile-empty-state';
emptyElement.innerHTML = `
<p class="profile-empty-kicker">Keine Treffer</p>
<h3>${emptyStateConfig.title}</h3>
<p>${emptyStateConfig.text}</p>
<a class="button-primary" href="${emptyStateConfig.href}">${emptyStateConfig.buttonLabel}</a>
`;
container.appendChild(emptyElement);
return;
}
events.forEach(event => {
const card = document.createElement('article');
card.className = 'profile-event-card profile-event-card-clickable';
card.setAttribute('data-event-id', String(event.id));
const addressMarkup = mode === 'registrations' && event.address && isAddressVisibleWindow(event)
? `
<div class="profile-event-address-block" aria-label="Event Adresse">
<p class="profile-event-address-label">Adresse</p>
<p class="profile-event-address">${event.address}</p>
</div>
`
: '';
const actionMarkup = mode === 'registrations'
? `
<div class="profile-event-actions">
<button class="profile-unregister-btn" type="button" data-unregister-id="${event.id}">Abmelden</button>
</div>
`
: `
<div class="profile-event-actions">
<button class="profile-cancel-btn" type="button" data-cancel-event-id="${event.id}">Event absagen</button>
</div>
`;
card.innerHTML = `
<div>
<h3 class="profile-event-title">${event.title}</h3>
<p class="profile-event-meta">${event.location} | ${formatEventDate(event.date)} | ${formatEventTime(event.time)}</p>
${addressMarkup}
</div>
${actionMarkup}
`;
container.appendChild(card);
});
}
// Gibt true zurück, wenn ein Event innerhalb der nächsten 12 Stunden startet.
function isAddressVisibleWindow(event) {
const eventDateTime = parseEventDateTime(event);
if (!eventDateTime || Number.isNaN(eventDateTime.getTime())) {
return false;
}
const msUntilStart = eventDateTime.getTime() - Date.now();
const twelveHoursInMs = 12 * 60 * 60 * 1000;
return msUntilStart >= 0 && msUntilStart <= twelveHoursInMs;
}
// Parse für ISO- und lokalisierte Datumsformate aus den Eventdaten.
function parseEventDateTime(event) {
if (!event?.date) {
return null;
}
const dateValue = String(event.date).trim();
const isoDateMatch = dateValue.match(/^(\d{4})-(\d{2})-(\d{2})$/);
let year;
let month;
let day;
if (isoDateMatch) {
year = Number(isoDateMatch[1]);
month = Number(isoDateMatch[2]);
day = Number(isoDateMatch[3]);
} else {
const monthMap = {
JAN: 1,
FEB: 2,
'MÄR': 3,
MRZ: 3,
APR: 4,
MAI: 5,
JUN: 6,
JUL: 7,
AUG: 8,
SEP: 9,
OKT: 10,
NOV: 11,
DEZ: 12
};
const localizedMatch = dateValue.match(/^(\d{1,2})\.\s*([A-ZÄÖÜ]{3})\.\s*(\d{4})$/);
if (!localizedMatch) {
return null;
}
day = Number(localizedMatch[1]);
month = monthMap[localizedMatch[2]];
year = Number(localizedMatch[3]);
if (!month) {
return null;
}
}
const timeMatch = String(event.time || '').match(/(\d{1,2}):(\d{2})/);
const hours = timeMatch ? Number(timeMatch[1]) : 0;
const minutes = timeMatch ? Number(timeMatch[2]) : 0;
return new Date(year, month - 1, day, hours, minutes, 0, 0);
}
// Formatiert ein Eventdatum konsistent für die Profilkarten.
function formatEventDate(dateString) {
if (!dateString) {
return 'Kein Datum';
}
if (/^\d{4}-\d{2}-\d{2}$/.test(dateString)) {
const [year, month, day] = dateString.split('-');
const monthLabel = ['Januar', 'Februar', 'Maerz', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'][Number(month) - 1];
return `${Number(day)}. ${monthLabel} ${year}`;
}
return dateString;
}
// Vereinheitlicht die Zeitanzeige für die Profilseite.
function formatEventTime(timeString) {
if (!timeString) {
return 'Keine Uhrzeit';
}
return timeString.includes('UHR') ? timeString.replace('UHR', 'Uhr').trim() : timeString;
}
// Normalisiert Vergleichswerte für robuste String-Matches.
function normalizeText(value) {
return String(value || '').trim().toLowerCase();
}
});
+106
View File
@@ -0,0 +1,106 @@
// =============================================
// Dynamische Navigation
// Je nach Login-Status wird die Kopfzeile für
// alle Seiten mit passendem Markup aufgebaut.
// =============================================
document.addEventListener('DOMContentLoaded', () => {
const CURRENT_USER_KEY = 'socialCookingCurrentUser';
const navContainers = document.querySelectorAll('.nav-tab-links');
const currentPage = (window.location.pathname.split('/').pop() || 'index.html').toLowerCase();
// Beendet früh, falls auf einer Seite keine Hauptnavigation vorhanden ist.
if (!navContainers.length) {
return;
}
// Liest den aktiven Benutzer robust aus localStorage.
function getCurrentUser() {
try {
const stored = localStorage.getItem(CURRENT_USER_KEY);
return stored ? JSON.parse(stored) : null;
} catch (error) {
console.error('Aktueller Benutzer konnte nicht gelesen werden.', error);
return null;
}
}
// Baut die Navigation für ausgeloggte Besucher.
function buildLoggedOutNavigation() {
const loginIsActive = currentPage === 'login.html';
const signupIsActive = currentPage === 'signup.html';
const isIndex = currentPage === 'index.html' || currentPage === '';
// Auf der Startseite, Login und Signup nur Login anzeigen.
if (isIndex || loginIsActive || signupIsActive) {
return `
<a
class="button-small"
href="login.html"
aria-label="Login"
>
Login
</a>
`;
}
return `
<a
class="button-small auth-nav-button ${loginIsActive ? 'auth-nav-button--active' : 'auth-nav-button--default'}"
href="login.html"
aria-label="Login"
${loginIsActive ? 'aria-current="page"' : ''}
>
Login
</a>
<a
class="button-small auth-nav-button ${signupIsActive ? 'auth-nav-button--active' : 'auth-nav-button--default'}"
href="signup.html"
aria-label="Signup"
${signupIsActive ? 'aria-current="page"' : ''}
>
Signup
</a>
`;
}
// Baut die Navigation für eingeloggte Benutzer.
function buildLoggedInNavigation(user) {
const initial = (user.vorname || 'U').charAt(0).toUpperCase();
const isEventOverview = currentPage === 'event_overview.html';
const isEventCreate = currentPage === 'event_create.html';
return `
<a
class="nav-tab${isEventOverview ? ' nav-tab--active' : ''}"
href="event_overview.html"
${isEventOverview ? 'aria-current="page"' : ''}
>
Event finden
</a>
<a
class="nav-tab${isEventCreate ? ' nav-tab--active' : ''}"
href="event_create.html"
${isEventCreate ? 'aria-current="page"' : ''}
>
Event erstellen
</a>
<a
class="profile-pill"
href="my_profil.html"
aria-label="Mein Profil"
title="${user.vorname || 'Profil'}"
>
${initial}
</a>
`;
}
const currentUser = getCurrentUser();
const nextMarkup = currentUser ? buildLoggedInNavigation(currentUser) : buildLoggedOutNavigation();
// Wendet das passende Markup auf alle vorhandenen Kopf-Navigationen an.
navContainers.forEach(container => {
container.innerHTML = nextMarkup;
});
});
+183
View File
@@ -0,0 +1,183 @@
// =============================================
// Signup-Logik
// Diese Datei validiert das Formular, speichert
// neue Benutzer lokal und startet direkt die Session.
// =============================================
// Formular und Felder aus dem HTML holen.
const signupForm = document.getElementById('signupForm');
const vornameInput = document.getElementById('vorname');
const nachnameInput = document.getElementById('nachname');
const emailInput = document.getElementById('email');
const passwortInput = document.getElementById('passwort');
const welcomeModal = document.getElementById('welcomeModal');
const USERS_STORAGE_KEY = 'socialCookingUsers';
const CURRENT_USER_KEY = 'socialCookingCurrentUser';
// Liest bestehende Benutzerliste robust aus localStorage.
function getStoredUsers() {
try {
const raw = localStorage.getItem(USERS_STORAGE_KEY);
return raw ? JSON.parse(raw) : [];
} catch (error) {
console.error('Benutzerdaten konnten nicht gelesen werden.', error);
return [];
}
}
// Schreibt die komplette Benutzerliste in localStorage.
function setStoredUsers(users) {
localStorage.setItem(USERS_STORAGE_KEY, JSON.stringify(users));
}
// Speichert den aktiven Benutzer für nachfolgende Seiten.
function setCurrentUser(user) {
localStorage.setItem(CURRENT_USER_KEY, JSON.stringify(user));
}
// Funktion zum Öffnen des Welcome Modals
function openWelcomeModal() {
welcomeModal.classList.add('show');
document.body.style.overflow = 'hidden';
}
// Funktion zum Schliessen des Welcome Modals
function closeWelcomeModal() {
welcomeModal.classList.remove('show');
document.body.style.overflow = 'auto';
window.location.href = 'event_overview.html';
}
// Hauptfunktion für Formularvalidierung und Speicherung.
function validateForm(event) {
event.preventDefault();
let isValid = true;
// Vorname-Validierung
const vornameValue = vornameInput.value.trim();
const vornameGroup = vornameInput.parentElement;
if (!vornameValue) {
vornameGroup.classList.add('has-error');
isValid = false;
} else {
vornameGroup.classList.remove('has-error');
}
// Nachname-Validierung
const nachnameValue = nachnameInput.value.trim();
const nachnameGroup = nachnameInput.parentElement;
if (!nachnameValue) {
nachnameGroup.classList.add('has-error');
isValid = false;
} else {
nachnameGroup.classList.remove('has-error');
}
// Email-Validierung
const emailValue = emailInput.value.trim();
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
const emailGroup = emailInput.parentElement;
if (!emailValue) {
emailGroup.classList.add('has-error');
document.getElementById('emailError').textContent = 'Bitte gib deine E-Mail Adresse ein.';
isValid = false;
} else if (!emailRegex.test(emailValue)) {
emailGroup.classList.add('has-error');
document.getElementById('emailError').textContent = 'Bitte gib eine gültige E-Mail Adresse ein.';
isValid = false;
} else {
emailGroup.classList.remove('has-error');
}
// Passwort-Validierung
const passwortValue = passwortInput.value;
const passwortGroup = passwortInput.parentElement;
if (!passwortValue) {
passwortGroup.classList.add('has-error');
document.getElementById('passwortError').textContent = 'Bitte gib ein Passwort ein.';
isValid = false;
} else if (passwortValue.length < 8) {
passwortGroup.classList.add('has-error');
document.getElementById('passwortError').textContent = 'Dein Passwort muss mindestens 8 Zeichen lang sein.';
isValid = false;
} else {
passwortGroup.classList.remove('has-error');
}
// Wenn alles gültig ist:
// 1) auf doppelte E-Mail prüfen
// 2) neuen Benutzer speichern
// 3) als aktuellen Benutzer einloggen
if (isValid) {
const existingUsers = getStoredUsers();
const emailLower = emailValue.toLowerCase();
const emailAlreadyUsed = existingUsers.some(user => user.email?.toLowerCase() === emailLower);
if (emailAlreadyUsed) {
emailGroup.classList.add('has-error');
document.getElementById('emailError').textContent = 'Diese E-Mail ist bereits registriert. Bitte nutze den Login.';
return;
}
const newUser = {
id: Date.now(),
vorname: vornameValue,
nachname: nachnameValue,
email: emailValue,
passwort: passwortValue,
createdAt: new Date().toISOString(),
source: 'signup'
};
setStoredUsers([newUser, ...existingUsers]);
setCurrentUser(newUser);
openWelcomeModal();
// Weiterleitung erfolgt beim Klick auf "Weiter zu den Events".
}
}
// Fehlerbehandlung bei Input-Änderung (entfernt Fehler wenn Benutzer korrigiert)
vornameInput.addEventListener('input', function() {
const vornameGroup = this.parentElement;
if (this.value.trim()) {
vornameGroup.classList.remove('has-error');
}
});
nachnameInput.addEventListener('input', function() {
const nachnameGroup = this.parentElement;
if (this.value.trim()) {
nachnameGroup.classList.remove('has-error');
}
});
emailInput.addEventListener('input', function() {
const emailGroup = this.parentElement;
if (this.value.trim()) {
emailGroup.classList.remove('has-error');
}
});
passwortInput.addEventListener('input', function() {
const passwortGroup = this.parentElement;
if (this.value) {
passwortGroup.classList.remove('has-error');
}
});
// Modal schliessen wenn ausserhalb geklickt wird
welcomeModal.addEventListener('click', function(event) {
if (event.target === welcomeModal) {
closeWelcomeModal();
}
});
// Form Submit Event
signupForm.addEventListener('submit', validateForm);
-573
View File
@@ -1,573 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Kontaktseite - Invité</title>
<link rel="stylesheet" href="stylesheet.css">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: Arial, sans-serif;
background-color: #f5f5f5;
display: flex;
flex-direction: column;
min-height: 100vh;
padding: 0;
margin: 0;
}
/* Header Styles */
.header {
background-color: white;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
padding: 15px 30px;
display: flex;
justify-content: space-between;
align-items: center;
}
.header-logo {
font-size: 24px;
font-weight: bold;
color: #0084ff;
text-decoration: none;
letter-spacing: 1px;
}
.header-buttons {
display: flex;
gap: 15px;
align-items: center;
}
.header-btn {
padding: 10px 20px;
border: none;
border-radius: 4px;
font-size: 14px;
font-weight: bold;
cursor: pointer;
transition: all 0.3s ease;
text-decoration: none;
display: inline-block;
}
.header-btn-secondary {
background-color: transparent;
color: #0084ff;
border: 2px solid #0084ff;
}
.header-btn-secondary:hover {
background-color: #0084ff;
color: white;
}
.header-btn-primary {
background-color: #0084ff;
color: white;
}
.header-btn-primary:hover {
background-color: #0073e6;
}
/* Main content wrapper */
.main-content {
display: flex;
justify-content: center;
align-items: center;
flex: 1;
padding: 20px;
}
.container {
background-color: white;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
max-width: 1000px;
width: 100%;
display: flex;
gap: 20px;
overflow: hidden;
}
.image-section {
flex: 1;
background-color: #e8f4f8;
display: flex;
align-items: center;
justify-content: center;
min-height: 500px;
}
.image-section img {
width: 100%;
height: 100%;
object-fit: cover;
}
.form-section {
flex: 1;
padding: 40px;
display: flex;
flex-direction: column;
justify-content: center;
}
@media (max-width: 768px) {
.container {
flex-direction: column;
}
.image-section {
min-height: 300px;
}
.header {
flex-direction: column;
gap: 15px;
}
.header-buttons {
width: 100%;
flex-direction: column;
}
.header-btn {
width: 100%;
text-align: center;
}
}
h1 {
color: #333;
margin-bottom: 10px;
text-align: center;
}
.info-box {
background-color: #e8f4f8;
border-left: 4px solid #0084ff;
padding: 15px;
margin-bottom: 30px;
border-radius: 4px;
font-size: 14px;
color: #333;
line-height: 1.5;
}
.form-group {
margin-bottom: 20px;
}
label {
display: block;
margin-bottom: 6px;
color: #333;
font-weight: bold;
font-size: 14px;
}
input[type="text"],
input[type="email"],
input[type="password"] {
width: 100%;
padding: 12px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 14px;
transition: border-color 0.3s ease;
font-family: Arial, sans-serif;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
outline: none;
border-color: #0084ff;
box-shadow: 0 0 5px rgba(0, 132, 255, 0.3);
}
button {
width: 100%;
padding: 12px;
background-color: #0084ff;
color: white;
border: none;
border-radius: 4px;
font-size: 16px;
font-weight: bold;
cursor: pointer;
transition: background-color 0.3s ease;
}
button:hover {
background-color: #0073e6;
}
button:active {
background-color: #0063cc;
}
.login-hint {
text-align: center;
margin-top: 20px;
color: #666;
font-size: 14px;
}
.login-hint a {
color: #0084ff;
text-decoration: none;
font-weight: bold;
transition: color 0.3s ease;
}
.login-hint a:hover {
color: #0073e6;
text-decoration: underline;
}
.error-message {
color: #d32f2f;
font-size: 13px;
margin-top: 5px;
display: none;
}
.form-group.has-error input {
border-color: #d32f2f;
box-shadow: 0 0 5px rgba(211, 47, 47, 0.3);
}
.form-group.has-error .error-message {
display: block;
}
/* Modal Styles */
.modal {
display: none;
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.4);
animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.modal.show {
display: flex;
justify-content: center;
align-items: center;
}
.modal-content {
background-color: white;
padding: 40px;
border-radius: 8px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
max-width: 500px;
width: 90%;
text-align: center;
animation: slideIn 0.3s ease;
}
@keyframes slideIn {
from {
transform: translateY(-50px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
.modal-header {
position: relative;
margin-bottom: 20px;
}
.modal-header h2 {
color: #0084ff;
font-size: 24px;
margin-bottom: 10px;
}
.close-btn {
position: absolute;
right: 0;
top: 0;
font-size: 28px;
font-weight: bold;
color: #999;
background: none;
border: none;
cursor: pointer;
padding: 0;
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
transition: color 0.3s ease;
}
.close-btn:hover {
color: #333;
}
.modal-body {
color: #333;
font-size: 16px;
line-height: 1.6;
margin-bottom: 30px;
}
.modal-footer {
display: flex;
gap: 10px;
justify-content: center;
}
.modal-footer button {
padding: 10px 30px;
font-size: 14px;
border: none;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.modal-footer .btn-primary {
background-color: #0084ff;
color: white;
}
.modal-footer .btn-primary:hover {
background-color: #0073e6;
}
</style>
</head>
<body>
<!-- Header -->
<header class="header">
<div class="header-logo">Invité</div>
<div class="header-buttons">
<button class="header-btn header-btn-secondary">Event finden</button>
<a href="login.html" class="header-btn header-btn-primary">Login</a>
</div>
</header>
<!-- Main Content -->
<div class="main-content">
<div class="container">
<div class="image-section">
<img src="cooking.jpg" alt="Social Cooking">
</div>
<div class="form-section">
<h1>Erstelle deinen Account</h1>
<div class="info-box">
<strong>Hinweis:</strong> Sichtbar auf der Plattform ist nur der Vorname, erst einer Anmeldung zum Event ist der Nachname für die Teilnehmenden sichtbar.
</div>
<form id="signupForm">
<div class="form-group">
<label for="vorname">Vorname *</label>
<input type="text" id="vorname" name="vorname" required placeholder="Dein Vorname">
<div class="error-message" id="vornameError">Bitte gib deinen Vornamen ein.</div>
</div>
<div class="form-group">
<label for="nachname">Nachname *</label>
<input type="text" id="nachname" name="nachname" required placeholder="Dein Nachname">
<div class="error-message" id="nachnameError">Bitte gib deinen Nachnamen ein.</div>
</div>
<div class="form-group">
<label for="email">E-Mail Adresse *</label>
<input type="email" id="email" name="email" required placeholder="deine.email@example.com">
<div class="error-message" id="emailError">Bitte gib eine gültige E-Mail Adresse ein.</div>
</div>
<div class="form-group">
<label for="passwort">Passwort *</label>
<input type="password" id="passwort" name="passwort" required placeholder="Mindestens 8 Zeichen">
<div class="error-message" id="passwortError">Dein Passwort muss mindestens 8 Zeichen lang sein.</div>
</div>
<button type="submit">Konto erstellen</button>
<div class="login-hint">
Du hast bereits einen Account? <a href="login.html">Hier geht's zum Log-in</a>
</div>
</form>
</div>
</div>
</div> <!-- Schließt main-content -->
<!-- Welcome Modal -->
<div id="welcomeModal" class="modal">
<div class="modal-content">
<div class="modal-header">
<button class="close-btn" onclick="closeWelcomeModal()">&times;</button>
<h2>🎉 Willkommen bei Invité!</h2>
</div>
<div class="modal-body">
Hier findest du die Übersicht zu den aktuellsten Events.
</div>
<div class="modal-footer">
<button class="btn-primary" onclick="closeWelcomeModal()">Weiter zu den Events</button>
</div>
</div>
</div>
<script>
const signupForm = document.getElementById('signupForm');
const vornameInput = document.getElementById('vorname');
const nachnameInput = document.getElementById('nachname');
const emailInput = document.getElementById('email');
const passwortInput = document.getElementById('passwort');
const welcomeModal = document.getElementById('welcomeModal');
// Funktion zum Öffnen des Welcome Modals
function openWelcomeModal() {
welcomeModal.classList.add('show');
document.body.style.overflow = 'hidden';
}
// Funktion zum Schließen des Welcome Modals
function closeWelcomeModal() {
welcomeModal.classList.remove('show');
document.body.style.overflow = 'auto';
}
// Validierungsfunktion
function validateForm(event) {
event.preventDefault();
let isValid = true;
// Vorname-Validierung
const vornameValue = vornameInput.value.trim();
const vornameGroup = vornameInput.parentElement;
if (!vornameValue) {
vornameGroup.classList.add('has-error');
isValid = false;
} else {
vornameGroup.classList.remove('has-error');
}
// Nachname-Validierung
const nachnameValue = nachnameInput.value.trim();
const nachnameGroup = nachnameInput.parentElement;
if (!nachnameValue) {
nachnameGroup.classList.add('has-error');
isValid = false;
} else {
nachnameGroup.classList.remove('has-error');
}
// Email-Validierung
const emailValue = emailInput.value.trim();
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
const emailGroup = emailInput.parentElement;
if (!emailValue) {
emailGroup.classList.add('has-error');
document.getElementById('emailError').textContent = 'Bitte gib deine E-Mail Adresse ein.';
isValid = false;
} else if (!emailRegex.test(emailValue)) {
emailGroup.classList.add('has-error');
document.getElementById('emailError').textContent = 'Bitte gib eine gültige E-Mail Adresse ein.';
isValid = false;
} else {
emailGroup.classList.remove('has-error');
}
// Passwort-Validierung
const passwortValue = passwortInput.value;
const passwortGroup = passwortInput.parentElement;
if (!passwortValue) {
passwortGroup.classList.add('has-error');
document.getElementById('passwortError').textContent = 'Bitte gib ein Passwort ein.';
isValid = false;
} else if (passwortValue.length < 8) {
passwortGroup.classList.add('has-error');
document.getElementById('passwortError').textContent = 'Dein Passwort muss mindestens 8 Zeichen lang sein.';
isValid = false;
} else {
passwortGroup.classList.remove('has-error');
}
// Wenn alle Validierungen bestanden, Modal anzeigen
if (isValid) {
openWelcomeModal();
// Hier würde später die Registrierung zum Backend gesendet
}
}
// Fehlerbehandlung bei Input-Änderung (entfernt Fehler wenn Benutzer korrigiert)
vornameInput.addEventListener('input', function() {
const vornameGroup = this.parentElement;
if (this.value.trim()) {
vornameGroup.classList.remove('has-error');
}
});
nachnameInput.addEventListener('input', function() {
const nachnameGroup = this.parentElement;
if (this.value.trim()) {
nachnameGroup.classList.remove('has-error');
}
});
emailInput.addEventListener('input', function() {
const emailGroup = this.parentElement;
if (this.value.trim()) {
emailGroup.classList.remove('has-error');
}
});
passwortInput.addEventListener('input', function() {
const passwortGroup = this.parentElement;
if (this.value) {
passwortGroup.classList.remove('has-error');
}
});
// Modal schließen wenn außerhalb geklickt wird
welcomeModal.addEventListener('click', function(event) {
if (event.target === welcomeModal) {
closeWelcomeModal();
}
});
// Form Submit Event
signupForm.addEventListener('submit', validateForm);
</script>
</body>
</html>
+37 -322
View File
@@ -3,356 +3,71 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login - Social Cooking</title> <title>Invité | Login</title>
<link rel="stylesheet" href="stylesheet.css">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body { <!-- Globales Stylesheet -->
font-family: Arial, sans-serif; <link rel="stylesheet" href="css/stylesheet_global.css">
background-color: #f5f5f5; <!-- Stylesheet für diese Seite -->
display: flex; <link rel="stylesheet" href="css/login_signup.css">
flex-direction: column; <script src="js/navigation.js" defer></script>
min-height: 100vh;
padding: 0;
margin: 0;
}
/* Header Styles */
.header {
background-color: white;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
padding: 15px 30px;
display: flex;
justify-content: space-between;
align-items: center;
}
.header-logo {
font-size: 24px;
font-weight: bold;
color: #0084ff;
text-decoration: none;
letter-spacing: 1px;
}
.header-buttons {
display: flex;
gap: 15px;
align-items: center;
}
.header-btn {
padding: 10px 20px;
border: none;
border-radius: 4px;
font-size: 14px;
font-weight: bold;
cursor: pointer;
transition: all 0.3s ease;
text-decoration: none;
display: inline-block;
}
.header-btn-secondary {
background-color: transparent;
color: #0084ff;
border: 2px solid #0084ff;
}
.header-btn-secondary:hover {
background-color: #0084ff;
color: white;
}
.header-btn-primary {
background-color: #0084ff;
color: white;
}
.header-btn-primary:hover {
background-color: #0073e6;
}
/* Main content wrapper */
.main-content {
display: flex;
justify-content: center;
align-items: center;
flex: 1;
padding: 20px;
}
.container {
background-color: white;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
max-width: 1000px;
width: 100%;
display: flex;
gap: 20px;
overflow: hidden;
}
.image-section {
flex: 1;
background-color: #e8f4f8;
display: flex;
align-items: center;
justify-content: center;
min-height: 500px;
}
.image-section img {
width: 100%;
height: 100%;
object-fit: cover;
}
.form-section {
flex: 1;
padding: 40px;
display: flex;
flex-direction: column;
justify-content: center;
}
@media (max-width: 768px) {
.container {
flex-direction: column;
}
.image-section {
min-height: 300px;
}
.header {
flex-direction: column;
gap: 15px;
}
.header-buttons {
width: 100%;
flex-direction: column;
}
.header-btn {
width: 100%;
text-align: center;
}
}
h1 {
color: #333;
margin-bottom: 30px;
text-align: center;
}
.form-group {
margin-bottom: 20px;
}
label {
display: block;
margin-bottom: 6px;
color: #333;
font-weight: bold;
font-size: 14px;
}
input[type="email"],
input[type="password"] {
width: 100%;
padding: 12px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 14px;
transition: border-color 0.3s ease;
font-family: Arial, sans-serif;
}
input[type="email"]:focus,
input[type="password"]:focus {
outline: none;
border-color: #0084ff;
box-shadow: 0 0 5px rgba(0, 132, 255, 0.3);
}
button {
width: 100%;
padding: 12px;
background-color: #0084ff;
color: white;
border: none;
border-radius: 4px;
font-size: 16px;
font-weight: bold;
cursor: pointer;
transition: background-color 0.3s ease;
margin-top: 10px;
}
button:hover {
background-color: #0073e6;
}
button:active {
background-color: #0063cc;
}
.signup-hint {
text-align: center;
margin-top: 20px;
color: #666;
font-size: 14px;
}
.signup-hint a {
color: #0084ff;
text-decoration: none;
font-weight: bold;
transition: color 0.3s ease;
}
.signup-hint a:hover {
color: #0073e6;
text-decoration: underline;
}
.error-message {
color: #d32f2f;
font-size: 13px;
margin-top: 5px;
display: none;
}
.form-group.has-error input {
border-color: #d32f2f;
box-shadow: 0 0 5px rgba(211, 47, 47, 0.3);
}
.form-group.has-error .error-message {
display: block;
}
</style>
</head> </head>
<body> <body>
<!-- Header --> <!-- Top Navigation mit Seitenlinks -->
<header class="header"> <header class="top-nav-wrap">
<div class="header-logo">Invité</div> <div class="top-nav">
<div class="header-buttons"> <a class="brand" href="index.html" aria-label="Zur Startseite">
<button class="header-btn header-btn-secondary">Event finden</button> <img src="assets/logo_invite.svg" alt="Invité">
<a href="kontakt.html" class="header-btn header-btn-primary">Anmeldung</a> </a>
</div> <nav class="nav-tab-links" aria-label="Hauptnavigation">
</header> <a class="button-small" href="login.html" aria-label="Login">Login</a>
</nav>
</div>
</header>
<!-- Main Content --> <!-- Main Content -->
<div class="main-content"> <div class="main-content">
<div class="container"> <div class="container">
<div class="image-section"> <div class="image-section">
<img src="cooking.jpg" alt="Social Cooking"> <img src="assets/index_cooking.jpg" alt="Social Cooking">
</div> </div>
<div class="form-section"> <div class="form-section">
<h1>Willkommen zurück</h1> <h1>Login</h1>
<form id="loginForm"> <form id="loginForm">
<div class="form-group"> <div class="form-group">
<label for="email">Deine E-Mail Adresse *</label> <label for="email">E-Mail</label>
<input type="email" id="email" name="email" required placeholder="deine.email@example.com"> <input type="email" id="email" name="email" required placeholder="deine.email@example.com">
<div class="error-message" id="emailError">Bitte gib eine gültige E-Mail Adresse ein.</div> <div class="error-message" id="emailError">Bitte gib eine gültige E-Mail Adresse ein.</div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="passwort">Dein Passwort *</label> <label for="passwort">Passwort</label>
<input type="password" id="passwort" name="passwort" required placeholder="Gib dein Passwort ein"> <input type="password" id="passwort" name="passwort" required placeholder="Gib dein Passwort ein">
<div class="error-message" id="passwortError">Bitte gib dein Passwort ein.</div> <div class="error-message" id="passwortError">Bitte gib dein Passwort ein.</div>
</div> </div>
<button type="submit">Login</button> <button type="submit" class="button-primary">Login</button>
<div class="signup-hint"> <div class="link-text">
Du hast noch keinen Account? <a href="kontakt.html">Hier geht es zur Anmeldung</a> Du hast noch keinen Account? <a href="signup.html">Hier geht es zur Anmeldung.</a>
</div> </div>
</form> </form>
</div> </div>
</div> </div>
</div> <!-- Schließt main-content --> </div> <!-- Schliesst main-content -->
<div class="snackbar" id="snackbar">Willkommen zurück! Du wirst weitergeleitet...</div>
<script> <script src="js/login.js"></script>
const loginForm = document.getElementById('loginForm'); <div class="instagram-invite">
const emailInput = document.getElementById('email'); <a href="https://www.instagram.com" target="_blank" rel="noopener noreferrer" class="instagram-invite__link">
const passwortInput = document.getElementById('passwort'); <img src="assets/Icon_instagram.png" alt="Instagram" class="instagram-invite__icon" />
const emailError = document.getElementById('emailError'); <img src="assets/logo_invite.svg" alt="Invité Logo" class="instagram-invite__logo" />
const passwortError = document.getElementById('passwortError'); </a>
</div>
// Validierungsfunktion <footer class="footer">
function validateForm(event) { <a href="impressum.html" class="footer-link">Impressum</a>
event.preventDefault(); <a href="datenschutz.html" class="footer-link">Datenschutz</a>
</footer>
let isValid = true;
// Email-Validierung
const emailValue = emailInput.value.trim();
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
const emailGroup = emailInput.parentElement;
if (!emailValue) {
emailGroup.classList.add('has-error');
emailError.textContent = 'Bitte gib deine E-Mail Adresse ein.';
isValid = false;
} else if (!emailRegex.test(emailValue)) {
emailGroup.classList.add('has-error');
emailError.textContent = 'Bitte gib eine gültige E-Mail Adresse ein.';
isValid = false;
} else {
emailGroup.classList.remove('has-error');
}
// Passwort-Validierung
const passwortValue = passwortInput.value;
const passwortGroup = passwortInput.parentElement;
if (!passwortValue) {
passwortGroup.classList.add('has-error');
passwortError.textContent = 'Bitte gib dein Passwort ein.';
isValid = false;
} else if (passwortValue.length < 6) {
passwortGroup.classList.add('has-error');
passwortError.textContent = 'Dein Passwort ist zu kurz. Bitte überprüfe dein Passwort.';
isValid = false;
} else {
passwortGroup.classList.remove('has-error');
}
// Wenn alle Validierungen bestanden, Form absenden (hier kannst du später Backend Integration vornehmen)
if (isValid) {
alert('Login erfolgreich! (Dies ist eine Demo)');
// Hier würde später die Anmeldung zum Backend gesendet
}
}
// Fehlerbehandlung bei Input-Änderung (entfernt Fehler wenn Benutzer korrigiert)
emailInput.addEventListener('input', function() {
const emailGroup = this.parentElement;
if (this.value.trim()) {
emailGroup.classList.remove('has-error');
}
});
passwortInput.addEventListener('input', function() {
const passwortGroup = this.parentElement;
if (this.value) {
passwortGroup.classList.remove('has-error');
}
});
// Form Submit Event
loginForm.addEventListener('submit', validateForm);
</script>
</body> </body>
</html> </html>
+156
View File
@@ -0,0 +1,156 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mein Profil | Invité</title>
<!-- Stylesheet für diese Seite -->
<link rel="stylesheet" href="css/my_profil.css">
<!-- Globales Stylesheet -->
<link rel="stylesheet" href="css/stylesheet_global.css">
<script src="js/navigation.js" defer></script>
</head>
<body>
<header class="top-nav-wrap">
<div class="top-nav">
<a class="brand" href="index.html" aria-label="Zur Startseite">
<img src="assets/logo_invite.svg" alt="Invite Logo">
</a>
<nav class="nav-tab-links" aria-label="Hauptnavigation">
<a class="button-small" href="login.html" aria-label="Login">Login</a>
</nav>
</div>
</header>
<main class="container profile-page">
<section class="profile-hero" aria-label="Profilübersicht">
<div>
<p class="profile-kicker">Mein Bereich</p>
<h1 id="profile-headline">Mein Profil</h1>
<p id="profile-subline" class="profile-subline">Hier findest du deine Events, deine Anmeldungen und kannst deine Profildaten verwalten.</p>
</div>
<button id="logout-button" class="button-small profile-logout" type="button">Logout</button>
</section>
<section id="logged-out-state" class="profile-panel hidden" aria-live="polite">
<h2 class="panel-title">Du bist noch nicht eingeloggt</h2>
<p>Melde dich an, damit wir deine Events und Anmeldungen anzeigen können.</p>
<div class="profile-cta-row">
<a class="button-primary" href="login.html">Zum Login</a>
<a class="button-primary profile-button-secondary" href="signup.html">Konto erstellen</a>
</div>
</section>
<section id="logged-in-content" class="profile-grid">
<nav class="profile-tabs" aria-label="Profilbereiche">
<button type="button" class="profile-tab is-active" data-profile-tab="hosting">Hosting</button>
<button type="button" class="profile-tab" data-profile-tab="teilnehmen">Teilnehmen</button>
<button type="button" class="profile-tab" data-profile-tab="einstellungen">Einstellungen</button>
</nav>
<article class="profile-panel" data-profile-panel="hosting">
<div class="panel-head">
<h2 class="panel-title">Meine Events</h2>
<span id="my-events-count" class="panel-count">0</span>
</div>
<div id="my-events-list" class="profile-card-list"></div>
</article>
<article class="profile-panel hidden" data-profile-panel="teilnehmen">
<div class="panel-head">
<h2 class="panel-title">Meine Anmeldungen</h2>
<span id="my-registrations-count" class="panel-count">0</span>
</div>
<div id="my-registrations-list" class="profile-card-list"></div>
</article>
<article class="profile-panel profile-panel-form hidden" data-profile-panel="einstellungen">
<h2 class="panel-title">Profil verwalten</h2>
<form id="profile-form" novalidate>
<div class="form-grid">
<div class="form-group">
<label for="vorname">Vorname</label>
<input type="text" id="vorname" name="vorname" required>
<p class="input-error" id="vorname-error">Bitte gib deinen Vornamen ein.</p>
</div>
<div class="form-group">
<label for="nachname">Nachname</label>
<input type="text" id="nachname" name="nachname" required>
<p class="input-error" id="nachname-error">Bitte gib deinen Nachnamen ein.</p>
</div>
</div>
<div class="form-group">
<label for="email">E-Mail</label>
<input type="email" id="email" name="email" required>
<p class="input-error" id="email-error">Bitte gib eine gültige E-Mail-Adresse ein.</p>
</div>
<div class="form-group">
<label for="passwort">Passwort</label>
<input type="password" id="passwort" name="passwort" minlength="6" placeholder="Mindestens 6 Zeichen">
<p class="input-hint">Nur ausfüllen, wenn du dein Passwort ändern möchtest.</p>
<p class="input-error" id="passwort-error">Das Passwort muss mindestens 6 Zeichen lang sein.</p>
</div>
<button class="button-primary" type="submit">Profil speichern</button>
<p id="profile-feedback" class="profile-feedback" aria-live="polite"></p>
</form>
</article>
</section>
</main>
<!-- Logout Confirmation Modal -->
<div id="logoutModal" class="modal">
<div class="modal-content">
<div class="modal-header">
<button class="close-btn" onclick="closeLogoutModal()">&times;</button>
<h2>Abmelden?</h2>
</div>
<div class="modal-body">
Bist du sicher, dass du dich abmelden möchtest?
</div>
<div class="modal-footer">
<button class="button-primary button--outline" type="button" onclick="closeLogoutModal()">Abbrechen</button>
<button class="button-primary" type="button" onclick="confirmLogout()">Abmelden</button>
</div>
</div>
</div>
<!-- Snackbar: Feedback bei Abmeldung von Events -->
<div class="snackbar" id="snackbar"></div>
<!-- Event-Absage Confirmation Modal -->
<div id="cancelEventModal" class="modal">
<div class="modal-content">
<div class="modal-header">
<button class="close-btn" onclick="closeCancelEventModal()">&times;</button>
<h2>Event absagen?</h2>
</div>
<div class="modal-body">
Bist du sicher, dass du dieses Event absagen möchtest? Diese Aktion kann nicht rückgängig gemacht werden.
</div>
<div class="modal-footer">
<button class="button-primary button--outline" type="button" onclick="closeCancelEventModal()">Abbrechen</button>
<button class="button-primary" type="button" id="confirmCancelEventBtn" style="background-color: var(--tomato); border-color: var(--tomato);">Event absagen</button>
</div>
</div>
</div>
<div class="instagram-invite">
<a href="https://www.instagram.com" target="_blank" rel="noopener noreferrer" class="instagram-invite__link">
<img src="assets/Icon_instagram.png" alt="Instagram" class="instagram-invite__icon" />
<img src="assets/logo_invite.svg" alt="Invité Logo" class="instagram-invite__logo" />
</a>
</div>
<footer class="footer">
<a href="impressum.html" class="footer-link">Impressum</a>
<a href="datenschutz.html" class="footer-link">Datenschutz</a>
</footer>
<script src="js/my_profil.js"></script>
</body>
</html>
+105
View File
@@ -0,0 +1,105 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Kontaktseite - Invité</title>
<!-- Globales Stylesheet -->
<link rel="stylesheet" href="css/stylesheet_global.css">
<!-- Stylesheet für diese Seite-->
<link rel="stylesheet" href="css/login_signup.css">
<script src="js/navigation.js" defer></script>
</head>
<body>
<!-- Top Navigation mit Seitenlinks -->
<header class="top-nav-wrap">
<div class="top-nav">
<a class="brand" href="index.html" aria-label="Zur Startseite">
<img src="assets/logo_invite.svg" alt="Invite Logo">
</a>
<nav class="nav-tab-links" aria-label="Hauptnavigation">
<a class="button-small" href="login.html" aria-label="Login">Login</a>
</nav>
</div>
</header>
<!-- Main Content -->
<div class="main-content">
<div class="container">
<div class="image-section">
<img src="assets/index_cooking.jpg" alt="Social Cooking">
</div>
<div class="form-section">
<h1>Erstelle deinen Account</h1>
<div class="info-box">
<strong>Hinweis:</strong> Sichtbar auf der Plattform ist nur dein Vorname. Erst einer Anmeldung zum Event ist der Nachname für die Teilnehmenden sichtbar.
</div>
<form id="signupForm">
<div class="form-group">
<label for="vorname">Vorname *</label>
<input type="text" id="vorname" name="vorname" required placeholder="Dein Vorname">
<div class="error-message" id="vornameError">Bitte gib deinen Vornamen ein.</div>
</div>
<div class="form-group">
<label for="nachname">Nachname *</label>
<input type="text" id="nachname" name="nachname" required placeholder="Dein Nachname">
<div class="error-message" id="nachnameError">Bitte gib deinen Nachnamen ein.</div>
</div>
<div class="form-group">
<label for="email">E-Mail *</label>
<input type="email" id="email" name="email" required placeholder="deine.email@example.com">
<div class="error-message" id="emailError">Bitte gib eine gültige E-Mail Adresse ein.</div>
</div>
<div class="form-group">
<label for="passwort">Passwort *</label>
<input type="password" id="passwort" name="passwort" required placeholder="Mindestens 8 Zeichen">
<div class="error-message" id="passwortError">Dein Passwort muss mindestens 8 Zeichen lang sein.</div>
</div>
<button type="submit" class="button-primary">Konto erstellen</button>
<div class="link-text">
Du hast bereits einen Account? <a href="login.html">Hier geht es zum Login.</a>
</div>
</form>
</div>
</div>
</div> <!-- Schliesst main-content -->
<!-- Welcome Modal -->
<div id="welcomeModal" class="modal">
<div class="modal-content">
<div class="modal-header">
<button class="close-btn" onclick="closeWelcomeModal()">&times;</button>
<h2>Konto erfolgreich erstellt!</h2>
</div>
<div class="modal-body">
Willkommen bei Invité! Dein Account wurde erfolgreich erstellt. Entdecke jetzt die neuesten Events in deiner Nähe.
</div>
<div class="modal-footer">
<button class="button-primary" onclick="closeWelcomeModal()">Weiter zu den Events</button>
</div>
</div>
</div>
<script src="js/signup.js"></script>
<div class="instagram-invite">
<a href="https://www.instagram.com" target="_blank" rel="noopener noreferrer" class="instagram-invite__link">
<img src="assets/Icon_instagram.png" alt="Instagram" class="instagram-invite__icon" />
<img src="assets/logo_invite.svg" alt="Invité Logo" class="instagram-invite__logo" />
</a>
</div>
<footer class="footer">
<a href="impressum.html" class="footer-link">Impressum</a>
<a href="datenschutz.html" class="footer-link">Datenschutz</a>
</footer>
</body>
</html>
View File
Whitespace-only changes.