kazeeem/flexible-countdown
Composer 安装命令:
composer require kazeeem/flexible-countdown
包简介
This library creates a countdown timer from a date passed to it and it provides very flexible options you can use to format it.
README 文档
README
Flexible Countdown
Flexible Countdown is a special countdown timer built using DayJs Library.
Key Features • How To Use • Credits • License
Key Features
- Locale support
- You can specify the time in your timezone.
- Action to perform when timer elapses
- You could either display a message or reload the page when the time reaches zero.
- Countdown in various formats. (i.e Year, months, weeks, days, hour, minutes and seconds.
- Easy to modify.
How To Use
To clone and use this plugin, you'll need Jquery 3.6.0 and above
# Clone this repository $ git clone https://github.com/Kazeeem/flexible-countdown OR $ you could install it via composer * composer require kazeeem/flexible-countdown # Locate the flexible-countdown.js file which will be found in src/assets/js $ Make sure the flexible-countdown.js file is placed below your jquery.
You can use the plugin as it is in the sample above
However, there are some optional parameters you may want to use as well:
- expiry_message
- This is the message you may want to display when the timer reaches zero. If this value is not passed, the default message is "Time Up"
- reload_page
- This takes the value of true or false. It reloads the page when the countdown reaches zero.
- suffix
- This also takes the value of true or false. It will display the letters of the time beside the individual numbers
- show_days
- By default, the timer shows Hour, minutes and seconds but if you want it to show the value of remaining days, you can set this to true
- show_weeks
- If you want to show remaining weeks.
- show_months
- If you want to show remaining months.
- show_years
- If you want to show remaining year.
- local
- You can specify the timezone you want the counter to use. By default, it is set to Africa/Lagos.
Full Sample Code
Credits
This plugin uses the following libraries:
- Dayjs and its plugins (Timezone and Duration).
License
MIT
codingkaz.com.ng · GitHub @Kazeeem · Twitter @Kazeeem_A
kazeeem/flexible-countdown 适用场景与选型建议
kazeeem/flexible-countdown 是一款 基于 HTML 开发的 Composer 扩展包,目前已累计 5 次下载、GitHub Stars 达 1, 最近一次更新时间为 2021 年 11 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 kazeeem/flexible-countdown 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 kazeeem/flexible-countdown 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-11-09