diff --git a/src/panels/Fahrplan/components/PlanElement.tsx b/src/panels/Fahrplan/components/PlanElement.tsx index c938618a2eb83a8eca3445fa0be005ff397f52b6..f67f41473579dd3962a7ff8b336139e6387732b5 100644 --- a/src/panels/Fahrplan/components/PlanElement.tsx +++ b/src/panels/Fahrplan/components/PlanElement.tsx @@ -43,16 +43,17 @@ const PlanElement = (props: { <motion.div className={"overflow-hidden"} initial={{ - opacity: 0, - translateX: "-100%" + opacity: 1, + translateY: "0%", + marginTop: "0rem" }} animate={shown ? { opacity: 1, - translateX: "0%", + translateY: "0%", marginTop: "0rem" } : { opacity: 0, - translateX: "100%", + translateY: "-100%", height: 0, marginTop: "-0.75rem" }} @@ -114,10 +115,14 @@ const trainIdentifierToColor = (identifier: string): string => { const deDortmund = (input: string): string => { // Don't remove the city from central station location - if (input.toLowerCase().includes("HBf")) { + if (input.includes("Hbf")) { return input; } - // In all other cases, remove dortmund - return input.replaceAll("Dortmund ", ""); + + return input + // In all other cases, remove dortmund + .replaceAll("Dortmund/Joseph Fraunhofer", "Joseph-von-Fraunhofer") + // Special case: Because the API is dumb, translate JvF to be consistent + .replaceAll("Dortmund ", ""); }