|
1 | 1 | <p align="center">
|
2 |
| - <a href="https://github.com/yii-tools/template" target="_blank"> |
| 2 | + <a href="https://github.com/ui-awesome/html-core-component" target="_blank"> |
3 | 3 | <img src="https://avatars.githubusercontent.com/u/121752654?s=200&v=4" height="100px">
|
4 | 4 | </a>
|
5 |
| - <h1 align="center">Template.</h1> |
| 5 | + <h1 align="center">UI Awesome HTML Core Component for PHP.</h1> |
6 | 6 | <br>
|
7 | 7 | </p>
|
8 | 8 |
|
9 | 9 | <p align="center">
|
10 |
| - <a href="https://github.com/yii-tools/template/actions/workflows/build.yml" target="_blank"> |
11 |
| - <img src="https://github.com/yii-tools/template/actions/workflows/build.yml/badge.svg" alt="PHPUnit"> |
| 10 | + <a href="https://github.com/ui-awesome/html-core-component/actions/workflows/build.yml" target="_blank"> |
| 11 | + <img src="https://github.com/ui-awesome/html-core-component/actions/workflows/build.yml/badge.svg" alt="PHPUnit"> |
12 | 12 | </a>
|
13 |
| - <a href="https://codecov.io/gh/yii-tools/template" target="_blank"> |
14 |
| - <img src="https://codecov.io/gh/yii-tools/template/branch/main/graph/badge.svg?token=MF0XUGVLYC" alt="Codecov"> |
| 13 | + <a href="https://codecov.io/gh/ui-awesome/html-core-component" target="_blank"> |
| 14 | + <img src="https://codecov.io/gh/ui-awesome/html-core-component/branch/main/graph/badge.svg?token=MF0XUGVLYC" alt="Codecov"> |
15 | 15 | </a>
|
16 |
| - <a href="https://dashboard.stryker-mutator.io/reports/github.com/yii-tools/template/main" target="_blank"> |
17 |
| - <img src="https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fyii2-extensions%2Fasset-bootstrap5%2Fmain" alt="Infection"> |
| 16 | + <a href="https://dashboard.stryker-mutator.io/reports/github.com/ui-awesome/html-core-component/main" target="_blank"> |
| 17 | + <img src="https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fui-awesome%2Fhtml-core-component%2Fmain" alt="Infection"> |
18 | 18 | </a>
|
19 |
| - <a href="https://github.com/yii-tools/template/actions/workflows/static.yml" target="_blank"> |
20 |
| - <img src="https://github.com/yii-tools/template/actions/workflows/static.yml/badge.svg" alt="Psalm"> |
| 19 | + <a href="https://github.com/ui-awesome/html-core-component/actions/workflows/static.yml" target="_blank"> |
| 20 | + <img src="https://github.com/ui-awesome/html-core-component/actions/workflows/static.yml/badge.svg" alt="Psalm"> |
21 | 21 | </a>
|
22 |
| - <a href="https://shepherd.dev/github/yii-tools/template" target="_blank"> |
23 |
| - <img src="https://shepherd.dev/github/yii-tools/template/coverage.svg" alt="Psalm Coverage"> |
| 22 | + <a href="https://shepherd.dev/github/ui-awesome/html-core-component" target="_blank"> |
| 23 | + <img src="https://shepherd.dev/github/ui-awesome/html-core-component/coverage.svg" alt="Psalm Coverage"> |
24 | 24 | </a>
|
25 |
| - <a href="https://github.styleci.io/repos/494495136?branch=main" target="_blank"> |
26 |
| - <img src="https://github.styleci.io/repos/494495136/shield?branch=main" alt="Style ci"> |
27 |
| - </a> |
| 25 | + <a href="https://github.styleci.io/repos/776381948?branch=main"> |
| 26 | + <img src="https://github.styleci.io/repos/776381948/shield?branch=main" alt="Style ci"> |
| 27 | + </a> |
28 | 28 | </p>
|
29 | 29 |
|
| 30 | +These abstract classes serve as foundational building blocks for creating diverse UI components in HTML applications. |
| 31 | + |
| 32 | +They provide a structured approach to developing reusable components with customizable configurations and default |
| 33 | +settings. |
| 34 | + |
| 35 | +By extending these classes, you can quickly implement and customize various UI elements, such as breadcrumbs, |
| 36 | +dropdowns, navigation bars, and toggles, to enhance your application's user interface. |
| 37 | + |
| 38 | +- AbstractBreadcrumb: Extend this class to implement breadcrumb navigation components. It simplifies the management of |
| 39 | +breadcrumb items and offers customizable configurations for rendering breadcrumb elements. |
| 40 | + |
| 41 | +- AbstractDropdown: Extend this class to effortlessly implement dropdown components. It simplifies the management of |
| 42 | +menu items and offers customizable configurations for rendering dropdown elements. |
| 43 | + |
| 44 | +- AbstractNavBar: Use this class as a basis for crafting navigation bar components. It provides flexibility in rendering |
| 45 | +brand elements, menus, and additional content, with customizable attributes and default configurations. |
| 46 | + |
| 47 | +- AbstractToggle: Extend this class to create toggle components with ease. It supports various types (e.g., button, link) |
| 48 | +and offers functionality for rendering toggle elements using customizable templates, attributes, and content. |
| 49 | + |
| 50 | +- Item: This class represents individual items within a menu or breadcrumb. It allows for easy management of item attributes |
| 51 | +and content. |
| 52 | + |
| 53 | +- Menu: This class represents a collection of menu items. It facilitates the organization and rendering of menu items within |
| 54 | +dropdowns, navigation bars, or other menu-based components. |
| 55 | + |
| 56 | +Simply extend these abstract classes and apply their default configurations to swiftly integrate and customize UI components |
| 57 | +tailored to your application's requirements. |
| 58 | + |
30 | 59 | ## Installation
|
31 | 60 |
|
32 | 61 | The preferred way to install this extension is through [composer](https://getcomposer.org/download/).
|
33 | 62 |
|
34 | 63 | Either run
|
35 | 64 |
|
36 | 65 | ```shell
|
37 |
| -composer require --prefer-dist package |
| 66 | +composer require --prefer-dist ui-awesome/html-core-component:^0.1 |
38 | 67 | ```
|
39 | 68 |
|
40 | 69 | or add
|
41 | 70 |
|
42 | 71 | ```json
|
43 |
| -"package": "version" |
| 72 | +"ui-awesome/html-core-component": "^0.1" |
44 | 73 | ```
|
45 | 74 |
|
46 | 75 | to the require-dev section of your `composer.json` file.
|
47 | 76 |
|
48 | 77 | ## Usage
|
49 | 78 |
|
50 |
| -[Check the documentation docs](docs/README.md) to learn about usage. |
| 79 | +To use the classes in your project, you need to extend them in your custom components. |
| 80 | + |
| 81 | +For example, to create a custom breadcrumb component, you can extend the `AbstractBreadcrumb` class: |
| 82 | + |
| 83 | +```php |
| 84 | +use UIAwesome\Html\Core\Component\AbstractBreadcrumb; |
| 85 | + |
| 86 | +class CustomBreadcrumb extends AbstractBreadcrumb |
| 87 | +{ |
| 88 | + // Custom implementation |
| 89 | +} |
| 90 | +``` |
51 | 91 |
|
52 | 92 | ## Testing
|
53 | 93 |
|
|
0 commit comments