{"id":21387550,"url":"https://github.com/nju33/suwa","last_synced_at":"2025-03-16T12:30:22.010Z","repository":{"id":57375061,"uuid":"85620390","full_name":"nju33/suwa","owner":"nju33","description":"📖 Like a carousel element","archived":false,"fork":false,"pushed_at":"2017-03-22T03:14:24.000Z","size":7756,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-23T00:14:34.328Z","etag":null,"topics":["carousel","element","library","pure-javascript","ui"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/suwa","language":"HTML","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/nju33.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-20T20:00:55.000Z","updated_at":"2020-09-19T11:18:52.000Z","dependencies_parsed_at":"2022-09-05T13:21:01.765Z","dependency_job_id":null,"html_url":"https://github.com/nju33/suwa","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/nju33%2Fsuwa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nju33%2Fsuwa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nju33%2Fsuwa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nju33%2Fsuwa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nju33","download_url":"https://codeload.github.com/nju33/suwa/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243869145,"owners_count":20360963,"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":["carousel","element","library","pure-javascript","ui"],"created_at":"2024-11-22T12:13:34.908Z","updated_at":"2025-03-16T12:30:21.966Z","avatar_url":"https://github.com/nju33.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Suwa\n\n\u003c!-- [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)\n\n[![Build Status](https://travis-ci.org/nju33/suwa.svg?branch=master)](https://travis-ci.org/nju33/suwa) --\u003e\n\n📖 Like a carousel element\n\n\n![screenshot](https://github.com/nju33/suwa/raw/master/images/screenshot.gif?raw=true)\n\n## Install or Download\n\n```sh\nyarn add suwa\nnpm i -S suwa\n```\n\nOr access to [releases page](https://github.com/nju33/suwa/releases).\nThen, download the latest version.\n\n## Usage\n\nFirst, if you read as a separate file\n\n```html\n\u003cscript src=\"/path/tp/suwa.js\"\u003e\u003c/script\u003e\n```\n\n```html\n  \u003c!-- ... --\u003e\n  \u003cdiv id=\"target\"\u003e\n    \u003cdiv class=\"page1\" style=\"display:none\"\u003e...\u003c/div\u003e\n    \u003cdiv class=\"page2\" style=\"display:none\"\u003e...\u003c/div\u003e\n    \u003cdiv class=\"page3\" style=\"display:none\"\u003e...\u003c/div\u003e\n    \u003cdiv class=\"page.\" style=\"display:none\"\u003e...\u003c/div\u003e\n    \u003cdiv class=\"page.\" style=\"display:none\"\u003e...\u003c/div\u003e\n    \u003cdiv class=\"page.\" style=\"display:none\"\u003e...\u003c/div\u003e\n    \u003cdiv class=\"pageN\" style=\"display:none\"\u003e...\u003c/div\u003e\n  \u003c/div\u003e\n  \u003c!-- ... --\u003e\n```\n\n```js\nimport Suwa from 'suwa';\n\nwindow.addEventListener('load', () =\u003e {\n  new Suwa({\n    target: getElementById('target'),\n    data: {\n      style: {\n        // defaults\n        height: '50vh',\n        width: '100vw',\n        baseColor: '#fff',\n        subColor: '#222',\n        accentColor: '#cb1b45'\n      },\n\n      // Whether to display progressbar on top (default: false)\n      progress: true,\n      \n      // Whether or not to loop a page (default: false)\n      pagerLoop: {\n        // Whether it will go automatically to the next page when it is left // alone, how many milliseconds it will go to the next page\n        autoScroll: 3000,\n      },\n\n      // To operate with the keyboard Set\n      // default: false\n      keyMaps: {\n        prevPage: 37,\n        nextPage: 39\n      },\n\n      // Whether to move the page with the side-wheel (horizontal swipe on smart-device)\n      // (default: false)\n      wheel: true\n\n      // Whether to display pager\n      // defaults\n      pager: {\n        inset: true // If false Pager display outside the page\n      },\n    }\n  });\n})\n```\n\n### Example\n\n- `test/fixtures/index.js`\n- `example/webpack/index.js`\n\n## LICENSE\n\nThe MIT License (MIT)\n\nCopyright (c) 2017 nju33 \u003cnju33.ki@gmail.com\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnju33%2Fsuwa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnju33%2Fsuwa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnju33%2Fsuwa/lists"}