承接 jonnitto/photoswipe 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jonnitto/photoswipe

Composer 安装命令:

composer require jonnitto/photoswipe

包简介

PhotoSwipe for Neos CMS

README 文档

README

Latest stable version Total downloads License GitHub forks GitHub stars GitHub watchers GitHub followers Follow Jon on Twitter

Jonnitto.PhotoSwipe

This package includes PhotoSwipe into Neos CMS

Version Neos Maintained
0.* 2.*
> 1.4 3.* + 4.*
2.* 3.3 + 4.*
> 3.* 3.3 + 4.*
>= 3.1.2 3.3 - 8.*
4.* 7.3 - 8.*
5.* 8.4 - 9.*

Required HTML markup

Each element that matches the selector a.lightbox must have such attributes:

  • Image URL in href or data-pswp-src attribute (latter has higher priority).
  • Image width in data-pswp-width.
  • Image height in data-pswp-height.

And optionally:

  • <img> thumbnail within the link element that will be displayed before the large image is loaded
  • Optional data-cropped="true" attribute if thumbnail is cropped. See also Animating from Cropped Thumbnail. PhotoSwipe API supports almost any markup and any data source, read more about it here.

Example:

<a
  class="lightbox"
  data-pswp-width="2560"
  data-pswp-height="1200"
  href="path/to/image.jpg"
  >...</a
>

Javascript variables

There is one global variable who get set during the intialisation:

neosPhotoSwipe This object stores the lightbox variables from PhotoSwiper. (The variable who get used to call lightbox.init()). With this, you can add you own event listener or trigger methods.

Javascript event listener

If you dispatch the event neos-photoswipe:init all type of lightboxes get initialized. Great if you work in AJAX enviroments. You can also activate a specific type of lightbox: neos-photoswipe.images:init, neos-photoswipe.fetch:init or neos-photoswipe.template:init.

Example:

window.dispatchEvent(new Event('neos-photoswipe:init'));

Alter generated markup

Adding custom attributes to the PhotoSwipe container

You can add custom attributes to the PhotoSwipe container like this:

Jonnitto:
  PhotoSwipe:
    additonalPswpContainerAttributes:
      data-turbo-temporary: true
      class: 'my-custom-class'

Adding custom attributes to the link in the error fetch message

Jonnitto:
  PhotoSwipe:
    fetchAttributeErrorMessages: 'data-pswp-type="fetch" data-turbo="false"'

Installation

Most of the time you have to make small adjustments to a package (e.g. configuration in Settings.yaml). Because of that, it is important to add the corresponding package to the composer from your theme package. Mostly this is the site packages located under Packages/Sites/. To install it correctly go to your theme package (e.g.Packages/Sites/Foo.Bar) and run following command:

composer require jonnitto/photoswipe --no-update

The --no-update command prevent the automatic update of the dependencies. After the package was added to your theme composer.json, go back to the root of the Neos installation and run composer update. Et voilà! Your desired package is now installed correctly.

jonnitto/photoswipe 适用场景与选型建议

jonnitto/photoswipe 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 29.09k 次下载、GitHub Stars 达 5, 最近一次更新时间为 2016 年 04 月 24 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「flow」 「image」 「photo」 「gallery」 「Neos」 「lightbox」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 jonnitto/photoswipe 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 jonnitto/photoswipe 我们能提供哪些服务?
定制开发 / 二次开发

基于 jonnitto/photoswipe 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 29.09k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 19
  • 依赖项目数: 1
  • 推荐数: 1

GitHub 信息

  • Stars: 5
  • Watchers: 1
  • Forks: 7
  • 开发语言: JavaScript

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2016-04-24