Skip to content

Commit 0dc1ef9

Browse files
committed
Missing contact page to routes, background adjustment, stub of map background on contact page.
1 parent 9c70a12 commit 0dc1ef9

File tree

5 files changed

+126
-9
lines changed

5 files changed

+126
-9
lines changed

src/app-routes.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export const ROUTES = {
1010
api: () => import('@features/dashboard/dashboard-api.js').then(m => m.fetchDashboardData()),
1111
dataKey: 'dashboardData'
1212
},
13+
'contact': { path: '@features/contact/contact.js' },
1314
'navigation': { path: '@features/navigation/navigation.js' },
1415
'not-found': { path: '@features/not-found/not-found.js' }
1516
};

src/features/contact/contact.css

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,40 @@
11
:host {
22
display: block;
3-
min-height: 100%;
3+
position: relative;
4+
isolation: isolate;
45
padding: var(--space-m);
56
}
67

8+
/* Background elements removed to prevent view transition conflicts with nav dock */
9+
/* #map-background {
10+
position: fixed;
11+
inset: 0;
12+
z-index: -2;
13+
opacity: 0.6;
14+
background: #0d0d0d;
15+
filter: grayscale(100%) contrast(1.2);
16+
pointer-events: none;
17+
}
18+
19+
.map-overlay {
20+
position: fixed;
21+
inset: 0;
22+
background: radial-gradient(circle at center, transparent 0%, var(--color-background) 100%);
23+
z-index: -1;
24+
pointer-events: none;
25+
} */
26+
727
.contact-container {
828
max-width: 600px;
929
margin: 0 auto;
1030
display: flex;
1131
flex-direction: column;
1232
gap: var(--space-l);
33+
padding: var(--space-m);
34+
35+
/* Ensure content is above map */
36+
position: relative;
37+
z-index: 1;
1338
}
1439

