menambahkan fitur edit data pengguna dan memperbarui landing page

This commit is contained in:
powji17
2026-06-10 17:39:36 +07:00
parent 7c1b4375e7
commit 6158f4b1a4
16 changed files with 869 additions and 455 deletions
+247 -91
View File
@@ -1,83 +1,72 @@
/* ===== RESET & BASE ===== */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
height: 100vh; width: 100vw; margin: 0; padding: 0;
display: flex; font-family: Arial, sans-serif; overflow: hidden;
}
#sidebar {
width: 280px; background-color: #f8f9fa; padding: 20px;
box-shadow: 2px 0 5px rgba(0,0,0,0.2); z-index: 1000; overflow-y: auto;
}
#sidebar h3 { margin-top: 0; border-bottom: 2px solid #ddd; padding-bottom: 10px; }
/* Styling Ikon Mode */
.mode-selector { margin-bottom: 20px; }
.mode-buttons {
height: 100vh;
width: 100vw;
overflow: hidden;
display: flex;
justify-content: center;
gap: 8px;
margin-bottom: 8px;
}
.mode-btn {
flex: 0 0 auto; /* tidak melebar penuh */
width: 110px;
padding: 10px 8px;
text-align: center;
}
.mode-btn i { font-size: 24px; margin-bottom: 8px; display: block; }
.mode-btn:hover { background: #e9ecef; }
/* Warna saat tombol mode aktif */
.mode-btn.active[data-mode="point"] { border-color: #e74c3c; color: #e74c3c; background: #fadbd8; }
.mode-btn.active[data-mode="polyline"] { border-color: #3498db; color: #3498db; background: #d6eaf8; }
.mode-btn.active[data-mode="polygon"] { border-color: #2ecc71; color: #2ecc71; background: #d5f5e3; }
.mode-btn.active[data-mode="prasejahtera"] { border-color: #c0392b; color: #ffffff; background: #e74c3c; }
.mode-btn.active[data-mode="ibadah"] { border-color: #6c3483; color: #ffffff; background: #8e44ad; }
/* Styling tombol edit aktif */
.mode-btn.active[data-mode="edit_jalan"] { background-color: #f1c40f !important; color: white !important; }
.mode-btn.active[data-mode="edit_kavling"] { background-color: #27ae60 !important; color: white !important; }
/* Styling Input & Action Buttons */
.action-buttons {
display: none; background: #fff; padding: 15px;
border-radius: 8px; border: 1px solid #ddd; margin-top: 10px; margin-bottom: 20px;
font-family: 'Segoe UI', Arial, sans-serif;
}
.action-buttons input, .action-buttons select {
width: 100%; margin-bottom: 15px; padding: 8px; box-sizing: border-box;
border: 1px solid #ccc; border-radius: 4px;
/* ===== SIDEBAR ===== */
#sidebar {
width: 280px;
min-width: 280px;
background: white;
display: flex;
flex-direction: column;
padding: 0;
box-shadow: 2px 0 12px rgba(0,0,0,0.10);
z-index: 1000;
overflow-y: auto;
}
.action-buttons button {
width: 100%; padding: 10px; margin-bottom: 8px; cursor: pointer;
border-radius: 5px; font-weight: bold;
/* Header sidebar */
.sidebar-header {
background: #1B2A4A;
color: white;
padding: 18px 20px;
font-size: 16px;
font-weight: 700;
display: flex;
align-items: center;
gap: 10px;
letter-spacing: 0.3px;
flex-shrink: 0;
}
.btn-success { background-color: #2ecc71; color: white; border: none; }
.btn-danger { background-color: #e74c3c; color: white; border: none; }
#map-container { flex: 1; position: relative; }
#map { position: absolute; top: 0; bottom: 0; left: 0; right: 0; }
.sidebar-body {
padding: 16px;
display: flex;
flex-direction: column;
gap: 10px;
flex: 1;
}
/* ===== USER INFO ===== */
.user-info {
display: flex;
flex-direction: column;
align-items: center;
padding: 12px;
padding: 16px 12px;
background: #f0f4f8;
border-radius: 8px;
margin-bottom: 12px;
gap: 4px;
border-radius: 10px;
gap: 6px;
}
.user-info i {
font-size: 28px;
font-size: 32px;
color: #1B2A4A;
}
.user-info span {
font-weight: 600;
font-size: 14px;
font-weight: 700;
font-size: 15px;
color: #1B2A4A;
}
@@ -85,52 +74,219 @@ html, body {
font-size: 11px;
background: #1B2A4A;
color: white;
padding: 2px 8px;
padding: 3px 10px;
border-radius: 20px;
text-transform: uppercase;
letter-spacing: 0.5px;
}
/* ===== DIVIDER ===== */
.sidebar-divider {
height: 1px;
background: #e8edf2;
margin: 2px 0;
}
/* ===== LABEL SECTION ===== */
.sidebar-label {
font-size: 11px;
font-weight: 700;
color: #aab4c0;
text-transform: uppercase;
letter-spacing: 0.8px;
padding: 0 2px;
}
/* ===== TOMBOL MODE (Prasejahtera & Rumah Ibadah) ===== */
.mode-buttons {
display: flex;
gap: 8px;
justify-content: center;
}
.mode-btn {
flex: 1;
padding: 12px 6px;
background: #f0f4f8;
border: 2px solid transparent;
border-radius: 10px;
cursor: pointer;
font-size: 12px;
font-weight: 600;
color: #4a5568;
text-align: center;
transition: all 0.2s;
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
line-height: 1.3;
}
.mode-btn i {
font-size: 20px;
color: #1B2A4A;
display: block;
margin-bottom: 0;
}
.mode-btn:hover {
background: #e2e8f0;
border-color: #1B2A4A;
}
/* Warna saat tombol mode aktif */
.mode-btn.active,
.mode-btn.active[data-mode="prasejahtera"] {
background: #e74c3c;
border-color: #c0392b;
color: white;
}
.mode-btn.active i,
.mode-btn.active[data-mode="prasejahtera"] i {
color: white;
}
.mode-btn.active[data-mode="ibadah"],
.mode-btn.mode-ibadah.active {
background: #8e44ad;
border-color: #6c3483;
color: white;
}
.mode-btn.active[data-mode="ibadah"] i,
.mode-btn.mode-ibadah.active i {
color: white;
}
/* Mode lain (polyline, polygon, dll — tetap dipertahankan) */
.mode-btn.active[data-mode="point"] { border-color: #e74c3c; color: #e74c3c; background: #fadbd8; }
.mode-btn.active[data-mode="polyline"] { border-color: #3498db; color: #3498db; background: #d6eaf8; }
.mode-btn.active[data-mode="polygon"] { border-color: #2ecc71; color: #2ecc71; background: #d5f5e3; }
.mode-btn.active[data-mode="edit_jalan"] { background: #f1c40f; border-color: #d4ac0d; color: white; }
.mode-btn.active[data-mode="edit_kavling"] { background: #27ae60; border-color: #1e8449; color: white; }
/* ===== ACTION BUTTONS (panel dalam sidebar, dipertahankan) ===== */
.action-buttons {
display: none;
background: #fff;
padding: 15px;
border-radius: 8px;
border: 1px solid #ddd;
margin-top: 4px;
}
.action-buttons input,
.action-buttons select {
width: 100%;
margin-bottom: 15px;
padding: 8px;
box-sizing: border-box;
border: 1px solid #ccc;
border-radius: 4px;
}
.action-buttons button {
width: 100%;
padding: 10px;
margin-bottom: 8px;
cursor: pointer;
border-radius: 5px;
font-weight: bold;
}
.btn-success { background-color: #2ecc71; color: white; border: none; }
.btn-danger { background-color: #e74c3c; color: white; border: none; }
/* ===== MENU LINK (Kelola User) ===== */
.menu-link {
display: flex;
align-items: center;
gap: 10px;
padding: 11px 14px;
background: #f0f4f8;
border-radius: 10px;
text-decoration: none;
font-size: 14px;
font-weight: 600;
color: #1B2A4A;
transition: background 0.2s;
width: 100%;
border: none;
cursor: pointer;
}
.menu-link:hover { background: #e2e8f0; }
/* ===== VIEWER INFO ===== */
.viewer-info {
font-size: 13px;
color: #888;
text-align: center;
margin-bottom: 10px;
}
.btn-login, .btn-logout, .menu-link {
display: block;
width: 100%;
padding: 10px;
text-align: center;
border-radius: 8px;
font-size: 14px;
font-weight: 600;
text-decoration: none;
margin-bottom: 8px;
cursor: pointer;
border: none;
padding: 12px;
background: #f0f4f8;
border-radius: 10px;
}
/* ===== TOMBOL LOGIN & LOGOUT ===== */
.btn-login {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 12px;
background: #1B2A4A;
color: white;
}
.btn-logout {
background: #fdecea;
color: #c0392b;
}
.menu-link,
.btn-logout,
.btn-login {
width: auto; /* tidak full width lagi */
display: block;
margin: 0 auto 8px auto;
padding: 10px 24px;
text-align: center;
border-radius: 10px;
text-decoration: none;
font-size: 14px;
font-weight: 600;
transition: background 0.2s;
width: 100%;
border: none;
cursor: pointer;
}
.btn-login:hover { background: #253d6e; }
.btn-logout {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 11px;
background: #fdecea;
color: #c0392b;
border-radius: 10px;
text-decoration: none;
font-size: 14px;
font-weight: 600;
border: none;
cursor: pointer;
transition: background 0.2s;
width: 100%;
margin-top: auto;
}
.btn-logout:hover { background: #f5b7b1; }
.menu-link:hover { background: #dce4f0; }
/* ===== MAP CONTAINER ===== */
#map-container {
flex: 1;
position: relative;
}
#map {
position: absolute;
top: 0; bottom: 0; left: 0; right: 0;
}
/* ===== LAYER CONTROL ===== */
.leaflet-control-layers {
border-radius: 10px !important;
border: none !important;
box-shadow: 0 2px 12px rgba(0,0,0,0.12) !important;
font-family: 'Segoe UI', Arial, sans-serif !important;
font-size: 13px !important;
}