{"id":19595003,"url":"https://github.com/zessx/cementjs","last_synced_at":"2025-04-27T15:34:24.219Z","repository":{"id":17811224,"uuid":"20703602","full_name":"zessx/cementjs","owner":"zessx","description":"Masonry alternative","archived":false,"fork":false,"pushed_at":"2019-10-08T11:25:28.000Z","size":135,"stargazers_count":20,"open_issues_count":1,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T01:11:14.083Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://work.smarchal.com/cementjs","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/zessx.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}},"created_at":"2014-06-10T22:14:21.000Z","updated_at":"2019-10-31T15:51:15.000Z","dependencies_parsed_at":"2022-09-10T06:01:06.664Z","dependency_job_id":null,"html_url":"https://github.com/zessx/cementjs","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/zessx%2Fcementjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zessx%2Fcementjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zessx%2Fcementjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zessx%2Fcementjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zessx","download_url":"https://codeload.github.com/zessx/cementjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251162921,"owners_count":21545846,"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-11T08:45:28.226Z","updated_at":"2025-04-27T15:34:20.217Z","avatar_url":"https://github.com/zessx.png","language":"JavaScript","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=KTYWBM9HJMMSE\u0026lc=FR\u0026item_name=Buy%20a%20coffee%20to%20zessx%20%28Samuel%20Marchal%29\u0026currency_code=EUR\u0026bn=PP%2dDonationsBF%3abmac%3aNonHosted"],"categories":[],"sub_categories":[],"readme":"![CementJS](cementjs.png)\n=====================\n\n[CementJS](http://smarchal.com/cementjs) is a jQuery plugin, which will allow you to quickly present a list of elements under a grid layout. It is a [Masonry](http://masonry.desandro.com/) alternative.\n\nUnlike Masonry, CementJS create a real grid : **every row has the same height**, and **every column has the same width**. This doesn't mean your elements can't span over several columns and/or rows.\n\nInstallation\n------------\n\n1. Download `cement.min.js` (or its unminified version)\n2. Include jQuery : `\u003cscript src=\"//code.jquery.com/jquery-1.11.0.min.js\"\u003e\u003c/script\u003e`\n3. Include CementJS : `\u003cscript src=\"cement.min.js\"\u003e\u003c/script\u003e`\n\nBasic usage\n-----------\n\nFor a basic usage, you need to wrap your elements in a container :\n\n\t\u003csection id=\"container\"\u003e\n\t\t\u003carticle\u003e...\u003c/article\u003e\n\t\t\u003carticle\u003e...\u003c/article\u003e\n\t\t\u003carticle\u003e...\u003c/article\u003e\n\t\u003c/section\u003e\n\nThen, initialize CementJS :\n\n    $('#container').cement();\n\nThat's all. CementJS will automatically calculate your elements position, trying to take as less space as possible.\n\nSpan over columns and rows\n--------------------------\n\nIf you want an element to span over 2 columns, use this HTML :\n\n\t\u003carticle data-w=\"2\"\u003e...\u003c/article\u003e\n\nIn the same manner, you can span over rows (or combine both) :\n\n\t\u003carticle data-w=\"2\" data-h=\"3\"\u003e...\u003c/article\u003e\n\n\u003e Both data attributes are initialized to 1 if they're not specified\n\nOptions\n-------\n\nCementJS provides a few options, to be more flexible :\n\nOption               | Default value | Description \n-------------------- | ------------- | -----\n`columns`            | `4`           | Number of columns in your grid. \n`columnMinWidth`     | `0`           | Minimum width the columns can have. Under this width, a column is removed.\u003cbr\u003eSet to 0 to keep the same number of columns, whatever their width. \n`brickSelector`      | `\u003e *`         | Target elements inside the container. \n`horizontalGutter`   | `5`           | Size of horizontal gutters. \n`verticalGutter`     | `5`           | Size of vertical gutters. \n`transitionDuration` | `.2s`         | Transition duration. \n\nLegals\n------\n- Author : [zessx](https://github.com/zessx)\n- Licence : [MIT](http://opensource.org/licenses/MIT) \n- Contact : [@zessx](https://twitter.com/zessx)\n- Link  : [http://smarchal.com/cementjs](http://smarchal.com/cementjs)\n\nDonations\n---------\n\n[![Buy me a coffee !](http://doc.smarchal.com/bmac)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=KTYWBM9HJMMSE\u0026lc=FR\u0026item_name=Buy%20a%20coffee%20to%20zessx%20%28Samuel%20Marchal%29\u0026currency_code=EUR\u0026bn=PP%2dDonationsBF%3abmac%3aNonHosted)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzessx%2Fcementjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzessx%2Fcementjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzessx%2Fcementjs/lists"}