strappin-php/engine
Composer 安装命令:
composer create-project strappin-php/engine
包简介
PHP classes that make creating Bootstrap markup easier and cleaner
README 文档
README
Bootstrap is super awesome for quickly building easy-to-use—and easy-on-the-eyes—Web interfaces, but things can quickly become very, very fiddly. We really appreciate the Bootstrap team's consideration of accessibility and semantics, but that necessarily comes with a lot of words and a lot of wiring.
Strappin' is a growing collection of PHP classes, and—crucially—a factory, that makes creating Bootstrap markup quicker and easier. Its power is in joining things up so you can stop worrying about IDs, roles, and aria-this~aria-that.
This library can be easily integrated with templating engines such as Twig.
Example
Strappin' is still being moulded into the right shape—so we aren't ready to fully document everything yet—but here's an example of how you can currently use the library to create a tabbed interface:
use StrappinPhp\Engine\Factory; echo Factory::create()->createTabbedInterface([ 'panels' => [ [ 'action' => 'bs:toggle?object=tab&target=tab-pane-optimal-1', 'label' => 'Tab-Pane 1 Label', 'content' => 'Tab-pane 1 content.', ], [ 'action' => 'bs:toggle?object=tab&target=tab-pane-optimal-2', 'label' => 'Tab-Pane 2 Label', 'content' => 'Tab-pane 2 content.', ], [ 'action' => 'https://example.com/', 'label' => 'External Link', ], ], ]);
ℹ️ We use a custom URL format to easily express Bootstrap actions
Live Demo
For now:
- Clone this repo
- Run
composer installat the root of the clone - Navigate to
<hostname>/<path-to-clone>/tests/functional/index.php
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: ISC
- 更新时间: 2023-09-03