diff --git a/src/components/badges.tsx b/src/components/badges.tsx
index d18546ea..3d684705 100644
--- a/src/components/badges.tsx
+++ b/src/components/badges.tsx
@@ -48,8 +48,12 @@ const badgeOutline = (text: string) => {
}
};
-export function DirectionBadge(props: { direction: string }) {
- return {props.direction};
+export function DirectionBadge(props: { direction: string; type?: string }) {
+ const classList =
+ props.type === "standalone"
+ ? [style["line-badge"], style.standalone]
+ : [style["line-badge"]];
+ return {props.direction};
}
export function TtcBadge(props: { lineNum: string; type?: string }) {
diff --git a/src/components/etaCard/EtaCard.module.css b/src/components/etaCard/EtaCard.module.css
index b76b6484..299b89d9 100644
--- a/src/components/etaCard/EtaCard.module.css
+++ b/src/components/etaCard/EtaCard.module.css
@@ -1,13 +1,12 @@
.badge-group {
- padding-bottom: 8px;
padding-right: 8px;
display: grid;
- grid-template-rows: repeat(3, 1fr);
gap: 4px;
- grid-auto-flow: column;
+ grid-template-rows: repeat(3, 1fr);
+ height: fit-content;
&.overflow {
- grid-template-columns: repeat(2, 1fr);
+ /* grid-template-columns: repeat(2, 1fr); */
grid-auto-flow: unset;
}
}
@@ -33,9 +32,14 @@
border-radius: 50% !important;
}
-.eta-card-countdown > * {
- flex-wrap: wrap;
- float: right;
+.eta-card-countdown {
+ min-width: max-content;
+
+ & > * {
+ flex-wrap: wrap;
+ float: right;
+ width: min-content;
+ }
}
.bookmarked-stop {
@@ -57,14 +61,11 @@
.multi-line {
white-space: pre-line;
-}
-
-@media (width >= 800px) {
- .eta-card-countdown {
- min-width: 160px;
- }
- .eta-card-countdown > * {
- flex-wrap: nowrap;
+ .direction-badges {
+ display: inline-flex;
+ flex-wrap: wrap;
+ gap: 4px;
+ padding-right: 4px;
}
}
diff --git a/src/components/etaCard/EtaCard.tsx b/src/components/etaCard/EtaCard.tsx
index f569b55f..a1900578 100644
--- a/src/components/etaCard/EtaCard.tsx
+++ b/src/components/etaCard/EtaCard.tsx
@@ -25,6 +25,7 @@ export function EtaCard(props: {
etas: EtaBusWithID[];
lines: string[];
name: string;
+ distance?: string;
editable: boolean;
onDelete?: () => void;
stopUrl: string;
@@ -34,13 +35,11 @@ export function EtaCard(props: {
}) {
const uniqueLines = [...new Set(props.lines)];
const directionArray = props.direction?.split(", ") ?? [];
+ const classList = (props.editable ? [style["card-with-button"]] : []).concat([
+ "eta-card",
+ ]);
return (
-
+
{uniqueLines.map((line: string) => {
return (
-
+
);
})}
- {directionArray.length > 0 &&
- directionArray.map((direction) => (
-
- ))}
- {props.name}
+
+ {directionArray.length > 0 &&
+ directionArray.map((direction) => (
+
+ ))}
+
+ {props.name}
+ {props.distance && (
+ <>
+
+ {props.distance}
+ >
+ )}
>
}
diff --git a/src/components/nearby/NearbyList.module.css b/src/components/nearby/NearbyList.module.css
index 09bb69ef..d73d073b 100644
--- a/src/components/nearby/NearbyList.module.css
+++ b/src/components/nearby/NearbyList.module.css
@@ -1,6 +1,6 @@
.nearby-stops-list {
display: grid;
- grid-template-columns: repeat(auto-fit, 1fr);
+ grid-template-columns: 100%;
gap: 24px;
margin: 20px 0;
padding-left: 0;
diff --git a/src/components/nearby/NearbyList.tsx b/src/components/nearby/NearbyList.tsx
index a1527ead..9edc7c16 100644
--- a/src/components/nearby/NearbyList.tsx
+++ b/src/components/nearby/NearbyList.tsx
@@ -57,7 +57,7 @@ export default function NearbyList(props: {
}, [props.coordinate]);
return (
-
+ <>
{props.coordinate.lat && props.coordinate.lon ? (
<>
{t("nearby.closestStopsLead")}
@@ -71,6 +71,6 @@ export default function NearbyList(props: {
{t("nearby.locationNeeded")}
)}
-
+ >
);
}
diff --git a/src/components/nearby/NearbyStopCard.tsx b/src/components/nearby/NearbyStopCard.tsx
index 1709b874..7bd3b129 100644
--- a/src/components/nearby/NearbyStopCard.tsx
+++ b/src/components/nearby/NearbyStopCard.tsx
@@ -67,7 +67,8 @@ export default function NearbyStopCard({ stop }: { stop: StopWithDistance }) {
key={stop.id}
direction={direction}
lines={lines}
- name={`${stop.title}\n${stop.realDistance.toPrecision(4)}${t("nearby.mAway")}`}
+ name={`${stop.title}`}
+ distance={`${stop.realDistance.toPrecision(4)}${t("nearby.mAway")}`}
id={stop.id}
stopUrl={url}
etas={unifiedEta}
diff --git a/src/routes/Search.module.css b/src/routes/Search.module.css
index 66c554a8..660240e6 100644
--- a/src/routes/Search.module.css
+++ b/src/routes/Search.module.css
@@ -17,7 +17,6 @@
border: black solid 8px;
max-width: min(100%, 30rem);
margin: auto;
- width: max-content;
.title {
background-color: black;