From cb8994b4938d680ff9669e804720bda6c0c6a5b6 Mon Sep 17 00:00:00 2001 From: patrickzerhusen Date: Sat, 25 Apr 2026 13:37:05 +0200 Subject: [PATCH] unified CSS, consistent headers, standardized button colors --- public/admin.css | 547 --------------------- public/admin.php | 20 +- public/imprint.php | 48 +- public/index.php | 2 +- public/privacy.php | 59 +-- public/styles.css | 1166 +++++++++++++++++++++++++++----------------- 6 files changed, 752 insertions(+), 1090 deletions(-) delete mode 100644 public/admin.css diff --git a/public/admin.css b/public/admin.css deleted file mode 100644 index a8347e2..0000000 --- a/public/admin.css +++ /dev/null @@ -1,547 +0,0 @@ -/* ===================================================================== - Moderation Page — Styles - Separate Stylesheet for the Admin Moderation Interface. - ===================================================================== */ - - -/* ----------------------------------------------------------------- - Base - ----------------------------------------------------------------- */ -* { box-sizing: border-box; margin: 0; padding: 0; } - -body { - font-family: 'Segoe UI', system-ui, sans-serif; - background: #f4f5f7; - color: #1a1a2e; - font-size: 15px; -} - - -/* ----------------------------------------------------------------- - Header - ----------------------------------------------------------------- */ -.admin-header { - background: var(--color-primary); - color: white; - padding: 14px 24px; - display: flex; - justify-content: space-between; - align-items: center; - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); -} - -.admin-header h1 { - font-size: 1.15rem; - font-weight: 600; -} - -.admin-nav { - display: flex; - gap: 16px; - align-items: center; -} - -.admin-nav a { - color: white; - text-decoration: none; - opacity: 0.8; - font-size: 0.85rem; - transition: opacity 150ms ease; -} - -.admin-nav a:hover { opacity: 1; } - - -/* ----------------------------------------------------------------- - Container - ----------------------------------------------------------------- */ -.admin-container { - max-width: 960px; - margin: 24px auto; - padding: 0 16px; -} - - -/* ----------------------------------------------------------------- - Statistics Cards - ----------------------------------------------------------------- */ -.stats-grid { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); - gap: 12px; - margin-bottom: 28px; -} - -.stat-card { - background: white; - border-radius: 8px; - padding: 16px; - text-align: center; - border: 1px solid #e0e0e0; -} - -.stat-card .stat-number { - font-size: 1.8rem; - font-weight: 700; - color: var(--color-primary); -} - -.stat-card .stat-label { - font-size: 0.8rem; - color: #5a5a7a; - margin-top: 4px; -} - - -/* ----------------------------------------------------------------- - Filter Tabs - ----------------------------------------------------------------- */ -.filter-tabs { - display: flex; - gap: 4px; - margin-bottom: 20px; - border-bottom: 2px solid #e0e0e0; - padding-bottom: 0; -} - -.filter-tab { - padding: 8px 16px; - border: none; - background: none; - font-family: inherit; - font-size: 0.85rem; - font-weight: 600; - color: #5a5a7a; - cursor: pointer; - border-bottom: 2px solid transparent; - margin-bottom: -2px; - transition: color 150ms ease, border-color 150ms ease; -} - -.filter-tab:hover { - color: var(--color-primary); -} - -.filter-tab.active { - color: var(--color-primary); - border-bottom-color: var(--color-primary); -} - -.filter-tab .tab-count { - background: #e0e0e0; - color: #5a5a7a; - font-size: 0.7rem; - padding: 1px 6px; - border-radius: 10px; - margin-left: 4px; -} - -.filter-tab.active .tab-count { - background: var(--color-primary); - color: white; -} - - -/* ----------------------------------------------------------------- - Sort Controls - ----------------------------------------------------------------- */ -.sort-controls { - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 16px; - font-size: 0.85rem; - color: #5a5a7a; -} - -.sort-controls select { - padding: 4px 8px; - border: 1px solid #e0e0e0; - border-radius: 4px; - font-family: inherit; - font-size: 0.85rem; - cursor: pointer; -} - - -/* ----------------------------------------------------------------- - Collapsible Contribution Rows - ----------------------------------------------------------------- */ -.contribution-row { - background: white; - border: 1px solid #e0e0e0; - border-radius: 8px; - margin-bottom: 10px; - overflow: hidden; - transition: border-color 150ms ease; -} - -.contribution-row:hover { - border-color: #bbb; -} - -.contribution-row-header { - padding: 12px 16px; - display: flex; - justify-content: space-between; - align-items: center; - cursor: pointer; - transition: background 150ms ease; -} - -.contribution-row-header:hover { - background: #f8f9fa; -} - -.contribution-row-summary { - display: flex; - align-items: center; - gap: 10px; - flex: 1; - min-width: 0; -} - -.contribution-row-summary .title { - font-weight: 600; - font-size: 0.95rem; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.collapse-icon { - color: #999; - font-size: 0.75rem; - flex-shrink: 0; - transition: transform 200ms ease; -} - -.contribution-row.open .collapse-icon { - transform: rotate(180deg); -} - - -/* ----------------------------------------------------------------- - Contribution Detail View (expanded) - ----------------------------------------------------------------- */ -.contribution-row-detail { - padding: 0 16px 16px 16px; - border-top: 1px solid #f0f0f0; - display: none; -} - -.contribution-row.open .contribution-row-detail { - display: block; -} - -.detail-layout { - display: flex; - gap: 16px; - margin-top: 12px; - margin-bottom: 12px; -} - -.detail-map { - width: 220px; - height: 170px; - border-radius: 6px; - border: 1px solid #e0e0e0; - flex-shrink: 0; - background: #f0f0f0; -} - -.detail-content { - flex: 1; - min-width: 0; -} - -.detail-content .description { - font-size: 0.85rem; - line-height: 1.5; - color: #5a5a7a; - margin-bottom: 10px; -} - -.detail-content .description.empty { - color: #bbb; - font-style: italic; -} - -.detail-meta { - font-size: 0.8rem; - color: #999; - display: flex; - flex-direction: column; - gap: 4px; -} - -.detail-meta span { - display: flex; - align-items: center; - gap: 6px; -} - - -/* ----------------------------------------------------------------- - Action Buttons - ----------------------------------------------------------------- */ -.action-buttons { - display: flex; - gap: 8px; - flex-wrap: wrap; - padding-top: 12px; - border-top: 1px solid #f0f0f0; -} - -.btn { - padding: 7px 14px; - border: none; - border-radius: 6px; - font-size: 0.82rem; - font-weight: 600; - cursor: pointer; - display: inline-flex; - align-items: center; - gap: 5px; - font-family: inherit; - transition: filter 150ms ease; - text-decoration: none; -} - -.btn:hover { filter: brightness(1.1); } - -.btn-approve { background: #28a745 ; color: white; } -.btn-reject { background: #DC3545; color: white; } -.btn-edit { background: #ffc107; color: white; } -.btn-delete { background: #424242; color: white; } -.btn-map { background: #546E7A; color: white; } - - -/* ----------------------------------------------------------------- - Badges - ----------------------------------------------------------------- */ -.badge { - display: inline-block; - padding: 2px 8px; - border-radius: 4px; - font-size: 0.7rem; - font-weight: 600; - text-transform: uppercase; - letter-spacing: 0.5px; - flex-shrink: 0; -} - -.badge-category { - background: #e0e0e0; - color: #5a5a7a; - display: inline-flex; - align-items: center; - gap: 4px; -} - -.badge-pending { background: #fff3cd; color: #856404; } -.badge-approved { background: #d4edda; color: #155724; } -.badge-rejected { background: #f8d7da; color: #721c24; } - - -/* ----------------------------------------------------------------- - Empty State - ----------------------------------------------------------------- */ -.empty-state { - text-align: center; - padding: 40px; - color: #999; - font-size: 0.9rem; -} - - -/* ----------------------------------------------------------------- - Section Spacing - ----------------------------------------------------------------- */ -.section { margin-bottom: 32px; } - - -/* ----------------------------------------------------------------- - Placeholder Tabs (future Features) - ----------------------------------------------------------------- */ -.placeholder-content { - text-align: center; - padding: 60px 20px; - color: #bbb; -} - -.placeholder-content i { - font-size: 2.5rem; - margin-bottom: 12px; - display: block; -} - -.placeholder-content p { - font-size: 0.9rem; -} - - -/* ----------------------------------------------------------------- - Navigation Tabs (Page Sections) - ----------------------------------------------------------------- */ -.page-tabs { - display: flex; - gap: 4px; - margin-bottom: 24px; - background: white; - padding: 4px; - border-radius: 8px; - border: 1px solid #e0e0e0; -} - -.page-tab { - padding: 8px 16px; - border: none; - background: none; - font-family: inherit; - font-size: 0.85rem; - font-weight: 600; - color: #5a5a7a; - cursor: pointer; - border-radius: 6px; - transition: all 150ms ease; - display: flex; - align-items: center; - gap: 6px; -} - -.page-tab:hover { background: #f0f0f0; } - -.page-tab.active { - background: var(--color-primary); - color: white; -} - - -/* ----------------------------------------------------------------- - Login Page - ----------------------------------------------------------------- */ -.login-wrapper { - display: flex; - align-items: center; - justify-content: center; - min-height: 100vh; -} - -.login-box { - background: white; - border-radius: 12px; - padding: 32px; - max-width: 380px; - width: 90%; - box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); - text-align: center; -} - -.login-box h1 { - font-size: 1.3rem; - margin-bottom: 8px; -} - -.login-box p { - font-size: 0.85rem; - color: #5a5a7a; - margin-bottom: 20px; -} - -.login-box input[type="password"] { - width: 100%; - padding: 10px 12px; - border: 1px solid #e0e0e0; - border-radius: 6px; - font-size: 0.9rem; - margin-bottom: 12px; - font-family: inherit; -} - -.login-box input:focus { - outline: none; - border-color: var(--color-primary); - box-shadow: 0 0 0 3px rgba(0, 55, 109, 0.1); -} - -.login-box button { - width: 100%; - padding: 10px; - background: var(--color-primary); - color: white; - border: none; - border-radius: 6px; - font-size: 0.9rem; - font-weight: 600; - cursor: pointer; - font-family: inherit; -} - -.login-box button:hover { filter: brightness(1.15); } - -.login-error { - color: #c62828; - font-size: 0.85rem; - margin-bottom: 12px; -} - -.back-link { - margin-top: 16px; - font-size: 0.8rem; -} - -.back-link a { color: #5a5a7a; } - - -/* ----------------------------------------------------------------- - SweetAlert2 Font Override - ----------------------------------------------------------------- */ -.swal2-input, -.swal2-textarea, -.swal2-select { - font-family: 'Segoe UI', system-ui, sans-serif !important; -} - - -/* ----------------------------------------------------------------- - Mobile Responsive - ----------------------------------------------------------------- */ -@media (max-width: 768px) { - .admin-header { - flex-direction: column; - gap: 8px; - padding: 12px 16px; - } - - .admin-header h1 { font-size: 1rem; } - - .detail-layout { - flex-direction: column; - } - - .detail-map { - width: 100%; - height: 180px; - } - - .contribution-row-summary .title { - max-width: 200px; - } - - .action-buttons { - flex-direction: column; - } - - .action-buttons .btn { - justify-content: center; - } - - .filter-tabs { - overflow-x: auto; - } - - .page-tabs { - overflow-x: auto; - } -} \ No newline at end of file diff --git a/public/admin.php b/public/admin.php index 84aba59..ce77702 100644 --- a/public/admin.php +++ b/public/admin.php @@ -123,7 +123,7 @@ $counts['total'] = count($all_contributions); - + @@ -140,15 +140,17 @@ $counts['total'] = count($all_contributions); -
-

Moderationsportal

-
- Bürgerportal - Abmelden + -
+
@@ -295,7 +297,7 @@ $counts['total'] = count($all_contributions); - @@ -864,7 +866,7 @@ function show_login_page($municipality, $error = null) { Moderation - Anmeldung - + diff --git a/public/imprint.php b/public/imprint.php index 81f56cc..6c6af10 100644 --- a/public/imprint.php +++ b/public/imprint.php @@ -1,12 +1,8 @@ prepare("SELECT * FROM municipalities WHERE slug = :slug"); -$stmt->execute([':slug' => 'lohne']); +$stmt->execute([':slug' => getenv('MUNICIPALITY_SLUG')]); $municipality = $stmt->fetch(); ?> @@ -15,41 +11,29 @@ $municipality = $stmt->fetch(); Impressum — <?= htmlspecialchars($municipality['name']) ?> - + - + + -
-

Angaben gemäß § 5 TMG

-

Stadt

-

Die vollständigen Angaben (Adresse, Telefon, E-Mail, Vertretungsberechtigte) werden hier ergänzt, sobald das Portal in den Produktivbetrieb geht.

- -

Technische Umsetzung

-

endex GmbH

- -

Haftungsausschluss

-

Die Inhalte der Bürgerbeiträge geben die Meinung der jeweiligen Verfasser wieder. Die Stadt übernimmt keine Gewähr für deren Richtigkeit.

+
+
+
+ + Dieses Portal befindet sich in der Entwicklung und wurde nicht offiziell beauftragt. Das Impressum wird mit der offiziellen Inbetriebnahme hier hinzugefügt. +
+

Impressum

+

Das Impressum wird hier hinzugefügt, sobald das Portal in den Produktivbetrieb geht.

+
\ No newline at end of file diff --git a/public/index.php b/public/index.php index 952e653..f122214 100644 --- a/public/index.php +++ b/public/index.php @@ -79,7 +79,7 @@ $news_items = $stmt->fetchAll(); - + diff --git a/public/privacy.php b/public/privacy.php index 0c9f6a3..f2db92f 100644 --- a/public/privacy.php +++ b/public/privacy.php @@ -1,12 +1,8 @@ prepare("SELECT * FROM municipalities WHERE slug = :slug"); -$stmt->execute([':slug' => 'lohne']); +$stmt->execute([':slug' => getenv('MUNICIPALITY_SLUG')]); $municipality = $stmt->fetch(); ?> @@ -15,50 +11,29 @@ $municipality = $stmt->fetch(); Datenschutz — <?= htmlspecialchars($municipality['name']) ?> - + - + + -
-

Verantwortliche Stelle

-

Stadt

-

Die vollständigen Kontaktdaten werden hier ergänzt, sobald das Portal in den Produktivbetrieb geht.

- -

Erhobene Daten

-

Das Bürgerbeteiligungsportal speichert die von Ihnen eingegebenen Beiträge (Titel, Beschreibung, Geometrie, Name) sowie Ihre Abstimmungen zur Durchführung der Bürgerbeteiligung.

- -

Zweck der Verarbeitung

-

Die Daten werden ausschließlich zur Durchführung und Auswertung der Bürgerbeteiligung verwendet.

- -

Weitergabe an Dritte

-

Ihre Daten werden nicht an Dritte weitergegeben.

- -

Ihre Rechte

-

Sie haben das Recht auf Auskunft, Berichtigung und Löschung Ihrer Daten. Kontaktieren Sie hierzu die verantwortliche Stelle.

- -

Cookies und Sitzungsdaten

-

Das Portal verwendet Sitzungscookies zur Speicherung Ihres Namens während der Nutzung. Diese werden beim Schließen des Browsers gelöscht.

+
+
+
+ + Dieses Portal befindet sich in der Entwicklung und wurde nicht offiziell beauftragt. Die Datenschutzerklärung wird mit der offiziellen Inbetriebnahme hier hinzugefügt. +
+

Datenschutz

+

Die Datenschutzerklärung wird hier hinzugefügt, sobald das Portal in den Produktivbetrieb geht.

+
\ No newline at end of file diff --git a/public/styles.css b/public/styles.css index 9da66e5..3a10b31 100644 --- a/public/styles.css +++ b/public/styles.css @@ -1,44 +1,59 @@ /* ===================================================================== - WebGIS Citizen Participation Portal — Styles - Mobile-First Layout with CSS Custom Properties for Municipality Theme + WebGIS Bürgerbeteiligungsportal — Unified Styles + Single Stylesheet for all Pages: Portal, Moderation, Legal Pages. + Organized in Sections: Tokens, Base, Shared, Portal, Admin, Legal. ===================================================================== */ -/* ----------------------------------------------------------------- - CSS Custom Properties Defaults — overridden per Municipality - ----------------------------------------------------------------- */ +/* ================================================================= + SECTION 1: Design Tokens (CSS Custom Properties) + Shared across all Pages. Overridden per Municipality via PHP. + ================================================================= */ + :root { - /* Municipality Colors */ + /* Municipality Theme */ --color-primary: #00376D; --color-primary-light: #00376D22; - /* Neutral Colors */ + /* Neutral Palette */ --color-bg: #f4f5f7; --color-surface: #ffffff; --color-text: #1a1a2e; --color-text-secondary: #5a5a7a; --color-border: #e0e0e0; - /* Feedback Colors */ + /* Standardized Button Colors */ + --color-approve: #28a745; + --color-reject: #DC3545; + --color-edit: #ffc107; + --color-delete: #424242; + --color-map-btn: #546E7A; --color-success: #2e7d32; --color-error: #c62828; --color-warning: #f57f17; - /* Spacing */ + /* Badge Colors */ + --color-badge-pending-bg: #fff3cd; + --color-badge-pending-text: #856404; + --color-badge-approved-bg: #d4edda; + --color-badge-approved-text: #155724; + --color-badge-rejected-bg: #f8d7da; + --color-badge-rejected-text: #721c24; + + /* Spacing Scale */ --space-xs: 4px; --space-sm: 8px; --space-md: 16px; --space-lg: 24px; --space-xl: 32px; - /* Layout */ + /* Layout (Portal-specific, ignored by other Pages) */ --header-height: 56px; --footer-height: 40px; --map-side-padding: 0px; /* Typography */ --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif; - --font-heading: 'Segoe UI', system-ui, -apple-system, sans-serif; /* Transitions */ --transition-fast: 150ms ease; @@ -46,9 +61,11 @@ } -/* ----------------------------------------------------------------- - Reset and Base - ----------------------------------------------------------------- */ +/* ================================================================= + SECTION 2: Reset and Base Styles + Applied to every Page. + ================================================================= */ + *, *::before, *::after { @@ -57,402 +74,155 @@ padding: 0; } -html, body { - height: 100%; - overflow: hidden; +body { font-family: var(--font-body); font-size: 15px; color: var(--color-text); background: var(--color-bg); } +a { text-decoration: none; } + + +/* ================================================================= + SECTION 3: Shared Components + Reusable across Portal, Admin, and Legal Pages. + ================================================================= */ + /* ----------------------------------------------------------------- - Header + 3.1 Page Header (Admin, Legal Pages) ----------------------------------------------------------------- */ -#app-header { - position: fixed; - top: 0; - left: 0; - right: 0; - z-index: 1000; - height: var(--header-height); - display: flex; - align-items: center; - justify-content: space-between; - padding: 0 var(--space-md); +.page-header { background: var(--color-primary); color: white; + padding: 14px 24px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); } -.header-left { +.page-header-inner { + max-width: 960px; + margin: 0 auto; display: flex; + justify-content: space-between; align-items: center; - gap: var(--space-sm); - min-width: 0; } -.header-logo { - height: 36px; - width: auto; - object-fit: contain; - flex-shrink: 0; -} - -.header-title { - font-family: var(--font-heading); - font-size: 1.1rem; +.page-header h1 { + font-size: 1.15rem; font-weight: 600; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; } -.header-nav { - display: flex; - gap: var(--space-xs); -} - -.nav-btn { +.page-header-nav { display: flex; + gap: 16px; align-items: center; - gap: var(--space-xs); - padding: var(--space-sm) var(--space-md); - border: none; - background: rgba(255, 255, 255, 0.1); +} + +.page-header-nav a { color: white; - border-radius: 6px; - cursor: pointer; + opacity: 0.8; font-size: 0.85rem; - transition: background var(--transition-fast); + transition: opacity var(--transition-fast); } -.nav-btn:hover { - background: rgba(255, 255, 255, 0.25); -} - -.nav-btn-admin { - text-decoration: none; - margin-left: var(--space-sm); - background: rgba(255, 255, 255, 0.05); - opacity: 0.6; - font-size: 0.8rem; -} - -.nav-btn-admin:hover { - opacity: 1; - background: rgba(255, 255, 255, 0.2); -} - -.header-menu-toggle { - display: none; - border: none; - background: none; - color: white; - font-size: 1.4rem; - cursor: pointer; - padding: var(--space-sm); -} +.page-header-nav a:hover { opacity: 1; } /* ----------------------------------------------------------------- - Main and Map Container + 3.2 Page Content Container (Admin, Legal Pages) ----------------------------------------------------------------- */ -#app-main { - position: fixed; - top: var(--header-height); - bottom: var(--footer-height); - left: var(--map-side-padding); - right: var(--map-side-padding); +.page-container { + max-width: 960px; + margin: 24px auto; + padding: 0 16px; } -#map { - width: 100%; - height: 100%; -} - - -/* ----------------------------------------------------------------- - Footer - ----------------------------------------------------------------- */ -#app-footer { - position: fixed; - bottom: 0; - left: 0; - right: 0; - z-index: 1000; - height: var(--footer-height); - display: flex; - align-items: center; - justify-content: center; - padding: 0 var(--space-md); +.page-content-box { + padding: 32px; background: var(--color-surface); - border-top: 1px solid var(--color-border); - font-size: 0.8rem; - color: var(--color-text-secondary); -} - -.footer-content { - display: flex; - align-items: center; - gap: var(--space-sm); -} - -.footer-logo { - height: 22px; - width: auto; - object-fit: contain; -} - -.dev-warning { - position: absolute; - left: var(--space-md); - - font-size: 0.7rem; - font-weight: 600; - color: #856404; - white-space: nowrap; - - background: rgba(255, 243, 205, 0.8); /* leicht transparent */ - padding: 4px 10px; border-radius: 8px; - - border: 1px solid #856404; /* NICHT transparent */ -} - -@media (max-width: 768px) { - .dev-warning { - font-size: 0.6rem; - left: var(--space-sm); - } -} - -/* ----------------------------------------------------------------- - Mouse Position Display - ----------------------------------------------------------------- */ -.mouse-position-display { - background: rgba(255, 255, 255, 0.85); - padding: 2px 8px; - font-size: 0.75rem; - border-radius: 4px; -} - -@media (max-width: 768px) { - .mouse-position-display { - display: none; - } -} - - -/* ----------------------------------------------------------------- - GPS Control Button - ----------------------------------------------------------------- */ -.gps-control-button { - display: flex; - align-items: center; - justify-content: center; - width: 30px; - height: 30px; - font-size: 16px; -} - - -/* ----------------------------------------------------------------- - Sidebar Overrides - ----------------------------------------------------------------- */ -.leaflet-sidebar { - z-index: 999; - top: var(--header-height); - bottom: var(--footer-height); -} - -.leaflet-sidebar-header { - background: var(--color-primary); - color: white; -} - -.leaflet-sidebar-close { - color: white; -} - -.leaflet-sidebar-tabs > ul > li > a { - color: var(--color-text-secondary); - transition: color var(--transition-fast); -} - -.leaflet-sidebar-tabs > ul > li.active > a { - color: var(--color-primary); - border-color: var(--color-primary); -} - -.sidebar-body { - padding: var(--space-md); -} - -.sidebar-body h3 { - font-size: 0.95rem; - font-weight: 600; - margin: var(--space-lg) 0 var(--space-sm) 0; - color: var(--color-primary); -} - -.sidebar-body h3:first-child { - margin-top: 0; -} - -.sidebar-body p { - margin-bottom: var(--space-sm); - line-height: 1.5; - color: var(--color-text-secondary); -} - - -/* ----------------------------------------------------------------- - Contributions List (Sidebar Tab) - ----------------------------------------------------------------- */ -.list-search { - margin-bottom: var(--space-md); -} - -.contribution-card { - padding: var(--space-md); - margin-bottom: var(--space-sm); - background: var(--color-surface); border: 1px solid var(--color-border); - border-radius: 8px; - cursor: pointer; - transition: box-shadow var(--transition-fast), border-color var(--transition-fast); + line-height: 1.7; } -.contribution-card:hover { - border-color: var(--color-primary); - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); +.page-content-box h2 { + font-size: 1.05rem; + font-weight: 600; + margin: 24px 0 8px 0; + color: var(--color-primary); } -.contribution-card-header { - display: flex; +.page-content-box h2:first-child { margin-top: 0; } + +.page-content-box p { + margin-bottom: 12px; + color: var(--color-text-secondary); +} + +.page-content-box a { color: var(--color-primary); } + + +/* ----------------------------------------------------------------- + 3.3 Buttons (shared across all Pages) + ----------------------------------------------------------------- */ +.btn { + display: inline-flex; align-items: center; - gap: var(--space-sm); - margin-bottom: var(--space-xs); + justify-content: center; + gap: var(--space-xs); + padding: 8px 16px; + border: none; + border-radius: 6px; + font-family: var(--font-body); + font-size: 0.85rem; + font-weight: 600; + cursor: pointer; + transition: filter var(--transition-fast), transform var(--transition-fast); + text-decoration: none; + min-height: 40px; } -.contribution-card-category { - font-size: 0.75rem; +.btn:hover { filter: brightness(1.1); } +.btn:active { transform: scale(0.97); } + +.btn-primary { background: var(--color-primary); color: white; } +.btn-secondary { background: var(--color-bg); color: var(--color-text); border: 1px solid var(--color-border); } +.btn-secondary:hover { background: var(--color-border); } +.btn-approve { background: var(--color-approve); color: white; } +.btn-reject { background: var(--color-reject); color: white; } +.btn-edit { background: var(--color-edit); color: white; } +.btn-delete { background: var(--color-delete); color: white; } +.btn-map { background: var(--color-map-btn); color: white; } +.btn-success { background: var(--color-success); color: white; } +.btn-danger { background: var(--color-error); color: white; } +.btn-reset { background: var(--color-warning); color: white; } + + +/* ----------------------------------------------------------------- + 3.4 Badges (shared across Portal and Admin) + ----------------------------------------------------------------- */ +.badge { + display: inline-block; + padding: 2px 8px; + border-radius: 4px; + font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; - color: var(--color-primary); + flex-shrink: 0; } -.contribution-card-title { - font-weight: 600; - font-size: 0.95rem; - margin-bottom: var(--space-xs); -} - -.contribution-card-meta { - display: flex; - justify-content: space-between; - font-size: 0.8rem; - color: var(--color-text-secondary); -} - -.contribution-card-votes { - display: flex; - gap: var(--space-sm); -} +.badge-pending { background: var(--color-badge-pending-bg); color: var(--color-badge-pending-text); } +.badge-approved { background: var(--color-badge-approved-bg); color: var(--color-badge-approved-text); } +.badge-rejected { background: var(--color-badge-rejected-bg); color: var(--color-badge-rejected-text); } +.badge-category { background: var(--color-border); color: var(--color-text-secondary); display: inline-flex; align-items: center; gap: 4px; } /* ----------------------------------------------------------------- - News Items (Sidebar Tab) + 3.5 Form Elements (shared across Portal and Admin) ----------------------------------------------------------------- */ -.news-item { - font-size: 0.8rem; - padding: var(--space-md); - margin-bottom: var(--space-sm); - background: var(--color-surface); - border: 1px solid var(--color-border); - border-radius: 8px; -} - -.news-date { - font-size: 0.8rem; - color: var(--color-text-secondary); -} - -.news-item h3 { - font-size: 0.95rem; - margin: var(--space-xs) 0; - color: var(--color-text); -} - - -/* ----------------------------------------------------------------- - Modals (Welcome, Login, Create Contribution) - ----------------------------------------------------------------- */ -.modal-overlay { - position: fixed; - inset: 0; - z-index: 2000; - display: flex; - align-items: center; - justify-content: center; - background: rgba(0, 0, 0, 0.5); - backdrop-filter: blur(4px); -} - -.modal-content { - background: var(--color-surface); - border-radius: 12px; - padding: var(--space-xl); - max-width: 480px; - width: 90%; - max-height: 90vh; - overflow-y: auto; - box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2); -} - -.modal-small { - max-width: 380px; -} - -.modal-content h2 { - font-family: var(--font-heading); - font-size: 1.3rem; - margin-bottom: var(--space-md); - color: var(--color-primary); - display: flex; - align-items: center; - gap: var(--space-sm); -} - -.modal-content p { - line-height: 1.6; - margin-bottom: var(--space-sm); - color: var(--color-text-secondary); -} - -.modal-content ul { - margin: var(--space-sm) 0 var(--space-md) var(--space-lg); - line-height: 1.8; - color: var(--color-text-secondary); -} - -.modal-actions { - display: flex; - justify-content: flex-end; - gap: var(--space-sm); - margin-top: var(--space-lg); -} - - -/* ----------------------------------------------------------------- - Form Elements - ----------------------------------------------------------------- */ -.form-group { - margin-bottom: var(--space-md); -} +.form-group { margin-bottom: var(--space-md); } .form-group label { display: block; @@ -480,83 +250,334 @@ html, body { box-shadow: 0 0 0 3px var(--color-primary-light); } -textarea.form-input { - resize: vertical; -} +textarea.form-input { resize: vertical; } +select.form-input { cursor: pointer; } -select.form-input { - cursor: pointer; + +/* ----------------------------------------------------------------- + 3.6 SweetAlert2 Font Override + ----------------------------------------------------------------- */ +.swal2-input, +.swal2-textarea, +.swal2-select { + font-family: var(--font-body) !important; } /* ----------------------------------------------------------------- - Buttons + 3.7 Warning Notices ----------------------------------------------------------------- */ -.btn { - display: inline-flex; - align-items: center; - justify-content: center; - gap: var(--space-xs); - padding: 10px 20px; - border: none; - border-radius: 6px; - font-family: var(--font-body); - font-size: 0.9rem; +.dev-warning { + position: absolute; + left: var(--space-md); + font-size: 0.7rem; font-weight: 600; - cursor: pointer; - transition: background var(--transition-fast), transform var(--transition-fast); - min-height: 44px; - min-width: 44px; + color: var(--color-badge-pending-text); + white-space: nowrap; + background: rgba(255, 243, 205, 0.8); + padding: 4px 10px; + border-radius: 8px; + border: 1px solid var(--color-badge-pending-text); } -.btn:active { - transform: scale(0.97); +.dev-notice { + background: var(--color-badge-pending-bg); + color: var(--color-badge-pending-text); + padding: 12px 16px; + border-radius: 8px; + border: 1px solid #ffc107; + font-size: 0.85rem; + margin-bottom: 16px; } -.btn-primary { +.dev-notice i { margin-right: 6px; } + + +/* ----------------------------------------------------------------- + 3.8 Empty State + ----------------------------------------------------------------- */ +.empty-state { + text-align: center; + padding: 40px; + color: #999; + font-size: 0.9rem; +} + + +/* ================================================================= + SECTION 4: Portal-specific Styles (index.php) + Fixed Layout with Header, Map, Sidebar, Footer. + ================================================================= */ + + +/* ----------------------------------------------------------------- + 4.1 Portal Layout + ----------------------------------------------------------------- */ +.portal-page { height: 100%; overflow: hidden; } + +#app-header { + position: fixed; + top: 0; left: 0; right: 0; + z-index: 1000; + height: var(--header-height); + display: flex; + align-items: center; + justify-content: space-between; + padding: 0 var(--space-md); background: var(--color-primary); color: white; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); } -.btn-primary:hover { - filter: brightness(1.15); +.header-left { + display: flex; + align-items: center; + gap: var(--space-sm); + min-width: 0; } -.btn-secondary { - background: var(--color-bg); - color: var(--color-text); - border: 1px solid var(--color-border); +.header-logo { height: 36px; width: auto; object-fit: contain; flex-shrink: 0; } + +.header-title { + font-size: 1.15rem; + font-weight: 600; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } -.btn-secondary:hover { - background: var(--color-border); -} +.header-nav { display: flex; gap: var(--space-xs); } -.btn-success { - background: var(--color-success); +.nav-btn { + display: flex; + align-items: center; + gap: var(--space-xs); + padding: var(--space-sm) var(--space-md); + border: none; + background: rgba(255, 255, 255, 0.1); color: white; + border-radius: 6px; + cursor: pointer; + font-size: 0.85rem; + transition: background var(--transition-fast); + text-decoration: none; } -.btn-danger { - background: var(--color-error); +.nav-btn:hover { background: rgba(255, 255, 255, 0.25); } + +.nav-btn-admin { + margin-left: var(--space-sm); + background: rgba(255, 255, 255, 0.05); + opacity: 0.6; + font-size: 0.8rem; +} + +.nav-btn-admin:hover { opacity: 1; background: rgba(255, 255, 255, 0.2); } + +.header-menu-toggle { + display: none; + border: none; + background: none; color: white; + font-size: 1.4rem; + cursor: pointer; + padding: var(--space-sm); +} + +#app-main { + position: fixed; + top: var(--header-height); + bottom: var(--footer-height); + left: var(--map-side-padding); + right: var(--map-side-padding); +} + +#map { width: 100%; height: 100%; } + +#app-footer { + position: fixed; + bottom: 0; left: 0; right: 0; + z-index: 1000; + height: var(--footer-height); + display: flex; + align-items: center; + justify-content: center; + padding: 0 var(--space-md); + background: var(--color-surface); + border-top: 1px solid var(--color-border); + font-size: 0.8rem; + color: var(--color-text-secondary); +} + +.footer-content { display: flex; align-items: center; gap: var(--space-sm); } + + +/* ----------------------------------------------------------------- + 4.2 Map Controls + ----------------------------------------------------------------- */ +.gps-control-button { + display: flex; + align-items: center; + justify-content: center; + width: 30px; + height: 30px; + font-size: 16px; +} + +.mouse-position-display { + background: rgba(255, 255, 255, 0.85); + padding: 2px 8px; + font-size: 0.75rem; + border-radius: 4px; } /* ----------------------------------------------------------------- - Map Popup Overrides (Contribution Detail View) + 4.3 Sidebar Overrides ----------------------------------------------------------------- */ -.popup-detail { - min-width: 220px; - max-width: 300px; +.leaflet-sidebar { z-index: 999; top: var(--header-height); bottom: var(--footer-height); } +.leaflet-sidebar-header { background: var(--color-primary); color: white; } +.leaflet-sidebar-close { color: white; } + +.leaflet-sidebar-tabs > ul > li > a { + color: var(--color-text-secondary); + transition: color var(--transition-fast); } -.popup-detail-title { - font-weight: 600; - font-size: 1rem; - margin-bottom: var(--space-xs); +.leaflet-sidebar-tabs > ul > li.active > a { + color: var(--color-primary); + border-color: var(--color-primary); } +.sidebar-body { padding: var(--space-md); } + +.sidebar-body h3 { + font-size: 0.95rem; + font-weight: 600; + margin: var(--space-lg) 0 var(--space-sm) 0; + color: var(--color-primary); +} + +.sidebar-body h3:first-child { margin-top: 0; } + +.sidebar-body p { + margin-bottom: var(--space-sm); + line-height: 1.5; + color: var(--color-text-secondary); +} + + +/* ----------------------------------------------------------------- + 4.4 Sidebar Contributions List + ----------------------------------------------------------------- */ +.list-search { margin-bottom: var(--space-md); } + +.contribution-card { + padding: var(--space-md); + margin-bottom: var(--space-sm); + background: var(--color-surface); + border: 1px solid var(--color-border); + border-radius: 8px; + cursor: pointer; + transition: box-shadow var(--transition-fast), border-color var(--transition-fast); +} + +.contribution-card:hover { + border-color: var(--color-primary); + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); +} + +.contribution-card-header { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-xs); } + +.contribution-card-category { + font-size: 0.75rem; + font-weight: 600; + text-transform: uppercase; + letter-spacing: 0.5px; + color: var(--color-primary); +} + +.contribution-card-title { font-weight: 600; font-size: 0.95rem; margin-bottom: var(--space-xs); } + +.contribution-card-meta { + display: flex; + justify-content: space-between; + font-size: 0.8rem; + color: var(--color-text-secondary); +} + +.contribution-card-votes { display: flex; gap: var(--space-sm); } + + +/* ----------------------------------------------------------------- + 4.5 Sidebar News Items + ----------------------------------------------------------------- */ +.news-item { + font-size: 0.8rem; + padding: var(--space-md); + margin-bottom: var(--space-sm); + background: var(--color-surface); + border: 1px solid var(--color-border); + border-radius: 8px; +} + +.news-date { font-size: 0.8rem; color: var(--color-text-secondary); } +.news-item h3 { font-size: 0.95rem; margin: var(--space-xs) 0; color: var(--color-text); } + + +/* ----------------------------------------------------------------- + 4.6 Modals + ----------------------------------------------------------------- */ +.modal-overlay { + position: fixed; + inset: 0; + z-index: 2000; + display: flex; + align-items: center; + justify-content: center; + background: rgba(0, 0, 0, 0.5); + backdrop-filter: blur(4px); +} + +.modal-content { + background: var(--color-surface); + border-radius: 12px; + padding: var(--space-xl); + max-width: 480px; + width: 90%; + max-height: 90vh; + overflow-y: auto; + box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2); +} + +.modal-small { max-width: 380px; } + +.modal-content h2 { + font-size: 1.3rem; + margin-bottom: var(--space-md); + color: var(--color-primary); + display: flex; + align-items: center; + gap: var(--space-sm); +} + +.modal-content p { line-height: 1.6; margin-bottom: var(--space-sm); color: var(--color-text-secondary); } + +.modal-content ul { + margin: var(--space-sm) 0 var(--space-md) var(--space-lg); + line-height: 1.8; + color: var(--color-text-secondary); +} + +.modal-actions { display: flex; justify-content: flex-end; gap: var(--space-sm); margin-top: var(--space-lg); } + + +/* ----------------------------------------------------------------- + 4.7 Map Popup + ----------------------------------------------------------------- */ +.popup-detail { min-width: 220px; max-width: 300px; } +.popup-detail-title { font-weight: 600; font-size: 1rem; margin-bottom: var(--space-xs); } + .popup-detail-category { display: inline-block; font-size: 0.7rem; @@ -585,11 +606,7 @@ select.form-input { border-top: 1px solid var(--color-border); } -.popup-detail-votes { - display: flex; - gap: var(--space-sm); - margin-top: var(--space-sm); -} +.popup-detail-votes { display: flex; gap: var(--space-sm); margin-top: var(--space-sm); } .popup-vote-btn { display: inline-flex; @@ -604,60 +621,294 @@ select.form-input { transition: all var(--transition-fast); } -.popup-vote-btn:hover { - border-color: var(--color-primary); - background: var(--color-primary-light); +.popup-vote-btn:hover { border-color: var(--color-primary); background: var(--color-primary-light); } +.popup-vote-btn.liked { border-color: var(--color-success); background: #e8f5e9; color: var(--color-success); } +.popup-vote-btn.disliked { border-color: var(--color-error); background: #ffebee; color: var(--color-error); } + +.popup-detail-actions { display: flex; gap: var(--space-sm); margin-top: var(--space-sm); } +.popup-detail-actions .btn { flex: 1; padding: 6px 12px; font-size: 0.8rem; min-height: 36px; } + + +/* ================================================================= + SECTION 5: Admin-specific Styles (admin.php) + ================================================================= */ + + +/* ----------------------------------------------------------------- + 5.1 Statistics Cards + ----------------------------------------------------------------- */ +.stats-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); + gap: 12px; + margin-bottom: 28px; } -.popup-vote-btn.liked { - border-color: var(--color-success); - background: #e8f5e9; - color: var(--color-success); +.stat-card { + background: var(--color-surface); + border-radius: 8px; + padding: 16px; + text-align: center; + border: 1px solid var(--color-border); } -.popup-vote-btn.disliked { - border-color: var(--color-error); - background: #ffebee; - color: var(--color-error); -} +.stat-card .stat-number { font-size: 1.8rem; font-weight: 700; color: var(--color-primary); } +.stat-card .stat-label { font-size: 0.8rem; color: var(--color-text-secondary); margin-top: 4px; } -.popup-detail-actions { + +/* ----------------------------------------------------------------- + 5.2 Page Navigation Tabs + ----------------------------------------------------------------- */ +.page-tabs { display: flex; - gap: var(--space-sm); - margin-top: var(--space-sm); + gap: 4px; + margin-bottom: 24px; + background: var(--color-surface); + padding: 4px; + border-radius: 8px; + border: 1px solid var(--color-border); } -.popup-detail-actions .btn { +.page-tab { + padding: 8px 16px; + border: none; + background: none; + font-family: var(--font-body); + font-size: 0.85rem; + font-weight: 600; + color: var(--color-text-secondary); + cursor: pointer; + border-radius: 6px; + transition: all var(--transition-fast); + display: flex; + align-items: center; + gap: 6px; +} + +.page-tab:hover { background: #f0f0f0; } +.page-tab.active { background: var(--color-primary); color: white; } + + +/* ----------------------------------------------------------------- + 5.3 Status Filter Tabs + ----------------------------------------------------------------- */ +.filter-tabs { + display: flex; + gap: 4px; + margin-bottom: 20px; + border-bottom: 2px solid var(--color-border); +} + +.filter-tab { + padding: 8px 16px; + border: none; + background: none; + font-family: var(--font-body); + font-size: 0.85rem; + font-weight: 600; + color: var(--color-text-secondary); + cursor: pointer; + border-bottom: 2px solid transparent; + margin-bottom: -2px; + transition: color var(--transition-fast), border-color var(--transition-fast); +} + +.filter-tab:hover { color: var(--color-primary); } +.filter-tab.active { color: var(--color-primary); border-bottom-color: var(--color-primary); } + +.filter-tab .tab-count { + background: var(--color-border); + color: var(--color-text-secondary); + font-size: 0.7rem; + padding: 1px 6px; + border-radius: 10px; + margin-left: 4px; +} + +.filter-tab.active .tab-count { background: var(--color-primary); color: white; } + + +/* ----------------------------------------------------------------- + 5.4 Sort Controls + ----------------------------------------------------------------- */ +.sort-controls { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 16px; + font-size: 0.85rem; + color: var(--color-text-secondary); +} + +.sort-controls select { + padding: 4px 8px; + border: 1px solid var(--color-border); + border-radius: 4px; + font-family: var(--font-body); + font-size: 0.85rem; + cursor: pointer; +} + + +/* ----------------------------------------------------------------- + 5.5 Collapsible Rows + ----------------------------------------------------------------- */ +.contribution-row { + background: var(--color-surface); + border: 1px solid var(--color-border); + border-radius: 8px; + margin-bottom: 10px; + overflow: hidden; + transition: border-color var(--transition-fast); +} + +.contribution-row:hover { border-color: #bbb; } + +.contribution-row-header { + padding: 12px 16px; + display: flex; + justify-content: space-between; + align-items: center; + cursor: pointer; + transition: background var(--transition-fast); +} + +.contribution-row-header:hover { background: #f8f9fa; } + +.contribution-row-summary { + display: flex; + align-items: center; + gap: 10px; flex: 1; - padding: 6px 12px; - font-size: 0.8rem; - min-height: 36px; + min-width: 0; +} + +.contribution-row-summary .title { + font-weight: 600; + font-size: 0.95rem; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.collapse-icon { + color: #999; + font-size: 0.75rem; + flex-shrink: 0; + transition: transform 200ms ease; +} + +.contribution-row.open .collapse-icon { transform: rotate(180deg); } + +.contribution-row-detail { + padding: 0 16px 16px 16px; + border-top: 1px solid #f0f0f0; + display: none; +} + +.contribution-row.open .contribution-row-detail { display: block; } + +.detail-layout { display: flex; gap: 16px; margin-top: 12px; margin-bottom: 12px; } + +.detail-map { + width: 220px; + height: 170px; + border-radius: 6px; + border: 1px solid var(--color-border); + flex-shrink: 0; + background: #f0f0f0; +} + +.detail-content { flex: 1; min-width: 0; } +.detail-content .description { font-size: 0.85rem; line-height: 1.5; color: var(--color-text-secondary); margin-bottom: 10px; } +.detail-content .description.empty { color: #bbb; font-style: italic; } + +.detail-meta { font-size: 0.8rem; color: #999; display: flex; flex-direction: column; gap: 4px; } +.detail-meta span { display: flex; align-items: center; gap: 6px; } + +.action-buttons { + display: flex; + gap: 8px; + flex-wrap: wrap; + padding-top: 12px; + border-top: 1px solid #f0f0f0; } /* ----------------------------------------------------------------- - SweetAlert Font Override + 5.6 Placeholder Tabs ----------------------------------------------------------------- */ -.swal2-input, -.swal2-textarea { - font-family: var(--font-body) !important; -} +.placeholder-content { text-align: center; padding: 60px 20px; color: #bbb; } +.placeholder-content i { font-size: 2.5rem; margin-bottom: 12px; display: block; } +.placeholder-content p { font-size: 0.9rem; } /* ----------------------------------------------------------------- - Mobile Responsive Overrides + 5.7 Login Page ----------------------------------------------------------------- */ +.login-wrapper { display: flex; align-items: center; justify-content: center; min-height: 100vh; } + +.login-box { + background: var(--color-surface); + border-radius: 12px; + padding: 32px; + max-width: 380px; + width: 90%; + box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); + text-align: center; +} + +.login-box h1 { font-size: 1.3rem; margin-bottom: 8px; } +.login-box p { font-size: 0.85rem; color: var(--color-text-secondary); margin-bottom: 20px; } + +.login-box input[type="password"] { + width: 100%; + padding: 10px 12px; + border: 1px solid var(--color-border); + border-radius: 6px; + font-size: 0.9rem; + margin-bottom: 12px; + font-family: var(--font-body); +} + +.login-box input:focus { + outline: none; + border-color: var(--color-primary); + box-shadow: 0 0 0 3px rgba(0, 55, 109, 0.1); +} + +.login-box button { + width: 100%; + padding: 10px; + background: var(--color-primary); + color: white; + border: none; + border-radius: 6px; + font-size: 0.9rem; + font-weight: 600; + cursor: pointer; + font-family: var(--font-body); +} + +.login-box button:hover { filter: brightness(1.15); } + +.login-error { color: var(--color-error); font-size: 0.85rem; margin-bottom: 12px; } +.back-link { margin-top: 16px; font-size: 0.8rem; } +.back-link a { color: var(--color-text-secondary); } + + +/* ================================================================= + SECTION 6: Responsive Overrides + ================================================================= */ + @media (max-width: 768px) { :root { --header-height: 48px; --footer-height: 32px; - --map-side-padding: 0px; - } - - .header-title { - font-size: 0.9rem; } + /* Portal */ + .header-title { font-size: 0.9rem; } .header-nav { display: none; position: absolute; @@ -669,31 +920,28 @@ select.form-input { border-radius: 0 0 0 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); } + .header-nav.open { display: flex; } + .header-menu-toggle { display: block; } + .modal-content { padding: var(--space-lg); border-radius: 8px; } + .dev-warning { font-size: 0.6rem; left: var(--space-sm); } + .mouse-position-display { display: none; } - .header-nav.open { - display: flex; - } + /* Admin */ + .page-header { padding: 12px 16px; } + .page-header h1 { font-size: 1rem; } + .detail-layout { flex-direction: column; } + .detail-map { width: 100%; height: 180px; } + .contribution-row-summary .title { max-width: 200px; } + .action-buttons { flex-direction: column; } + .action-buttons .btn { justify-content: center; } + .filter-tabs { overflow-x: auto; } + .page-tabs { overflow-x: auto; } - .header-menu-toggle { - display: block; - } - - .nav-label { - display: inline; - } - - .modal-content { - padding: var(--space-lg); - border-radius: 8px; - } + /* Legal */ + .page-content-box { padding: 20px; } + .page-container { padding: 0 8px; } } - -/* ----------------------------------------------------------------- - Desktop Overrides - ----------------------------------------------------------------- */ @media (min-width: 769px) { - :root { - --map-side-padding: 8px; - } + :root { --map-side-padding: 8px; } } \ No newline at end of file