{"id":15479727,"url":"https://github.com/gr2m/riot-router-example","last_synced_at":"2026-01-27T17:32:14.964Z","repository":{"id":66069722,"uuid":"67575035","full_name":"gr2m/riot-router-example","owner":"gr2m","description":"simple riot.js app with route-based content toggling","archived":false,"fork":false,"pushed_at":"2020-10-15T00:04:14.000Z","size":48,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"gh-pages","last_synced_at":"2024-10-29T23:43:27.431Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://gr2m.github.io/riot-router-example/","language":"HTML","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/gr2m.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"gr2m"}},"created_at":"2016-09-07T05:30:10.000Z","updated_at":"2024-03-21T18:30:32.000Z","dependencies_parsed_at":"2023-02-20T18:31:07.620Z","dependency_job_id":null,"html_url":"https://github.com/gr2m/riot-router-example","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"b4bdf23e39a185b6d3b111fd0595f66b8d17068f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Friot-router-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Friot-router-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Friot-router-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Friot-router-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gr2m","download_url":"https://codeload.github.com/gr2m/riot-router-example/tar.gz/refs/heads/gh-pages","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239943444,"owners_count":19722464,"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-10-02T04:25:17.301Z","updated_at":"2026-01-27T17:32:09.930Z","avatar_url":"https://github.com/gr2m.png","language":"HTML","funding_links":["https://github.com/sponsors/gr2m"],"categories":[],"sub_categories":[],"readme":"# riot-router-example\n\n\u003e simple riot.js app with route-based content toggling\n\nThis is a simple application using [riot.js v2.6.0](http://riotjs.com/release-notes/#august-20-2016)\nthat defines routes in tags that show/hide themselves based on the current route.\n\nI created it as a learning example for Hoodie’s [Rails Girls Summer of Code](http://railsgirlssummerofcode.org/)\nTeam 2016: [Titay \u0026 Hyesoo a.k.a. Team Rookies](https://rookies-2016rgsoc.rhcloud.com/)\n\n## Usage\n\nYou can see the app running at [https://gr2m.github.io/riot-router-example/](https://gr2m.github.io/riot-router-example/).\n\nClone repository\n\n```\ngit clone https://github.com/gr2m/riot-router-example.git\ncd riot-router-example\n```\n\nStart a local http server in the folder. This will work on Mac or Linux:\n\n```\npython -m SimpleHTTPServer\n```\n\nOpen `index.html` in your browser at the server URL.\n\n## How it works\n\nIn the [index.html](index.html) file, all `*.tag` files are loaded, as well as\nthe `riot+compiler.min.js` which compiles the `*.tag` files on the fly to\nJavaScript.\n\nThere is only the `\u003capp\u003e` custom tag in index.html, which we mount at the end\nof the `\u003cscript\u003e` tag. With that, all other tags are mounted as they are listed\nin [tags/app.tag](tags/app.tag). Other than listing all other custom tags, we\nonly start the routing in `app.tag`.\n\nAll the content tags create their own local route function. By default, they set\ntheir local `show` variable to false. If their defined route matches, it gets\nset to true. That way all logic is contained in the custom tags.\n\n[tags/show-app.tag](tags/show-app.tag) also shows how a tag can route for dynamic\nroutes that pass an id in the route, just for reference.\n\nIf you have any questions, ping me on Twitter at [@gr2m](https://twitter.com/gr2m/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgr2m%2Friot-router-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgr2m%2Friot-router-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgr2m%2Friot-router-example/lists"}