diff --git a/public/images/background_train.jpg b/public/images/background_train.jpg new file mode 100644 index 0000000..ad74814 Binary files /dev/null and b/public/images/background_train.jpg differ diff --git a/src/components/events/EventsList.js b/src/components/events/EventsList.js index 71015b0..dd9ec50 100644 --- a/src/components/events/EventsList.js +++ b/src/components/events/EventsList.js @@ -97,8 +97,7 @@ export default function EventsList() { 1 5 - -
+ {" "} Events

Upcoming Events ({filtered.length})

@@ -138,56 +137,60 @@ export default function EventsList() { -
- {filtered.map((e) => { - const href = toHref(e.website || e.url || KATY_EVENTS_URL); - const Wrapper = href ? "a" : "div"; - const repeats = recurrenceLabel(e.recurrence); - - return ( - -
-
-
{e.title}
-
{e.category}
-
- -
{toDateLabel(e.start)}
- {repeats ?
{repeats}
: null} - - {e.locationName ? ( -
{e.locationName}
- ) : null} - {e.address ?
{e.address}
: null} - - {e.tags && e.tags.length ? ( -
- {e.tags.slice(0, 6).map((t) => ( - - {t} - - ))} +
+
+
+ {filtered.map((e) => { + const href = toHref(e.website || e.url || KATY_EVENTS_URL); + const Wrapper = href ? "a" : "div"; + const repeats = recurrenceLabel(e.recurrence); + + return ( + +
+
+
{e.title}
+
{e.category}
+
+ +
{toDateLabel(e.start)}
+ {repeats ?
{repeats}
: null} + + {e.locationName ? ( +
{e.locationName}
+ ) : null} + {e.address ?
{e.address}
: null} + + {e.tags && e.tags.length ? ( +
+ {e.tags.slice(0, 6).map((t) => ( + + {t} + + ))} +
+ ) : null} + +
+
+ {e.cost ? Cost: {e.cost} : null} +
+ {href ? ( + + View details → + + ) : null} +
- ) : null} - -
-
- {e.cost ? Cost: {e.cost} : null} -
- {href ? ( - - View details → - - ) : null} -
-
- - ); - })} + + ); + })} +
+
); diff --git a/src/components/home-page/home-page-resources/featured.css b/src/components/home-page/home-page-resources/featured.css index 6231086..c4614d8 100644 --- a/src/components/home-page/home-page-resources/featured.css +++ b/src/components/home-page/home-page-resources/featured.css @@ -41,9 +41,7 @@ background-color: rgba(96, 108, 56, 1); transition: .2s ease-in-out; } -.aspect:hover{ - box-shadow: 4px 5px rgb(0,0,0); -} + .featured-info h2 span{ font-size: 30px; margin-bottom: 5px; diff --git a/src/components/home-page/home-page.css b/src/components/home-page/home-page.css index 2605cfa..bbd79d9 100644 --- a/src/components/home-page/home-page.css +++ b/src/components/home-page/home-page.css @@ -8,6 +8,12 @@ animation: popup 1s ease-out forwards; } +@media (max-width: 860px) { + .polaroid-string { + display: none !important; + } +} + @keyframes popup { 100%{ diff --git a/src/components/home-page/home-page.js b/src/components/home-page/home-page.js index 020d73a..83496c9 100644 --- a/src/components/home-page/home-page.js +++ b/src/components/home-page/home-page.js @@ -2,47 +2,47 @@ import About from "./home-page-resources/about"; import Polaroid from "./home-page-resources/polaroid-pic"; import RetroBanner from "./retro-banner"; import "./home-page.css"; -import Tabbed from './home-page-resources/tabbed-section' -import Featured from './home-page-resources/featured-resource' +import Tabbed from "./home-page-resources/tabbed-section"; +import Featured from "./home-page-resources/featured-resource"; function Home() { const img = (p) => `${process.env.PUBLIC_URL}${p}`; return ( <> - +
+ -
-
- -
+
+
+ +
-
- -
+
+ +
-
- +
+ +
-
+
+ - - - ); } diff --git a/src/components/map/Map.js b/src/components/map/Map.js index b95f4c7..9847c89 100644 --- a/src/components/map/Map.js +++ b/src/components/map/Map.js @@ -16,7 +16,8 @@ L.Icon.Default.mergeOptions({ }); // Default center coordinates: 29°47'40.3"N 95°49'29.1"W (Katy, TX) -const center = [29.7945, -95.8248]; +// 29.939345, -95.304114 +const center = [29.730367, -95.578197]; function MapEventHandler({ onBoundsChange, isZoomingRef, mapRef }) { const map = useMap(); @@ -60,6 +61,7 @@ function Map() { const mapRef = useRef(null); const markersRef = useRef([]); const isZoomingRef = useRef(false); + const markerRefs = useRef({}); useEffect(() => { const validResources = resourcesData.filter( @@ -99,18 +101,24 @@ function Map() { }, []); const handleResourceClick = (resource) => { - if (mapRef.current) { - isZoomingRef.current = true; + if (!mapRef.current) return; - mapRef.current.flyTo([resource.lat, resource.lng], 16, { - animate: true, - duration: 0.8, - }); + isZoomingRef.current = true; - setTimeout(() => { - isZoomingRef.current = false; - }, 900); - } + const map = mapRef.current; + + map.once("moveend", () => { + const marker = markerRefs.current[resource.id]; + if (marker) { + marker.openPopup(); + } + isZoomingRef.current = false; + }); + + map.flyTo([resource.lat, resource.lng], 16, { + animate: true, + duration: 0.8, + }); }; return ( @@ -131,7 +139,7 @@ function Map() {
{ + if (ref && marker.resource.id) { + markerRefs.current[marker.resource.id] = ref; + } + }} >
diff --git a/src/components/resources/ResourcesList.js b/src/components/resources/ResourcesList.js index c1e927f..34f1c45 100644 --- a/src/components/resources/ResourcesList.js +++ b/src/components/resources/ResourcesList.js @@ -104,7 +104,7 @@ export default function ResourcesList() { >
-
{r.name}
+
{r.name}
{r.category}
@@ -119,18 +119,6 @@ export default function ResourcesList() { ))}
- -
-
- {r.phone ? {r.phone} : null} -
- {r.website ? ( - - Visit site → - - ) : null} -
- {r.hours || r.eligibility ? (
{r.hours ? ( @@ -145,6 +133,17 @@ export default function ResourcesList() { ) : null}
) : null} + +
+
+ {r.phone ? {r.phone} : null} +
+ {r.website ? ( + + Visit site → + + ) : null} +
); diff --git a/src/components/styles/pages.css b/src/components/styles/pages.css index 07bd4f6..33b7b82 100644 --- a/src/components/styles/pages.css +++ b/src/components/styles/pages.css @@ -44,6 +44,7 @@ display: grid; gap: 14px; width: 100%; + grid-template-columns: 1fr; } .resources-container { @@ -83,7 +84,19 @@ @media (min-width: 720px) { .card-grid { - grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); + grid-template-columns: repeat(2, minmax(0, 1fr)); + } +} + +@media (min-width: 1024px) { + .card-grid { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } +} + +@media (min-width: 1200px) { + .card-grid { + grid-template-columns: repeat(4, minmax(0, 1fr)); } } .filter-bar{ @@ -215,6 +228,14 @@ align-items: center; } +.info-card .meta-row { + margin-top: auto; +} + +.info-card .card-title { + font-weight: 700; +} + .info-card .muted { opacity: 0.8; font-family: 'DIN Condensed Web';