{"id":13671655,"url":"https://github.com/litten/zing-gallery","last_synced_at":"2025-04-06T06:11:23.844Z","repository":{"id":149425127,"uuid":"68944687","full_name":"litten/zing-gallery","owner":"litten","description":"基于node.js的web相册，让摄影照片的展示更加简单 Web albums based on node.js, more simple to show photography photos","archived":false,"fork":false,"pushed_at":"2018-01-25T09:53:32.000Z","size":30917,"stargazers_count":438,"open_issues_count":17,"forks_count":124,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-03-30T05:06:09.993Z","etag":null,"topics":["gallery","node","photography","photos"],"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/litten.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}},"created_at":"2016-09-22T17:20:23.000Z","updated_at":"2025-03-21T07:58:13.000Z","dependencies_parsed_at":"2023-07-10T10:49:08.997Z","dependency_job_id":null,"html_url":"https://github.com/litten/zing-gallery","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/litten%2Fzing-gallery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litten%2Fzing-gallery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litten%2Fzing-gallery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litten%2Fzing-gallery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/litten","download_url":"https://codeload.github.com/litten/zing-gallery/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441053,"owners_count":20939239,"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":["gallery","node","photography","photos"],"created_at":"2024-08-02T09:01:15.617Z","updated_at":"2025-04-06T06:11:23.813Z","avatar_url":"https://github.com/litten.png","language":"JavaScript","readme":"Zing Gallery\n============\n\n基于node.js的web相册，让摄影照片的展示更加简单\nWeb albums based on node.js, more simple to show photography photos\n\n### 1、功能\n\n此[Demo](http://litten.me/gallery/)供体验。\n扫码可体验Mobile交互：\n\n![zing-galler qrcode](https://cloud.githubusercontent.com/assets/2024949/19653457/3ad5df14-9a47-11e6-8f2f-b9ae3241c6b6.png)\n\n* 自动获取照片信息（快门、光圈、ISO、时间等）\n* 自由为相册设置信息（封面、名称、描述）\n* 相册可加密访问\n* 适配PC与移动侧展示\n* 移动侧可使用多指手势操控图片，与原生图库一般流畅\n\n### 2、外观\n\n#### PC-常规\n\n![](https://cloud.githubusercontent.com/assets/2024949/19653136/ea05893c-9a45-11e6-9e6c-6ef8879e1df1.png)\n\n#### PC-照片展示\n\n![](https://cloud.githubusercontent.com/assets/2024949/19653268/7ac9106a-9a46-11e6-845d-0f78e8d7e0b2.png)\n\n#### Mobile-照片展示\n\n![](https://cloud.githubusercontent.com/assets/2024949/19653432/18bbe77a-9a47-11e6-830b-e3929e6e9f17.png)\n\n#### Mobile-手势说明\n\n![](https://cloud.githubusercontent.com/assets/2024949/19653657/eb6aba66-9a47-11e6-92de-565d07b38c77.png)\n\n### 3、使用\n\n相册基于node \u0026 npm，所以这两个工具必不可少。\n\n1. 将照片放入``resources/photos``文件夹\n2. 执行命令``npm i``安装依赖\n3. 执行命令``npm run start``启动相册\n\n### 4、高级用法\n\n#### 4.1 设置全局信息\n\n编辑``config.js``文件\n\n```\nmodule.exports = {\n\ttitle: 'Zing Gallery',\t\t\t\t\t// 相册名\n\twording: {\n\t\tnoAccess: '抱歉，你没有权限访问'\t\t// 无权限访问的提示\n\t},\n\talbums: {\t\t\t\t\t\t\t\t// 相册信息，在文档4.2中详解\n\t\t\"贵阳\": {\n\t\t\tthumbnail : \"IMG_0331.JPG\",\n\t\t\tsort: 1\n\t\t}, \n\t\t\"千户苗寨\": {\n\t\t\tdescription : \"没有什么能够阻挡\",\n\t\t\tthumbnail : \"IMG_0424.jpg\",\n\t\t\tname: \"千户苗寨\"\n\t\t},\n\t\t\"私密\": {\n\t\t\tdescription : \"私密\",\n\t\t\tname: \"私密 | 密码是233\",\n\t\t\tpassword: \"233\",\n\t\t\tpasswordTips: \"密码是233\"\n\t\t}\n\t}\n}\n```\n\n#### 4.2 设置相册信息\n\n比如有一个叫xxx的相册，它的位置应该是``resources/photos/xxx``\n\n编辑``config.js``文件的``albums``字段，增加一个``xxx``的对象，可以为其设置相册信息：\n\n```\nalbums: {\n\t\"贵阳\": {},\n\t\"千户苗寨\": {},\n\t\"私密\": {},\n\t\"xxx\" : {\n\t\t\"description\" : \"1983年小巷12月晴朗……\",     // 该相册的描述；如果没有，则不展示\n\t\t\"thumbnail\" : \"IMG_0424.jpg\",             // 封面图；如果没有，则默认取第一张作为封面\n\t\t\"name\": \"第七章\",                          // 相册名；如果没有，则相册名为xxx\n\t\t\"password\": \"233\",\t\t\t\t\t\t  // 私密相册，密码为233\n\t\t\"passwordTips\": \"密码是233\"\t\t\t\t// 密码提示\n\t\t\"noDate\": false,                          // 不展示时间；如果为true，则不展示照片时间信息；默认没有，即false\n\t\t\"sort\": 1\t\t\t\t\t\t\t\t  // 排序；为1时是时间逆序；默认或不填是时间正序\n\t}\n}\n\n```\n\n\n### 5、前端开发者\n\n如果你是前端开发者，需要做一些页面上的定制，你需要使用webpack进行开发。\n\n执行命令``npm run dev``（不压缩，一般开发时用）或``npm run dist``（压缩）\n\n将``assets/src``里的源文件编译到``assets/dist``目录。\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitten%2Fzing-gallery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flitten%2Fzing-gallery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitten%2Fzing-gallery/lists"}