1540
h1 {
@@ -20,12 +45,39 @@ h1 {
2045
-webkit-background-clip: text;
2146
background-clip: text;
2247
-webkit-text-fill-color: transparent;
48+
/* Pop against map */
49+
}
50+
51+
:host([data-theme="light"]) h1 {
52+
background: linear-gradient(to right, var(--color-foreground), #000);
53+
-webkit-background-clip: text;
54+
background-clip: text;
55+
text-shadow: none;
56+
/* Shadow can look muddy in light mode */
2357
}
2458

2559
.contact-form {
2660
display: flex;
2761
flex-direction: column;
2862
gap: var(--space-m);
63+
/* slight boost to card opacity if needed, but glass-card handles it */
64+
backdrop-filter: blur(8px);
65+
66+
/* Opaque backgrounds for readability over map */
67+
background: rgba(10, 10, 10, 0.8);
68+
}
69+
70+
.contact-form:hover {
71+
background: rgba(15, 15, 15, 0.85);
72+
/* Maintain opacity on hover */
73+
}
74+
75+
:host([data-theme="light"]) .contact-form {
76+
background: rgba(255, 255, 255, 0.85);
77+
}
78+
79+
:host([data-theme="light"]) .contact-form:hover {
80+
background: rgba(255, 255, 255, 0.95);
2981
}
3082

3183
.actions {

src/features/contact/contact.js

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { BaseComponent } from '@shared/base-component.js';
22
import { state } from '@state';
33
import { FormValidator } from '@shared/form-validator.js';
44
import '@shared/custom-input.js';
5+
// import L from 'https://esm.sh/leaflet@1.9.4';
56

67
class ContactUI extends BaseComponent {
78

@@ -10,6 +11,12 @@ class ContactUI extends BaseComponent {
1011
const formsCssPath = new URL('../../shared/styles/forms.css', import.meta.url).href;
1112
await this.addExternalStyles(cssPath);
1213
await this.addExternalStyles(formsCssPath);
14+
// Load Leaflet CSS from CDN
15+
// await this.addExternalStyles('https://unpkg.com/leaflet@1.9.4/dist/leaflet.css');
16+
}
17+
18+
async connectedCallback() {
19+
await super.connectedCallback();
1320
}
1421

1522
async onRendered() {
@@ -26,12 +33,47 @@ class ContactUI extends BaseComponent {
2633
// Explicitly bind the submit listener to the Shadow form
2734
this.form.addEventListener('submit', (e) => this.handleSubmit(e));
2835
}
36+
37+
// Initialize Leaflet Map - DISABLED due to view transition conflicts with nav dock
38+
/*
39+
const mapEl = this.shadowRoot.getElementById('map-background');
40+
if (mapEl) {
41+
// Fix for Leaflet image path in Shadow DOM/Module context if needed
42+
// but usually for tiles we specify URL. Markers might need help but we aren't using markers yet.
43+
44+
this.map = L.map(mapEl, {
45+
zoomControl: false,
46+
scrollWheelZoom: false,
47+
doubleClickZoom: false,
48+
boxZoom: false,
49+
keyboard: false,
50+
dragging: false,
51+
attributionControl: false
52+
}).setView([47.6062, -122.3321], 12); // Seattle coordinates
53+
54+
// Dark Matter tiles by CartoDB
55+
L.tileLayer('https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png', {
56+
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors &copy; <a href="https://carto.com/attributions">CARTO</a>',
57+
subdomains: 'abcd',
58+
maxZoom: 20
59+
}).addTo(this.map);
60+
61+
// Force a redraw to ensure full coverage in fixed container
62+
setTimeout(() => this.map?.invalidateSize(), 100);
63+
}
64+
*/
2965
}
3066

3167
disconnectedCallback() {
3268
if (this.validator && this.validator._currentController) {
3369
this.validator._currentController.abort();
3470
}
71+
72+
// if (this.map) {
73+
// this.map.remove();
74+
// this.map = null;
75+
// }
76+
3577
super.disconnectedCallback();
3678
}
3779

@@ -80,6 +122,9 @@ class ContactUI extends BaseComponent {
80122

81123
render() {
82124
this.shadowRoot.innerHTML = `
125+
<!-- Map disabled due to view transition conflicts with nav dock -->
126+
<!-- <div id="map-background"></div> -->
127+
<!-- <div class="map-overlay"></div> -->
83128
<div class="contact-container fade-in">
84129
<h1>Get in Touch</h1>
85130

src/features/navigation/navigation.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ button.nav-link {
7575
left: 50%;
7676
transform: translateX(-50%);
7777
background: var(--dock-bg);
78-
backdrop-filter: blur(20px);
79-
-webkit-backdrop-filter: blur(20px);
78+
backdrop-filter: blur(8px);
79+
-webkit-backdrop-filter: blur(8px);
8080
padding: var(--space-s);
8181
border-radius: var(--space-xl);
8282
border: 1px solid var(--dock-border);

src/shared/styles/theme.css

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,22 @@ body {
167167
min-height: 100vh;
168168
text-rendering: optimizeSpeed;
169169

170-
/* Modern Mesh Gradient Background */
170+
/* Gritty Modern Background - Dark Mode */
171171
background-color: var(--color-bg);
172172
background-image:
173-
radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08), transparent 25%),
174-
radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08), transparent 25%);
173+
/* Noise texture overlay */
174+
url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E"),
175+
/* Industrial accent glow */
176+
radial-gradient(ellipse 80% 50% at 20% 40%, rgba(59, 130, 246, 0.12), transparent 50%),
177+
radial-gradient(ellipse 60% 80% at 80% 20%, rgba(139, 92, 246, 0.08), transparent 50%),
178+
/* Subtle vignette */
179+
radial-gradient(ellipse 150% 100% at 50% 0%, transparent 60%, rgba(0, 0, 0, 0.4) 100%),
180+
/* Grid overlay */
181+
linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
182+
linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
183+
background-size: 256px 256px, 100% 100%, 100% 100%, 100% 100%, 60px 60px, 60px 60px;
175184
background-attachment: fixed;
185+
background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
176186

177187
color: var(--color-foreground);
178188
font-family: var(--font-sans);
@@ -268,11 +278,20 @@ pre {
268278
border-radius: 4px;
269279
}
270280

271-
/* Light Mode Override for Airy Vibe */
281+
/* Light Mode Override - Gritty but Airy */
272282
:root[data-theme="light"] body {
273283
background-image:
274-
radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.03), transparent 40%),
275-
radial-gradient(circle at 100% 100%, rgba(236, 72, 153, 0.03), transparent 40%);
284+
/* Subtle noise texture */
285+
url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.025'/%3E%3C/svg%3E"),
286+
/* Warm industrial accents */
287+
radial-gradient(ellipse 80% 60% at 10% 20%, rgba(59, 130, 246, 0.06), transparent 50%),
288+
radial-gradient(ellipse 70% 70% at 90% 80%, rgba(236, 72, 153, 0.05), transparent 50%),
289+
/* Soft vignette */
290+
radial-gradient(ellipse 120% 100% at 50% 100%, transparent 70%, rgba(0, 0, 0, 0.03) 100%),
291+
/* Grid overlay */
292+
linear-gradient(rgba(0, 0, 0, 0.015) 1px, transparent 1px),
293+
linear-gradient(90deg, rgba(0, 0, 0, 0.015) 1px, transparent 1px);
294+
background-size: 256px 256px, 100% 100%, 100% 100%, 100% 100%, 60px 60px, 60px 60px;
276295
}
277296

278297
a:not([class]) {

0 commit comments

Comments
 (0)