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.
This commit is contained in:
1 parent
46074df578
commit
1efa4dcd39
17 files changed
+1076
-29
No files matched your search
@@ -281,6 +281,14 @@
|
||||
filter: brightness(0.95);
|
||||
}
|
||||
|
||||
.btn-primary-own,
|
||||
.btn-primary-own:disabled {
|
||||
background: var(--olive-light);
|
||||
color: var(--black);
|
||||
opacity: 1;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------
|
||||
Overview Empty State
|
||||
--------------------------------------------------------- */
|
||||
@@ -693,6 +701,15 @@
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.detail-primary-btn-own,
|
||||
.detail-primary-btn-own:disabled {
|
||||
border-color: var(--olive-light);
|
||||
background: var(--olive-light);
|
||||
color: var(--black);
|
||||
opacity: 1;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
|
||||
/* ---------------------------------------------------------
|
||||
Responsive: Tablet (<= 850px)
|
||||
|
||||
@@ -0,0 +1,251 @@
|
||||
.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-label);
|
||||
}
|
||||
|
||||
#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);
|
||||
}
|
||||
|
||||
/* Konsistentes Karten-Layout fuer 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 fuer "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-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-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;
|
||||
}
|
||||
|
||||
.profile-unregister-btn:hover,
|
||||
.profile-unregister-btn:focus-visible {
|
||||
background: var(--tomato-dark);
|
||||
}
|
||||
|
||||
.profile-empty {
|
||||
margin: 0;
|
||||
color: var(--black);
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
}
|
||||
@@ -210,6 +210,25 @@ p {
|
||||
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;
|
||||
|
||||
Reference in new issue
Block a user