{"id":24383541,"url":"https://github.com/firstandthird/hapi-mobile-views","last_synced_at":"2026-04-29T03:31:42.227Z","repository":{"id":66188455,"uuid":"52050063","full_name":"firstandthird/hapi-mobile-views","owner":"firstandthird","description":"Loads mobile views","archived":false,"fork":false,"pushed_at":"2018-09-18T21:41:55.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-12-31T21:13:50.600Z","etag":null,"topics":["hapi-plugin"],"latest_commit_sha":null,"homepage":null,"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/firstandthird.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":".github/CONTRIBUTING.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-02-19T00:43:47.000Z","updated_at":"2018-09-18T21:41:18.000Z","dependencies_parsed_at":"2023-02-25T06:45:25.959Z","dependency_job_id":null,"html_url":"https://github.com/firstandthird/hapi-mobile-views","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/firstandthird/hapi-mobile-views","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fhapi-mobile-views","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fhapi-mobile-views/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fhapi-mobile-views/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fhapi-mobile-views/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firstandthird","download_url":"https://codeload.github.com/firstandthird/hapi-mobile-views/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fhapi-mobile-views/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32409082,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T02:37:21.628Z","status":"ssl_error","status_checked_at":"2026-04-29T02:36:50.947Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["hapi-plugin"],"created_at":"2025-01-19T10:14:44.311Z","updated_at":"2026-04-29T03:31:42.220Z","avatar_url":"https://github.com/firstandthird.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hapi-mobile-views\n\n[![Build Status](https://travis-ci.org/firstandthird/hapi-mobile-views.svg?branch=master)](https://travis-ci.org/firstandthird/hapi-mobile-views)\n[![Coverage Status](https://coveralls.io/repos/github/firstandthird/hapi-mobile-views/badge.svg?branch=master)](https://coveralls.io/github/firstandthird/hapi-mobile-views?branch=master)\n\nDetects mobile user agents and serves mobile views when available.\n\n## Install\n\n`npm install hapi-mobile-views`\n\n## Usage\n\nBasic:\n```js\n// index.js\nserver.register(require('hapi-mobile-views'));\n```\n\n[Rapptor](https://github.com/firstandthird/rapptor):\n```yaml\n# default.yaml\nplugins:\n  hapi-mobile-views:\n```\n\n## Serving mobile views\n\n**NOTE:** Currently only `*.html` view files are supported and we're only testing against the `vision` module.\n\nThis plugin handles everything except creating the mobile views for you. In order to service up a mobile view you will need to create a file that matches a view but end with `-mobile` in the name.\n\nIf your return looks like and the template was `pages/homepage.html`\n\n```js\nreply('pages/homepage');\n```\n\nYou'd name the mobile version `pages/homepage-mobile.html`\n\nWe also expose a global view context `__isMobile`. Useful if you don't need to change the whole page, just a part. (You should still use media queries if you can).\n\n## Manual Override\n\nDirect the user to the same url but with a `ftDeviceType=\u003ctype\u003e` query string. Valid types are `mobile` and `desktop`. The user will be redirected to the original url with a cookie set with the device type.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirstandthird%2Fhapi-mobile-views","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirstandthird%2Fhapi-mobile-views","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirstandthird%2Fhapi-mobile-views/lists"}