{"id":16150624,"url":"https://github.com/ptgamr/google-image-layout","last_synced_at":"2025-03-18T19:30:19.750Z","repository":{"id":20511061,"uuid":"23789709","full_name":"ptgamr/google-image-layout","owner":"ptgamr","description":"A library help you to build Google like Image Gallery","archived":false,"fork":false,"pushed_at":"2017-01-26T02:00:01.000Z","size":36,"stargazers_count":75,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"gh-pages","last_synced_at":"2025-02-28T11:42:37.442Z","etag":null,"topics":["css","gallery","google-images","image-gallery"],"latest_commit_sha":null,"homepage":null,"language":"CSS","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/ptgamr.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-09-08T12:21:23.000Z","updated_at":"2024-11-02T04:39:03.000Z","dependencies_parsed_at":"2022-09-09T12:02:12.277Z","dependency_job_id":null,"html_url":"https://github.com/ptgamr/google-image-layout","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/ptgamr%2Fgoogle-image-layout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptgamr%2Fgoogle-image-layout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptgamr%2Fgoogle-image-layout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptgamr%2Fgoogle-image-layout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ptgamr","download_url":"https://codeload.github.com/ptgamr/google-image-layout/tar.gz/refs/heads/gh-pages","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243945539,"owners_count":20372896,"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":["css","gallery","google-images","image-gallery"],"created_at":"2024-10-10T00:50:23.647Z","updated_at":"2025-03-18T19:30:19.492Z","avatar_url":"https://github.com/ptgamr.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"'google-image-layout\n===================\n\nA library help you to build Google like Image Gallery. Vanilla Javascript\n\nDEMO [http://ptgamr.github.io/google-image-layout/](http://ptgamr.github.io/google-image-layout/)\n\nTUTORIAL [http://trinhtrunganh.com/2014/09/12/google-image-layout.html](http://trinhtrunganh.com/2014/09/12/google-image-layout.html)\n\nDocumentation\n=============\n\n### Init via Data Attribute\nvery simple, add your markdown as bellow\n\n```html\n\u003cdiv class=\"google-image-layout\" data-google-image-layout data-max-height=\"150\"\u003e\n\t\u003cimg src=\"http://media-cache-ec0.pinimg.com/736x/d6/1f/6f/d61f6ff7dc676504170e6233fc6373e6.jpg\"/\u003e\n\t\u003cimg src=\"http://media-cache-ec0.pinimg.com/736x/3d/e7/9b/3de79b852892d20cc55c51a3d5bdea95.jpg\"/\u003e\n\t\u003cimg src=\"http://media-cache-ak0.pinimg.com/236x/ef/c9/1f/efc91fba944f62dfff1f7ba8c68c354a.jpg\"/\u003e\n\t\u003cimg src=\"http://media-cache-ak0.pinimg.com/236x/b0/c7/74/b0c7741ecb01dac741423164619160ef.jpg\"/\u003e\n\t...\n\u003c/div\u003e\n```\n\n####data-max-height (default 120)\nThe maximum height of images in the gallery\n\n### API\n####.align(element)\n`element` the gallery container which contains images\n\n***Important Notice\n===================\n\nThís plugin requires the image's `width` and `height` have to be known in prior to initialization. If you already have that information, put `data-width` \u0026 `data-height` to your image tags.\n\nOtherwise, please consider using [imagesLoaded](https://github.com/desandro/imagesloaded) to load the images first\n\n```javascript\nvar imgLoad = imagesLoaded( document.querySelector('body') );\n\nimgLoad.on( 'progress', function( instance, image ) {\n  image.img.setAttribute('data-width', image.img.offsetWidth);\n  image.img.setAttribute('data-height', image.img.offsetHeight);\n});\n\nimgLoad.on( 'done', function( instance ) {\n  GoogleImageLayout.init();\n});\n```\n\nTodo List\n=========\n- Responsive support\n- Append images (for infinite scrolling, loadmore button)\n- More configuration options\n\n\n\n## License\nMIT license\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fptgamr%2Fgoogle-image-layout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fptgamr%2Fgoogle-image-layout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fptgamr%2Fgoogle-image-layout/lists"}