import { For, createEffect, createSignal, onMount } from "solid-js"; import { isServer } from "solid-js/web"; // Coordinates Konrad-Adenauer-Platz 50.7392935636551, 7.118113222838722 // curl -X 'GET' \ // 'https://v6.db.transport.rest/locations/nearby?results=8&stops=true&poi=false&linesOfStops=false&language=en&latitude=0&longitude=0' \ // -H 'accept: application/json' const data = [ { name: "Konrad-Adenauer-Platz", time: "<1min", distance: "<10m", }, { name: "Beuel-Rathaus", time: "5min", distance: "350m", }, { name: "Bonn Hermannstr./Konrad-Adenauer-Platz", time: "9min", distance: "650m", }, { name: "Bonn Rheindorfer Str.", time: "5min", distance: "400m", }, { name: "Bonn Goetheallee", time: "10min", distance: "650m", }, { name: "Bonn Beuel Hallenbad", time: "11min", distance: "750m", }, { name: "Doktor-Weis-Platz", time: "9min", distance: "600m", }, { name: "Bonn Obere Wilhelmstr.", time: "10min", distance: "650m", }, { name: "Beueler Bahnhofsplatz", time: "10min", distance: "700m", }, { name: "Bonn Beuel Bf", time: "13min", distance: "900m", }, { name: "I need", time: "<1min", distance: "<10m", }, { name: "More data", time: "5min", distance: "350m", }, { name: "To see", time: "9min", distance: "650m", }, { name: "How scroll behaves", time: "5min", distance: "400m", }, ]; export default function Home() { const observer = isServer ? undefined : new IntersectionObserver((entries) => { console.debug("IntersectionObserver", entries[0].intersectionRatio); }); const [isScrolled, setIsScrolled] = createSignal(false); if (!isServer) { document.addEventListener("scroll", () => setIsScrolled(window.scrollY > 0), ); } return ( <>

Transa

{/*TODO adjust padding bottom to match height of input area */}
    {/* TODO add next departure line icon and time */} {/* TODO add map and A/B tests */} {/* TODO add that ticket sale, management and information is out of scope. That's why the navigation options are limited and focus is on public transport not long distance travel */} {(item) => (
  1. {item.name}

    {/* TODO how to align text with SVG without flex */}

    {/* Trailing supporting text */} {item.distance} {/*

    {item.distance}

    */}
  2. )}
{/*
Switch view
*/}
{/* As the naviation UI is bottom to top, we should make the search use the same to be not confusing. Also don't you first think of where you want to go and not where you are right now? */} {/* animation moving bottom sheet for search into view to get focus from user */}
Go
); }