{"id":21393744,"url":"https://github.com/lukawski/opnav","last_synced_at":"2025-03-16T14:16:30.477Z","repository":{"id":57314970,"uuid":"85622461","full_name":"lukawski/opNav","owner":"lukawski","description":"Simple on page navigation","archived":false,"fork":false,"pushed_at":"2017-03-20T22:29:34.000Z","size":6,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-23T12:19:56.693Z","etag":null,"topics":["html-navigation","javascript","javascript-plugin","navigation","on-page-navigation","opnav","vanilla-js"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lukawski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-20T20:25:01.000Z","updated_at":"2017-03-21T22:03:15.000Z","dependencies_parsed_at":"2022-09-12T15:01:47.928Z","dependency_job_id":null,"html_url":"https://github.com/lukawski/opNav","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukawski%2FopNav","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukawski%2FopNav/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukawski%2FopNav/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukawski%2FopNav/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukawski","download_url":"https://codeload.github.com/lukawski/opNav/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243878491,"owners_count":20362433,"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":["html-navigation","javascript","javascript-plugin","navigation","on-page-navigation","opnav","vanilla-js"],"created_at":"2024-11-22T14:13:11.388Z","updated_at":"2025-03-16T14:16:30.456Z","avatar_url":"https://github.com/lukawski.png","language":"JavaScript","readme":"# opNav\nSimple on page navigation. It works with every HTML tag and one level nesting.\n## Instalation\n`npm install op-nav --save`\n## Usage\n### Simple navigation\n```javascript\nvar menu = new OPNav('section', 'op-nav')\nmenu.init()\n```\n```HTML\n\u003cnav id=\"op-nav\"\u003e\n\u003c/nav\u003e\n\n\u003csection data-section=\"true\" data-label=\"1\"\u003e\n  Content...\n\u003c/section\u003e\n\n\u003csection data-section=\"true\" data-label=\"2\"\u003e\n  Content...\n\u003c/section\u003e\n\n\u003csection data-section=\"true\" data-label=\"3\"\u003e\n  Content...\n\u003c/section\u003e\n\n\u003csection data-section=\"true\" data-label=\"4\"\u003e\n  Content...\n\u003c/section\u003e\n```\n\n### Navigation with one level nesting\n```javascript\nvar menu = new OPNav('section', 'op-nav')\nmenu.init()\n```\n```HTML\n\u003cnav id=\"op-nav\"\u003e\n\u003c/nav\u003e\n\n\u003csection data-section=\"true\" data-label=\"1\"\u003e\n  Content...\n  \u003csection data-sub-section=\"true\" data-label=\"1.1\"\u003e\n  Content...\n  \u003c/section\u003e\n\u003c/section\u003e\n\n\u003csection data-section=\"true\" data-label=\"2\"\u003e\n  Content...\n\u003c/section\u003e\n\n\u003csection data-section=\"true\" data-label=\"3\"\u003e\n  Content...\n\u003c/section\u003e\n\n\u003csection data-section=\"true\" data-label=\"4\"\u003e\n  Content...\n\u003c/section\u003e\n```\n\n## Elements\n### JavaScript\n#### OPNav(**tag**, **menuID**)\n1. ```tag``` - HTML tag\n2. ```menuID``` - element ID where navigation will be inserted\n#### .init()\nCreates navigation.\n\n### HTML\n#### data-section=\"true\"\nSpecify if element should be treated as part of navigation.\n#### data-label=\"anyValue\"\nLabel for navigation.\n#### data-sub-section=\"true\"\nSpecify element that is subsection to his parent element.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukawski%2Fopnav","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukawski%2Fopnav","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukawski%2Fopnav/lists"}