cecil/photo-stream
Composer 安装命令:
composer create-project cecil/photo-stream
包简介
Photo Stream is a self hosted static website for your photos, with really goods loading performances, powered by Cecil.
README 文档
README
Photo Stream is a self hosted static website for your photos, with really goods loading performances, powered by Cecil.
Demo: https://photo-stream-demo.cecil.app (hosted by Netlify and fed by Unsplash).
Features
- Responsives images & mobile friendly
- Files optimized and lazy loaded
- Rich content caption
- Image placeholder (low quality or dominant color)
- Keyboard navigation
- Direct download button
- Simple workflow: drag & drop and commit
Install
PHP 8.2+ and Cecil 8 are required.
First you should clone or download the Git repository, or run composer create-project cecil/photo-stream myproject.
The repository come with a default version of cecil.phar, so you can you use it immediately, or you can download the latest release throught the following command:
curl -LO https://cecil.app/cecil.phar
Usage
Add photos
Just drop image files in the static/photos directory.
Add details (optional)
For each photo you can add a title, an alternative text and the author name/URL, through the data/photos.yaml file:
<file basename>: # without file extension title: <photo title> alt: <alternative text> author: name: <author name> url: <author URL>
Configuration
You can define gallery title, baseurl, author, colors, thumbnails size, sort, etc. by editing config.yml file:
photo: style: color: background: black text: white img: height: 300px margin: 2px sort: asc size: thumbnail: 640 full: 1920 placeholder: image # image, color or false
Preview locally
You can double-click on the command shortcut:
- preview.command on macOS
- preview.cmd on Windows
Or run the following command in your terminal:
php cecil.phar serve -v --open
Localize
You can easily localize Photo Stream in your language.
Add languages
config.yml:
language: <language_code> # e.g.: fr languages: - code: <language_code> locale: <locale_code> # e.g.: fr_FR
Add translations
In the translations directory, copy translations.en.yaml to translations.<language_code>.yaml then translate each key.
Deploy
First build the website:
php cecil.phar build -v
Then copy generated files in _site to your Web server.
Or use a provider:
License
Photo Stream is a free software distributed under the terms of the MIT license.
PhotoSwipe is under the terms of the MIT license.
Photos from the demo are under the Unsplash license.
cecil/photo-stream 适用场景与选型建议
cecil/photo-stream 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 10 次下载、GitHub Stars 达 3, 最近一次更新时间为 2024 年 01 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 cecil/photo-stream 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 cecil/photo-stream 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 31
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-01-04
