:exclamation: 重要提示 v5beta 现在可用于测试,[在这里阅读公告](https://github.com/dimsemenov/PhotoSwipe/issues/1749) 并报告你发现的任何问题,代码位于 `v5-beta` 分支内。
## PhotoSwipe 库
[](https://travis-ci.org/dimsemenov/PhotoSwipe)
JavaScript 图像库为移动和桌面.
- [Documentation and getting started guide](http://photoswipe.com/documentation/getting-started.html).
- [演示和脚本主页](http://photoswipe.com).
- [NPM](https://www.npmjs.com/package/photoswipe) `npm install photoswipe`.
- Bower`bower install photoswipe`。
## 文件的位置
- 编译的 PhotoSwipe JS 和 CSS 文件、SVG 和 PNG 精灵都在 [dist/](https://github.com/dimsemenov/PhotoSwipe/tree/master/dist) 文件夹中。
- 源文件(.)JS 和。SCSS)都在 [src/](https://github.com/dimsemenov/PhotoSwipe/tree/master/src) 文件夹中。注意, PhotoSwipe 在编译 Sass 文件时使用 Autoprefixer。
- 演示网站在 [website/](https://github.com/dimsemenov/PhotoSwipe/tree/master/website) 文件夹中。
- 文档 Markdown 文件在 [website/documentation/](https://github.com/dimsemenov/PhotoSwipe/tree/master/website/documentation) 中。
## 插件 / 扩展 / 插件
- [Ruby gem](https://rubygems.org/gems/photoswipe-rails).
- Ember.js Addons:[ember-photoswipe](https://github.com/kaermorchen/ember-photoswipe),[ember-cli-photoswipe](https://github.com/poetic/ember-cli-photoswipe)。
- [Eager app](https://eager.io/app/DvuKIoU8iTOt).
- [Koken CMS 插件](https://github.com/DanielMuller/koken-plugin-photoswipe).
- [果园 CMS 模块](https://gallery.orchardproject.net/List/Modules/Orchard.Module.Cascade.PhotoSwipe).
- [黄色 CMS 插件 Name ](https://github.com/datenstrom/yellow-plugins/tree/master/gallery).
- [Kirby CMS 插件](https://github.com/SiteMarina/guggenheim).
- [Drupal CMF 模块](https://www.drupal.org/project/photoswipe).
- [ProcessWire CMS 模块](https://github.com/blynx/MarkupProcesswirePhotoswipe).
- [SPIP CMS module](https://plugins.spip.net/photoswipe.html).
- [Fork CMS MediaLibrary widget](https://github.com/forkcms/forkcms).
编码一些有用的东西? 给我发邮件 ,我会在这里发布一个链接。
## Build
要自己编译 PhotoSwipe ,请确保安装了 [Node.js](http://nodejs.org/)、[Grunt.js](https://github.com/cowboy/grunt)、[Ruby](http://www.ruby-lang.org/) 和 [Jekyll](https://github.com/mojombo/jekyll/),然后:
1) 克隆库
git clone https://github.com/dimsemenov/PhotoSwipe.git
2) 进入你获取的 PhotoSwipe 文件夹并安装节点依赖项
cd PhotoSwipe && npm install
3) 运行 `grunt` 以生成 `dist` 文件夹和 `_site/` 文件夹中的站点中的 JS 和 CSS 文件
grunt
可选:
- 运行 `grunt watch` 以在 `src/` 或 `website/` 中更改文件时自动重建文件(JS、CSS、演示网站和文档)。
- 运行 `grunt nosite` 只构建 JS 和 CSS 文件(输出文件夹 `dist/`)。
- 运行 `grunt pswpbuild` 只构建 JS 文件。param`--pswp-exclude` 允许排除模块,例如 `grunt pswpbuild --pswp-exclude=history` 将排除历史模块。
## 使用 PhotoSwipe ?
如果你以某种有趣的方式使用了 PhotoSwipe ,或者在某个流行品牌的网站上,如果你 给我拍 一个链接,我会非常感激。
## 许可证
Script 是根据 MIT 许可证授权的,但有一个例外:不要基于它创建一个公共 WordPress 插件,因为我将开发它。如果你现在需要使用它作为一个公共的 WordPress 插件,请先通过电子邮件问我。谢谢!
归因不是必需的,但很受欢迎,尤其是当你为开发人员制作产品时。
## 关于
PhotoSwipe 4.0+ 是由 [Dmitry Semenov](http://twitter.com/dimsemenov) 开发的。但最初,Script 是由曼彻斯特的一家数字机构 [Code ComputerLove ](http://www.codecomputerlove.com/) 在 2011 年创建的,他们于 2014 年 3 月开始开发。你可以在此库的历史中查看旧 PhotoSwipe (<4.0)的 。