{"id":19623831,"url":"https://github.com/appleple/hiraku","last_synced_at":"2025-04-28T05:30:43.331Z","repository":{"id":66341124,"uuid":"71783491","full_name":"appleple/hiraku","owner":"appleple","description":"jQuery Offcanvas Menu Plugin","archived":false,"fork":false,"pushed_at":"2018-04-02T02:17:00.000Z","size":12910,"stargazers_count":75,"open_issues_count":7,"forks_count":16,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-04-14T23:59:38.422Z","etag":null,"topics":["javascript","jquery","offcanvas-menu"],"latest_commit_sha":null,"homepage":"https://appleple.github.io/hiraku/","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/appleple.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,"governance":null}},"created_at":"2016-10-24T11:48:59.000Z","updated_at":"2022-07-10T18:46:11.000Z","dependencies_parsed_at":"2023-03-10T23:51:30.632Z","dependency_job_id":null,"html_url":"https://github.com/appleple/hiraku","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleple%2Fhiraku","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleple%2Fhiraku/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleple%2Fhiraku/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleple%2Fhiraku/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appleple","download_url":"https://codeload.github.com/appleple/hiraku/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224096528,"owners_count":17255106,"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":["javascript","jquery","offcanvas-menu"],"created_at":"2024-11-11T11:35:40.419Z","updated_at":"2024-11-11T11:35:41.687Z","avatar_url":"https://github.com/appleple.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hiraku.js - jQuery Offcanvas Menu Plugin\n\n## This repository has already been deprecated. consider using the new version of hiraku\nhttps://github.com/appleple/hiraku2\n\nWe made jQuery plugin called hiraku.js so that more people can use Offcanvas-menu functionality which is used in a CMS we make.\n\nYou can easily find source code or plugins for Offcanvas-menu via Google by searching with \"offcanvas JavaScript\", but we can't find any plugins which meet all features that hiraku.js has. That's Why we made it from the scratch.\n\n## Feature\n\n- Not affected by the DOM structure.\n- Enable to open both right and left side menu.\n- Main canvas is not scrolled, while scrolling Offcanvas-menu.\n- Easy to control the movement\n- Accessible for keyboard navigation and screen readers.\n\n## Installation\n\nnpm\n\n```\n$ npm install hiraku\n```\n\n## Setup\n\n```html\n\u003clink rel=\"stylesheet\" type=\"text/css\" href=\"./hiraku.css\"\u003e\n\u003cscript src=\"http://code.jquery.com/jquery-2.2.4.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"./hiraku.js\"\u003e\u003c/script\u003e\n```\n\n## Option\nhiraku.js has following options. Via options, you can control the behavior when you open the Offcanvas-menu.\nAnd if you want to change the width of the Offcanvas-menu, You may want to change CSS properties instead of changing the JavaScript.\n\n| Variable | Description |\n|-----------|----------------------------------------------------------------|\n| btn       | Selector of the button to open the Offcanvas-menu |\n| fixedHeader | Selector of the fixed elements |\n| direction | Offcanvas-menu from \"left\" or \"right\" |\n\n## Demo\n\n### From right side\n```html\n\u003cbutton class=\"hiraku-open-btn\" id=\"offcanvas-btn-right\" data-toggle-offcanvas=\"#js-hiraku-offcanvas-1\"\u003e\n\t\u003cspan class=\"hiraku-open-btn-line\"\u003e\u003c/span\u003e\n\u003c/button\u003e\n\u003cdiv class=\"offcanvas-right\"\u003e\n\t\u003cul\u003e\u003cli\u003ehogehoge\u003c/li\u003e\u003c/ul\u003e\n\u003c/div\u003e\n```\n\n```js\n$(\".offcanvas-right\").hiraku({\n\tbtn: \"#offcanvas-btn-right\",\n\tfixedHeader: \"#header\",\n\tdirection: \"right\"\n});\n```\n### From left side\n\n```html\n\u003cbutton class=\"hiraku-open-btn\" id=\"offcanvas-btn-left\" data-toggle-offcanvas=\"#js-hiraku-offcanvas-1\"\u003e\n\t\u003cspan class=\"hiraku-open-btn-line\"\u003e\u003c/span\u003e\n\u003c/button\u003e\n\u003cdiv class=\"offcanvas-left\"\u003e\n\t\u003cul\u003e\u003cli\u003ehogehoge\u003c/li\u003e\u003c/ul\u003e\n\u003c/div\u003e\n```\n\n```js\n$(\".offcanvas-left\").hiraku({\n\tbtn: \"#offcanvas-btn-left\",\n\tfixedHeader: \"#header\",\n\tdirection: \"left\"\n});\n```\n### From both side\n\n```html\n\u003cbutton class=\"hiraku-open-btn\" id=\"offcanvas-btn-left\" data-toggle-offcanvas=\"#js-hiraku-offcanvas-1\"\u003e\n\t\u003cspan class=\"hiraku-open-btn-line\"\u003e\u003c/span\u003e\n\u003c/button\u003e\n\u003cdiv class=\"offcanvas-left\"\u003e\n\t\u003cul\u003e\u003cli\u003ehogehoge\u003c/li\u003e\u003c/ul\u003e\n\u003c/div\u003e\n\n\u003cbutton class=\"hiraku-open-btn\" id=\"offcanvas-btn-right\" data-toggle-offcanvas=\"#js-hiraku-offcanvas-1\"\u003e\n\t\u003cspan class=\"hiraku-open-btn-line\"\u003e\u003c/span\u003e\n\u003c/button\u003e\n\u003cdiv class=\"offcanvas-right\"\u003e\n\t\u003cul\u003e\u003cli\u003ehogehoge\u003c/li\u003e\u003c/ul\u003e\n\u003c/div\u003e\n```\n\n```js\n$(\".offcanvas-left\").hiraku({\n\tbtn: \"#offcanvas-btn-left\",\n\tfixedHeader: \"#header\",\n\tdirection: \"left\"\n});\n\n\n$(\".offcanvas-right\").hiraku({\n\tbtn: \"#offcanvas-btn-right\",\n\tfixedHeader: \"#header\",\n\tdirection: \"right\"\n});\n```\n\n\n## CSS Customize\n\nIf you don't want to move the main contents, When opening the Offcanvas-menu.\n\nBy default, main contents will be pressed out. But if you want to fix main contents, you will overwrite hiraku.css like below\n\n```css\n.js-hiraku-offcanvas-body-right .js-hiraku-header-fixed {\n\tmargin-left: -70%;\n}\n\n.js-hiraku-offcanvas-body-left .js-hiraku-header-fixed {\n\tmargin-left: 70%;\n}\n\n.js-hiraku-offcanvas-body-right {\n\tleft: 0;\n}\n\n.js-hiraku-offcanvas-body-left {\n\tleft: 0;\n}\n```\n\n\n### Specify the width of the Offcanvas-menu in pixels\n\nBy default, width of the Offcanvas-menu is 70% of the screen size. But you may want to change the size of the menu when using tablets. Then you can overwrite hiraku.css like below.\n\n```css\n.js-hiraku-offcanvas-body-right .js-hiraku-header-fixed {\n\tmargin-left: -210px;\n}\n\n.js-hiraku-offcanvas-body-left .js-hiraku-header-fixed {\n\tmargin-left: 210px;\n}\n\n.js-hiraku-offcanvas .js-hiraku-offcanvas-sidebar-left {\n\tmargin-left: -210px;\n}\n \n.js-hiraku-offcanvas .js-hiraku-offcanvas-sidebar-right {\n\tmargin-right: 210px;\n}\n\n.js-hiraku-offcanvas .js-hiraku-offcanvas-sidebar {\n\twidth: 210px;\n}\n\n.js-hiraku-offcanvas-body-left {\n\tleft: 210px;\n}\n\n.js-hiraku-offcanvas-body-right {\n\tright: 210px;\n}\n```\n\n### Customize hiraku.css via hiraku.scss\n\nYou can change its width by changing the variable on hiraku.scss. You can also change its transition speed with it.\n\n| Variable | Description |\n|-----------|----------------------------------------------------------------|\n| $side-menu-width | Width of the Offcanvas-menu (default： 70%) |\n| $animation | Transition speeed and type (default: 0.3s ease-in-out) |\n\n## Download\n\nYou can download from here.\n\n[Download hiraku.js](http://github.com/appleple/hiraku/archive/master.zip)\n\n## Github\n\n[hiraku.js on Github](http://github.com/appleple/hiraku)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappleple%2Fhiraku","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappleple%2Fhiraku","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappleple%2Fhiraku/lists"}