Skip to content

Commit

Permalink
Add directory Multimedia. (#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Feb 22, 2024
1 parent 32ef001 commit 658c94e
Show file tree
Hide file tree
Showing 20 changed files with 168 additions and 1,275 deletions.
11 changes: 8 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ create HTML elements that suit your specific needs.

The repository can generate basic `HTML` tags, allowing you to create `HTML` elements programmatically using `PHP`.

- [button](/docs/tag/Button.md)
- [button toggle](/docs/tag/ButtonToggle.md)
- [img](/docs/tag/Img.md)
- [svg](/docs/tag/Svg.md)

## Document
Expand All @@ -44,6 +41,7 @@ Provide a comprehensive set of `form` elements and components for building user-
These form controls include various `input` types, such as `text`, `checkbox`, `radio`, and components like `select`,
`textarea`, as well as `form`, `label`, `legend`, `fieldset`, and other related components.

- [button](/docs/form-control/Button.md)
- [form](/docs/form-control/Form.md)
- [label](/docs/form-control/Label.md)
- [select](/docs/form-control/Select.md)
Expand Down Expand Up @@ -99,6 +97,13 @@ The `Metadata` section of a web page contains information about the page, such a
- [meta](/docs/metadata/Meta.md)
- [title](/docs/metadata/Title.md)

## Multimedia

The `Multimedia` section of a web page contains elements that are used to display images, videos, and other types of
media.

- [img](/docs/multimedia/Img.md)

## Semantic

A `semantic` tag is an element that clearly describes its meaning to both the browser and the developer. These tags
Expand Down
8 changes: 4 additions & 4 deletions docs/tag/Button.md → docs/form-control/Button.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ $button->template('<span>{tag}</span>');

## Attributes

Refer to the [Attribute Tests](https://github.com/php-forge/html/blob/main/tests/Button/AttributeTest.php) for comprehensive
examples.
Refer to the [Attribute Tests](https://github.com/php-forge/html/blob/main/tests/FormControl/Button/AttributeTest.php)
for comprehensive examples.

The following methods are available for setting attributes:

Expand Down Expand Up @@ -132,8 +132,8 @@ The following methods are available for setting attributes:

## Custom methods

Refer to the [Custom Method Test](https://github.com/php-forge/html/blob/main/tests/Button/CustomMethodTest.php) for
comprehensive examples.
Refer to the [Custom Method Test](https://github.com/php-forge/html/blob/main/tests/FormControl/Button/CustomMethodTest.php)
for comprehensive examples.

The following methods are available for customizing the `HTML` output:

Expand Down
6 changes: 3 additions & 3 deletions docs/tag/Img.md → docs/multimedia/Img.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ $img->template('<span>{tag}</span>');

## Attributes

Refer to the [Attribute Tests](https://github.com/php-forge/html/blob/main/tests/Img/AttributeTest.php) for
Refer to the [Attribute Tests](https://github.com/php-forge/html/blob/main/tests/Multimedia/Img/AttributeTest.php) for
comprehensive examples.

The following methods are available for setting attributes:
Expand All @@ -119,8 +119,8 @@ The following methods are available for setting attributes:

## Custom methods

Refer to the [Custom Method Test](https://github.com/php-forge/html/blob/main/tests/Img/CustomMethodTest.php) for
comprehensive examples.
Refer to the [Custom Method Test](https://github.com/php-forge/html/blob/main/tests/Multimedia/Img/CustomMethodTest.php)
for comprehensive examples.

The following methods are available for customizing the `HTML` output:

Expand Down
149 changes: 0 additions & 149 deletions docs/tag/ButtonToggle.md

This file was deleted.

6 changes: 5 additions & 1 deletion src/Attribute/Component/HasToggle.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,11 @@ public function toggleTag(string $value): static

private function renderToggleTag(): string
{
if ($this->toggle === false || ($this->toggleClass === '' && $this->toggleContent === '')) {
if ($this->toggle === false) {
return '';
}

if ($this->toggleClass === '' && $this->toggleContent === '') {
return '';
}

Expand Down
121 changes: 0 additions & 121 deletions src/ButtonToggle.php

This file was deleted.

17 changes: 7 additions & 10 deletions src/Button.php → src/FormControl/Button.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,24 @@

declare(strict_types=1);

namespace PHPForge\Html;
namespace PHPForge\Html\FormControl;

use PHPForge\Html\Attribute\Aria\{
HasAriaControls,
use PHPForge\Html\Attribute\{HasClass, HasData, HasId, HasLang, HasStyle, HasTabindex, HasTitle};
use PHPForge\Html\Attribute\Aria\{HasAriaControls,
HasAriaDescribedBy,
HasAriaDisabled,
HasAriaExpanded,
HasAriaLabel,
HasRole
};
use PHPForge\Html\Attribute\Custom\{
HasAttributes,
HasRole};
use PHPForge\Html\Attribute\Custom\{HasAttributes,
HasContainer,
HasContent,
HasPrefixAndSuffix,
HasTagName,
HasTemplate,
HasWidgetValidation
};
HasWidgetValidation};
use PHPForge\Html\Attribute\Input\HasName;
use PHPForge\Html\Attribute\{HasClass, HasData, HasId, HasLang, HasStyle, HasTabindex, HasTitle};
use PHPForge\Html\Tag;
use PHPForge\Widget\Element;

/**
Expand Down

0 comments on commit 658c94e

Please sign in to comment.