{"id":15456595,"url":"https://github.com/phillmac/ipfs-masonry","last_synced_at":"2025-04-01T11:34:03.815Z","repository":{"id":123993390,"uuid":"289612543","full_name":"phillmac/ipfs-masonry","owner":"phillmac","description":"A gallery for images on IPFS","archived":false,"fork":false,"pushed_at":"2024-02-25T00:09:59.000Z","size":1993,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-12T12:10:00.124Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phillmac.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2020-08-23T04:03:52.000Z","updated_at":"2022-01-04T02:17:56.000Z","dependencies_parsed_at":"2024-01-20T00:31:34.039Z","dependency_job_id":"39c77324-3640-42ba-8c3e-902dc9e88450","html_url":"https://github.com/phillmac/ipfs-masonry","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/phillmac%2Fipfs-masonry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phillmac%2Fipfs-masonry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phillmac%2Fipfs-masonry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phillmac%2Fipfs-masonry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phillmac","download_url":"https://codeload.github.com/phillmac/ipfs-masonry/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246634064,"owners_count":20809186,"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-10-01T22:34:14.905Z","updated_at":"2025-04-01T11:34:03.791Z","avatar_url":"https://github.com/phillmac.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IPFS Masonry\n\nProvides an interface to display a [masonry](https://getbootstrap.com/docs/4.3/components/card/#card-columns) for images hosted on IPFS.\nImages are lazy loaded to reduce the strain on the browser.\nThe galleries are also pinned to a local JS-IPFS node to help with the seeding.\n\n## Customize\n\n### Creating a gallery\n\nYou can clone this project and add a `/json/gallery.json` to display a custom gallery.\n\n```json\n{\n  \"author\": \"Elementary OS\", // Title at the top of the page\n  \"description\": \"\", // Description of the page\n  \"galleries\": [\n    {\n      \"cidv1\": \"bafybeicpr27fy2tffc3dxzrhjjsdzzblwjr6njxswejkpd3bsajhtmwfau\", // CIDv1 of a gallery\n      \"title\": \"Wallpapers\", // Name of the gallery\n      \"text\": \"\", // Path to a `.md` file\n      \"folders\": [\n        {\n          \"path\": \".\", // Path of the folder\n          \"images\": [ // Name of images\n            \"Ashim DSilva.jpg\",\n            \"Carmine De Fazio.jpg\",\n            \"Jonas Nilsson Lee.jpg\",\n            \"leigh-kendell-581.jpg\",\n            \"Luca Bravo.jpg\",\n            \"Morskie Oko.jpg\",\n            \"Mr. Lee.jpg\",\n            \"Pablo Garcia Saldana.jpg\",\n            \"Photo by SpaceX.jpg\",\n            \"Rob Bye.jpg\",\n            \"Ryan Schroeder.jpg\",\n            \"Sunset by the Pier.jpg\"\n          ]\n        }\n      ]\n    }\n  ]\n}\n```\n\nThe `gallery.json` file can contain multiple galleries, and each of them can contain multiple folders.\nA gallery is made of a CIDv1, a title, and the path to a markdown file.\nA folder contains a path and the name of the contained images.\n\n### Adding a gallery to IPFS\n\nWhen adding files to IPFS, don't forget to convert the hash from CIDv0 to CIDv1.\n\n```bash\nipfs cid base32 QmP4c9GWcbc1mD8yDcKaNEJNLmGqTND9cJsyEdJizBi3dw\nbafybeiakx57a25xqcuqrx2rbm2ugqxeud2i46ejjg3vqodvasqiwwe6pby\n```\n\nThis is necessary to obtain subdomain-separated URLs. The only known gateway to support them for now is [cf-ipfs.com](https://blog.cloudflare.com/continuing-to-improve-our-ipfs-gateway/).\n\n## Building\n\n### Dependencies\n\nTo build this project, you need `hogan.js`.\n\n```bash\nnpm i -g hogan.js\n```\n\n### Build\n\n```bash\n./scripts/ipfs.sh\n```\n\nThe end result should look like this.\n\n![Gallery](./assets/gallery.png)\n\nThere's a preview available [here](https://bafybeih3numjaydnhvwr62pkd75u2wiaj6vmz5ymbhouztij7j42rmuady.cf-ipfs.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphillmac%2Fipfs-masonry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphillmac%2Fipfs-masonry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphillmac%2Fipfs-masonry/lists"}