{"id":19623835,"url":"https://github.com/appleple/js-rotation-banner","last_synced_at":"2025-02-26T19:32:15.138Z","repository":{"id":66341131,"uuid":"510595946","full_name":"appleple/js-rotation-banner","owner":"appleple","description":null,"archived":false,"fork":false,"pushed_at":"2022-07-05T07:19:12.000Z","size":408,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-09T11:55:39.493Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/appleple.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":"2022-07-05T05:15:45.000Z","updated_at":"2022-07-05T05:21:54.000Z","dependencies_parsed_at":"2023-03-10T23:51:32.351Z","dependency_job_id":null,"html_url":"https://github.com/appleple/js-rotation-banner","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleple%2Fjs-rotation-banner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleple%2Fjs-rotation-banner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleple%2Fjs-rotation-banner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleple%2Fjs-rotation-banner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appleple","download_url":"https://codeload.github.com/appleple/js-rotation-banner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240921528,"owners_count":19878944,"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-11-11T11:35:43.874Z","updated_at":"2025-02-26T19:32:15.100Z","avatar_url":"https://github.com/appleple.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# js-rotation-banner\n\n[![GitHub license](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://raw.githubusercontent.com/appleple/document-outliner/master/LICENSE)\n\n複数のバナー画像を指定した規則通りに並び替えてくれるjsライブラリ\n\n## Usage\ndistの中にあるrotation-banner.bundle.js,rotationbanner.cssを使用したいフォルダに設置して、使用するHTMLファイルのhead要素内にJavaScriptファイルとCSSファイルの読み込みを記述してください。\n```html\n\u003cscript src=\"/path/to/js/rotation-banner.bundle.js\"\u003e\u003c/script\u003e\n```\n```html\n\u003clink rel=\"stylesheet\" href=\"/path/to/js/rotationbanner.css\"\u003e\n```\ncfg-csv.js\n```js\ndocument.addEventListener(\"DOMContentLoaded\",  () =\u003e {\n    new RotationBanner({\n              url: \"sampleUrl\",\n              rel: \"sponsored\",\n              aTagclass: \"banner\",\n              loading: \"lazy\",\n          });\n});\n```\n\n### Basic Standalone Usage\n一セット三枚のバナーを計九枚表示させるとき\n```html\n\u003cp\u003eサンプルです\u003c/p\u003e\n\u003cdiv class=\"js-rotation-banner\" data-quantity=\"3\" data-offset=\"1\" data-id=\"1\"\u003e\u003c/div\u003e\n\u003cp\u003eサンプルです\u003c/p\u003e\n\u003cdiv class=\"js-rotation-banner\" data-quantity=\"3\" data-offset=\"1\" data-id=\"2\"\u003e\u003c/div\u003e\n\u003cp\u003eサンプルです\u003c/p\u003e\n\u003cdiv class=\"js-rotation-banner\" data-quantity=\"3\" data-offset=\"1\" data-id=\"3\"\u003e\u003c/div\u003e\n```\n\n### Attribute\ndata-quantity → 表示させる枚数\u003c/br\u003e\ndata-offset → 指定した日付によってバナーを並び替える\u003c/br\u003e\ndata-id → 並び替える数字を指定\u003c/br\u003e\n\n### Option\n\n\u003ctable\u003e\n\t\u003ctr\u003e\n\t\t\u003cth\u003evariable\u003c/th\u003e\n\t\t\u003cth\u003edescription\u003c/th\u003e\n\t\t\u003cth\u003edefault\u003c/th\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003eurl\u003c/td\u003e\n\t\t\u003ctd\u003e用意した画像データをAPIで持ってくる為に必要なurl\u003c/td\u003e\n\t\t\u003ctd\u003e初期値無し\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003erel\u003c/td\u003e\n\t\t\u003ctd\u003eスポンサーさんからの情報にはつけなきゃいけない決まり事\u003c/td\u003e\n\t\t\u003ctd\u003e初期値無し\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003eaTagclass\u003c/td\u003e\n\t\t\u003ctd\u003eaタグのクラス\u003c/td\u003e\n\t\t\u003ctd\u003ebanner\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003eloading\u003c/td\u003e\n\t\t\u003ctd\u003e遅延読み込み\u003c/td\u003e\n\t\t\u003ctd\u003elazy\u003c/td\u003e\n\t\u003c/tr\u003e\n\u003c/table\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappleple%2Fjs-rotation-banner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappleple%2Fjs-rotation-banner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappleple%2Fjs-rotation-banner/lists"}