add dashboard to home
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import "../styles/components/fireworks-navigation.css";
|
||||
import "../styles/pages/fireworks-home.css";
|
||||
import "../styles/pages/map.css";
|
||||
import "../styles/pages/dashboard.css";
|
||||
import "../styles/theme.css";
|
||||
import "../scripts/theme.js";
|
||||
import "../scripts/manual-report.js";
|
||||
import "../scripts/audio-upload.js";
|
||||
import "../scripts/event-map.js";
|
||||
@@ -92,7 +92,9 @@
|
||||
}
|
||||
|
||||
const range = document.getElementById("range");
|
||||
document.querySelectorAll("#from-date, #to-date").forEach((input) => {
|
||||
input.addEventListener("change", () => { range.value = "custom"; });
|
||||
});
|
||||
if (range) {
|
||||
document.querySelectorAll("#from-date, #to-date").forEach((input) => {
|
||||
input.addEventListener("change", () => { range.value = "custom"; });
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
:root {
|
||||
--dashboard-ink: #edf3ff;
|
||||
--dashboard-muted: #aab9d8;
|
||||
--dashboard-line: #2b3d68;
|
||||
--dashboard-surface: #111a31;
|
||||
--dashboard-surface-raised: #172443;
|
||||
}
|
||||
body.dashboard-page {
|
||||
display: block;
|
||||
min-width: 320px;
|
||||
min-height: 100vh;
|
||||
margin: 0;
|
||||
color: var(--dashboard-ink);
|
||||
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
||||
background: radial-gradient(circle at 8% 0%, #263a76 0, transparent 31rem), radial-gradient(circle at 96% 100%, #512363 0, transparent 29rem), #090e1d;
|
||||
}
|
||||
.dashboard-shell { width: min(100% - 2.5rem, 70rem); margin: 0 auto; padding: clamp(2rem, 6vw, 5rem) 0; }
|
||||
.dashboard-intro { max-width: 44rem; margin-bottom: 2rem; }
|
||||
.dashboard-kicker { margin: 0 0 .8rem; color: #bfdbfe; font-size: .76rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
|
||||
.dashboard-intro h1 { max-width: 11ch; margin: 0; color: var(--dashboard-ink); font-size: clamp(2.8rem, 7vw, 5.5rem); line-height: .94; letter-spacing: -.065em; }
|
||||
.dashboard-intro p:last-child { max-width: 42rem; margin: 1.25rem 0 0; color: var(--dashboard-muted); font-size: clamp(1rem, 2vw, 1.16rem); line-height: 1.65; }
|
||||
.dashboard-section { margin-top: 2.25rem; }
|
||||
.dashboard-section__header { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: 0 0 1rem; }
|
||||
.dashboard-section__header h2 { margin: .25rem 0 0; color: var(--dashboard-ink); font-size: clamp(1.65rem, 4vw, 2.3rem); letter-spacing: -.045em; }
|
||||
.dashboard-section__header .dashboard-kicker { margin-bottom: .3rem; }
|
||||
.dashboard-link { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .7rem 1rem; border: 1px solid #789ed7; border-radius: .7rem; color: #dceaff; font-size: .9rem; font-weight: 800; text-decoration: none; background: #1b2e52; transition: transform .2s ease, background .2s ease; }
|
||||
.dashboard-link:hover { transform: translateY(-1px); background: #274574; }
|
||||
.dashboard-report { position: relative; overflow: hidden; padding: clamp(1.35rem, 4vw, 2.4rem); border: 1px solid #b86c2a; border-radius: 1.35rem; background: linear-gradient(135deg, #4a2b16e8, #171225dd); box-shadow: 0 1.5rem 4rem #02061680; }
|
||||
.dashboard-report::after { content: ""; position: absolute; width: 17rem; height: 17rem; right: -9rem; top: -10rem; border-radius: 50%; background: #ffb4541f; pointer-events: none; }
|
||||
.dashboard-report > * { position: relative; }
|
||||
.dashboard-report .eyebrow { margin: 0 0 .7rem; color: #ffd08a; font-size: .76rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
|
||||
.dashboard-report .eyebrow::before { content: ""; display: inline-block; width: .5rem; height: .5rem; margin-right: .45rem; border-radius: 50%; background: #ffbd62; box-shadow: 0 0 0 .25rem #fbbf2430; }
|
||||
.dashboard-report .manual-report__title { max-width: 14ch; margin: 0 0 .6rem; color: #fff6e7; font-size: clamp(2rem, 5vw, 3.4rem); line-height: .98; letter-spacing: -.06em; }
|
||||
.dashboard-report .manual-report__intro { max-width: 42rem; margin: 0 0 1.35rem; color: #f3c8a3; line-height: 1.55; }
|
||||
.dashboard-report .manual-report__label { display: block; margin-bottom: .5rem; color: #fff2df; font-weight: 800; }
|
||||
.dashboard-report #manual-occurrences { width: min(100%, 36rem); min-height: 3.25rem; display: block; margin-bottom: 1rem; padding: .75rem .9rem; border: 1px solid #e2934a; border-radius: .75rem; color: #edf3ff; font: inherit; font-weight: 800; background: #151b31; }
|
||||
.dashboard-report .manual-direction-panel { width: min(100%, 36rem); margin: 0 0 1rem; padding: 1rem; border: 1px solid #8d5bb5; border-radius: .75rem; background: #241b38; }
|
||||
.dashboard-report .manual-direction-panel__heading { display: block; margin-bottom: .35rem; }.dashboard-report .manual-direction-panel__heading span { color: #c7b5eb; font-weight: 600; }.dashboard-report .manual-direction-panel__copy { margin: 0 0 .75rem; color: #d4c6ef; font-size: .88rem; line-height: 1.45; }.dashboard-report .manual-direction-panel__button { min-height: 2.75rem; padding: .65rem .9rem; border: 1px solid #c3a5eb; border-radius: .65rem; color: #211234; font: inherit; font-weight: 850; background: #d8c1fb; cursor: pointer; }.dashboard-report .manual-direction-panel__status { min-height: 1.4rem; margin-top: .7rem; color: #e5dcf7; font-size: .9rem; }
|
||||
.dashboard-report .manual-report__submit { width: min(100%, 36rem); min-height: 4.5rem; border: 0; border-radius: 1rem; color: #281306; font: inherit; font-size: clamp(1.05rem, 2vw, 1.3rem); font-weight: 900; background: linear-gradient(135deg, #ffd18c, #ff8f5b); box-shadow: 0 .75rem 1.8rem #d664344d; cursor: pointer; }.dashboard-report .manual-report__submission { min-height: 1.5rem; margin-top: 1rem; color: #ffd18c; }
|
||||
.dashboard-map .map { height: clamp(22rem, 48vh, 34rem); }.dashboard-map .map-header { background: #121d37; }.dashboard-map .legend { display: none; }
|
||||
.dashboard-upload { padding: clamp(1rem, 3vw, 1.5rem); }
|
||||
.dashboard-upload .drop-zone { min-height: 12rem; }
|
||||
@media (max-width: 42rem) { .dashboard-shell { width: min(100% - 1.25rem, 70rem); }.dashboard-section__header { align-items: flex-start; flex-direction: column; }.dashboard-link { width: 100%; }.dashboard-map .map { height: 23rem; } }
|
||||
:root[data-theme="light"] body.dashboard-page { --dashboard-ink: #172b50; --dashboard-muted: #596d88; --dashboard-line: #cbd9ed; --dashboard-surface: #fff; --dashboard-surface-raised: #f4f8ff; background: radial-gradient(circle at 8% 0%, #dbeaff 0, transparent 31rem), radial-gradient(circle at 96% 100%, #eee2ff 0, transparent 29rem), #f4f7fc; }
|
||||
:root[data-theme="light"] .dashboard-intro h1, :root[data-theme="light"] .dashboard-section__header h2 { color: #172b50 !important; }
|
||||
:root[data-theme="light"] .dashboard-kicker { color: #3f6fa9 !important; }
|
||||
:root[data-theme="light"] .dashboard-link { border-color: #9fc0e9; color: #234a7b; background: #e6f0ff; }.dashboard-link:hover { background: #d8e8ff; }
|
||||
:root[data-theme="light"] .dashboard-report { border-color: #eca851; background: linear-gradient(145deg, #fff8ef, #ffe0bb); box-shadow: 0 1.4rem 3.4rem rgba(116, 69, 25, .18); }
|
||||
:root[data-theme="light"] .dashboard-report .eyebrow { color: #9f4d16 !important; }:root[data-theme="light"] .dashboard-report .manual-report__title { color: #4a2510 !important; }:root[data-theme="light"] .dashboard-report .manual-report__intro { color: #70411d !important; }:root[data-theme="light"] .dashboard-report .manual-report__label { color: #54311b; }:root[data-theme="light"] .dashboard-report #manual-occurrences { border-color: #dfaa68; color: #322014; background: #fffdfa; }:root[data-theme="light"] .dashboard-report .manual-direction-panel { border-color: #d9b4d8; background: #fff5fc; }:root[data-theme="light"] .dashboard-report .manual-direction-panel__heading { color: #492846; }:root[data-theme="light"] .dashboard-report .manual-direction-panel__heading span { color: #70466d; }:root[data-theme="light"] .dashboard-report .manual-direction-panel__copy { color: #694b68; }:root[data-theme="light"] .dashboard-report .manual-direction-panel__button { border-color: #b68bb5; color: #321a34; background: #ead2eb; }:root[data-theme="light"] .dashboard-report .manual-direction-panel__status { color: #6b4267; }:root[data-theme="light"] .dashboard-report .manual-report__submission { color: #87421b; }
|
||||
:root[data-theme="light"] .dashboard-map .map-header { background: #f2f6fc !important; }
|
||||
|
||||
.dashboard-page .profile-circle { display: grid; width: 3rem; height: 3rem; position: fixed; top: 1.25rem; right: 1.25rem; place-items: center; border: 1px solid #d0c0ff; border-radius: 50%; z-index: 1201; color: #17132b; font-weight: 900; text-decoration: none; background: linear-gradient(135deg, #fcd34d, #c4a5fd); box-shadow: 0 .5rem 1.5rem #01030c66; }.dashboard-page .profile-circle:focus-visible { outline: 3px solid #a5c9ff80; outline-offset: 3px; }
|
||||
Reference in New Issue
Block a user