jaymeh/craft-currently-reading-widget
Composer 安装命令:
composer require jaymeh/craft-currently-reading-widget
包简介
Widget which uses various book API's to showcase what you are currently reading.
README 文档
README
A Craft CMS plugin that displays your currently reading books in a beautiful slider widget. Supports multiple book data sources including OpenLibrary.
Features
- Beautiful slider interface for displaying books
- Multiple data source support (OpenLibrary, Mock API)
- Customizable templates
- Responsive design
- Easy to extend with custom book APIs
Installation
- Open your terminal and go to your Craft project:
cd /path/to/project
- Then tell Composer to load the plugin:
composer require jaymeh/craft-currently-reading-widget
- In the Control Panel, go to Settings → Plugins and click the "Install" button for Currently Reading Widget.
Configuration
- Go to Settings → Plugins → Currently Reading Widget
- Select your preferred book data source (OpenLibrary or Mock API)
- Configure any additional settings specific to your chosen data source
Customization
Overriding Templates
You can override the default templates by creating your own versions in your Craft project:
- Create a directory in your project:
templates/currently-reading/
-
Copy the template files from the plugin's
templates/currently-reading/directory to your project's directory. -
Modify the templates as needed. Available templates:
slider.twig- Renders books in a slider template
Customizing Styles
The plugin's styles can be customized in two ways:
-
Override the CSS file: Create your own CSS file in your project and override the plugin's classes:
.currently-reading-widget__slider { /* Your custom styles */ }
-
Add custom classes: The plugin's templates use BEM-style class names that you can extend or override in your own CSS.
Extending with Custom APIs
You can add your own book data source by:
- Creating a new class that implements
BookServiceInterface - Registering your API in the
RegisterBookApiEventevent:
use jaymeh\craftcurrentlyreadingwidget\events\RegisterBookApiEvent; Event::on( BookApiService::class, RegisterBookApiEvent::class, function(RegisterBookApiEvent $event) { $event->apis['myapi'] = MyCustomApi::class; } );
Available Template Variables
In the slider template, you have access to the following variables:
books- Array of book objects with properties:title- Book titleauthor- Book authorcoverImageUrl- URL to book cover image
Support
For support, please open an issue in the GitHub repository or contact the plugin author.
License
This plugin is licensed under the Craft License.
jaymeh/craft-currently-reading-widget 适用场景与选型建议
jaymeh/craft-currently-reading-widget 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 16 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 03 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 jaymeh/craft-currently-reading-widget 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 jaymeh/craft-currently-reading-widget 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 16
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 20
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2025-03-25