{"id":15388511,"url":"https://github.com/deebloo/device-orientation","last_synced_at":"2025-04-15T20:21:23.489Z","repository":{"id":33398383,"uuid":"37043468","full_name":"deebloo/device-orientation","owner":"deebloo","description":"Very simple Web component that maps the device orientation to attributes. Polymer or vanilla","archived":false,"fork":false,"pushed_at":"2023-12-15T17:39:25.000Z","size":198,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T00:51:16.917Z","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/deebloo.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":"2015-06-08T03:13:43.000Z","updated_at":"2017-10-02T20:07:59.000Z","dependencies_parsed_at":"2024-10-18T19:59:10.423Z","dependency_job_id":"6be7dada-2400-402b-9685-bde3742faacf","html_url":"https://github.com/deebloo/device-orientation","commit_stats":{"total_commits":31,"total_committers":3,"mean_commits":"10.333333333333334","dds":"0.12903225806451613","last_synced_commit":"21b2e1a5d0d3005e5653940b5aa3cc5e2b576648"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deebloo%2Fdevice-orientation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deebloo%2Fdevice-orientation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deebloo%2Fdevice-orientation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deebloo%2Fdevice-orientation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deebloo","download_url":"https://codeload.github.com/deebloo/device-orientation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248573600,"owners_count":21126866,"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-01T14:57:01.136Z","updated_at":"2025-04-15T20:21:23.470Z","avatar_url":"https://github.com/deebloo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ```\u003cdevice-orientation\u003e```\n\nA Web Components for detecting device orientation. Can be used with or without Polymer. Usage is exactly the same.\n\n```\nnpm i --save device-orientation\n\n```\n\n```HTML\n\u003cdevice-orientation\u003e\u003c/device-orientation\u003e\n```\n\n### Example\n```HTML\n\u003c!-- For Vanilla with no modules --\u003e\n\u003cscript src=\"device-orientation.js\"\u003e\u003c/script\u003e\n\n\u003cdevice-orientation id=\"orientationEl\"\u003e\u003c/device-orientation\u003e\n\n\u003cp\u003eLeft Right: \u003cspan id=\"lr\"\u003e0\u003c/span\u003e\u003c/p\u003e\n\u003cp\u003eLeft Right: \u003cspan id=\"fb\"\u003e0\u003c/span\u003e\u003c/p\u003e\n\u003cp\u003eLeft Right: \u003cspan id=\"direction\"\u003e0\u003c/span\u003e\u003c/p\u003e\n\n\u003cscript\u003e\n    var el = document.getElementById('orientationEl');\n    var lr = document.getElementById('lr');\n    var fb = document.getElementById('fb');\n    var direction = document.getElementById('direction');\n\n    el.orientationChanged = function () {\n        lr.innerText = el.lr;\n        fb.innerText = el.fb;\n        direction.innerText = el.direction;\n    };\n\u003c/script\u003e\n```\n\n### properties\n\n#### lr\nType: Number\n\nleft to right value\n\n#### fb\nType: Number\n\nfront to back value\n\n#### direction\nType: number\n\ndirection value\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeebloo%2Fdevice-orientation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeebloo%2Fdevice-orientation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeebloo%2Fdevice-orientation/lists"}