{"id":20828763,"url":"https://github.com/perty/elm-spa-navigation","last_synced_at":"2025-07-25T10:38:09.507Z","repository":{"id":137743771,"uuid":"119051834","full_name":"perty/elm-spa-navigation","owner":"perty","description":null,"archived":false,"fork":false,"pushed_at":"2018-01-27T10:39:57.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-12T07:44:26.639Z","etag":null,"topics":["elm-lang","spa"],"latest_commit_sha":null,"homepage":null,"language":"Elm","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/perty.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-26T12:59:55.000Z","updated_at":"2019-04-10T19:04:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"66def1ef-57d6-4f8a-be38-52c337984745","html_url":"https://github.com/perty/elm-spa-navigation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/perty/elm-spa-navigation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perty%2Felm-spa-navigation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perty%2Felm-spa-navigation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perty%2Felm-spa-navigation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perty%2Felm-spa-navigation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perty","download_url":"https://codeload.github.com/perty/elm-spa-navigation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perty%2Felm-spa-navigation/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266991271,"owners_count":24017740,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elm-lang","spa"],"created_at":"2024-11-17T23:18:23.211Z","updated_at":"2025-07-25T10:38:08.126Z","avatar_url":"https://github.com/perty.png","language":"Elm","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Elm SPA Navigation example\n\nThis is an empty example for my memory only.\n\nIt has a navigation bar that allows the user to think there are pages\nwhile there is not, so called SPA.\n\nIt is easy enough to split an application's pages in Elm using an indicator\nin the model. The trick is to support the back button in the browser\nwhich requires url parsing. As a bonus, you get bookmarkable pages.\n\nIn this example, the model has only one value, the route which indicates\nthe page the user is on.\n\nThe route is determined on startup so that users can land directly on, \nfor example, the contact page by appending \"/contact\".\n\nWhen the user clicks on a menu item or the list of posts, the Navigation.newUrl\nfunction appends the url to the browser history and sends it to the same\nURL parser that is used for the landing page handling. \n\nThe parser responds with a new message \"FollowRoute\" and the update \nfunction then updates the route value of the model.\n\nWhen the URL is \"/post/n\" where n is an integer, the route will have\nthe value (PostRoute n), demonstrating Elm's union type. \n\n## scripts\n\n### install.sh\n\nRuns npm install which is necessary for running the stand alone\nExpress server. \n\nRuns elm package install so that the Elm packages are installed.\n\n### run.sh\n\nRuns elm-make and then starts the Express server on \n[http://localhost:3000](http://localhost:3000)\n\nThere is always the alternative of running elm-react, of course.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperty%2Felm-spa-navigation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperty%2Felm-spa-navigation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperty%2Felm-spa-navigation/lists"}