{"id":19241296,"url":"https://github.com/binocarlos/bookbinding","last_synced_at":"2025-07-07T08:09:54.737Z","repository":{"id":18429049,"uuid":"21612315","full_name":"binocarlos/bookbinding","owner":"binocarlos","description":"Create a book binding style background for a https://github.com/binocarlos/pagemaker","archived":false,"fork":false,"pushed_at":"2014-07-13T14:28:59.000Z","size":232,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-23T14:34:11.237Z","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/binocarlos.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}},"created_at":"2014-07-08T12:47:02.000Z","updated_at":"2023-08-05T12:51:04.000Z","dependencies_parsed_at":"2022-07-26T22:17:06.286Z","dependency_job_id":null,"html_url":"https://github.com/binocarlos/bookbinding","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/binocarlos/bookbinding","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binocarlos%2Fbookbinding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binocarlos%2Fbookbinding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binocarlos%2Fbookbinding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binocarlos%2Fbookbinding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binocarlos","download_url":"https://codeload.github.com/binocarlos/bookbinding/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binocarlos%2Fbookbinding/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264040938,"owners_count":23548070,"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-09T17:10:58.369Z","updated_at":"2025-07-07T08:09:54.698Z","avatar_url":"https://github.com/binocarlos.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"bookbinding\n===========\n\nCreate a book binding style background for some HTML content\n\n## installation\n\n```\n$ component install binocarlos/bookbinding\n```\n\n## example\n\nCreate a binding and append a HTML element before adding the binding to the page\n\n```js\nvar BookBinding = require('bookbinding')\nvar binding = BookBinding()\n\n// build your content element anyhow\nvar content = document.createElement('div')\n\nbinding.appendChild(content)\nbinding.appendTo(document.querySelector('#container'))\n```\n\n## api\n\n### `var binding = BookBinding(opts)`\n\nThe options object has the following properties:\n\n * image - a background image for the binding\n * imageWidth - the width of the background image\n * imageHeight - the height of the background image\n * left\n * top\n * width\n * height\n \nThe content element occupies the center as defined by the size settings.\n\nThey are in percentages and default to 0\n\n```js\nvar binding = BookBinding({\n\timage:'myimage.png',\n\timageWidth:800,\n\timageHeight:600,\n\t// all are converted to percentages\n\tleft:10, // this means 10%\n\ttop:'12%',\n\twidth:80,\n\theight:14\n})\n\nbinding.appendTo(document.querySelector('#container'))\n```\n\n### `binding.appendTo(target)`\n\nAppend the binding element to a DOM element or selector string\n\n### `binding.appendChild(contentElement)`\n\nAppend a content element to the book-binding background.\n\n## licence\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinocarlos%2Fbookbinding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinocarlos%2Fbookbinding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinocarlos%2Fbookbinding/lists"}