{"id":22864586,"url":"https://github.com/darcdev/router-spa-vainilla","last_synced_at":"2025-03-31T09:45:10.908Z","repository":{"id":117532103,"uuid":"257736963","full_name":"darcdev/Router-SPA-Vainilla","owner":"darcdev","description":"Vainilla Javascript router creation workshop","archived":false,"fork":false,"pushed_at":"2020-04-21T23:13:28.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-06T14:22:56.786Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/darcdev.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":"2020-04-21T23:09:23.000Z","updated_at":"2020-04-21T23:13:30.000Z","dependencies_parsed_at":"2023-07-09T16:31:58.927Z","dependency_job_id":null,"html_url":"https://github.com/darcdev/Router-SPA-Vainilla","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darcdev%2FRouter-SPA-Vainilla","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darcdev%2FRouter-SPA-Vainilla/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darcdev%2FRouter-SPA-Vainilla/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darcdev%2FRouter-SPA-Vainilla/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darcdev","download_url":"https://codeload.github.com/darcdev/Router-SPA-Vainilla/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246450403,"owners_count":20779406,"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","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":[],"created_at":"2024-12-13T11:28:36.737Z","updated_at":"2025-03-31T09:45:10.888Z","avatar_url":"https://github.com/darcdev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Router Single Page Application (SPA)\n\n## Vanilla Javascript router creation workshop\n\n## Steps \n\n**Load the route**\n\tIdentify where we are on the site. (Initial load of the route).\n\t\t\n    loadInitialRoute ()\n\n**Compare the URL with a path**\nThe URL to which it moves us, must be compared with the routes we have.\n\n    matchUrlToRoute ()\n\n**Update the URL in the navigation bar**\nFor this we will use the HTML pushState method. \n\n`windows.history.pushState({},title,url)`\n\n    loadRoute ()\n    \n**Update the DOM with new content**\nFor this we are going to use innerHTML.\n\n    loadRoute ()\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarcdev%2Frouter-spa-vainilla","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarcdev%2Frouter-spa-vainilla","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarcdev%2Frouter-spa-vainilla/lists"}