Skip to content

Commit

Permalink
Better namespaces. (#328)
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Feb 21, 2024
1 parent 6da944f commit 5f1bf2f
Show file tree
Hide file tree
Showing 38 changed files with 87 additions and 82 deletions.
32 changes: 17 additions & 15 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,19 @@ The repository can generate basic `HTML` tags, allowing you to create `HTML` ele
- [a](/docs/tag/A.md)
- [button](/docs/tag/Button.md)
- [button toggle](/docs/tag/ButtonToggle.md)
- [h](/docs/tag/H.md)
- [i](/docs/tag/I.md)
- [img](/docs/tag/Img.md)
- [span](/docs/tag/Span.md)
- [svg](/docs/tag/Svg.md)

## Document

The `Document` section of a web page contains elements that are used to define the structure and content of the page.

- [body](/docs/document/Body.md)
- [head](/docs/document/Head.md)
- [html](/docs/document/Html.md)

## Form control

Provide a comprehensive set of `form` elements and components for building user-friendly and accessible web forms.
Expand Down Expand Up @@ -83,6 +90,7 @@ way.

- [div](/docs/group/Div.md)
- [li](/docs/group/Li.md)
- [main](/docs/group/Main.md)
- [ol](/docs/group/Ol.md)
- [p](/docs/group/P.md)
- [ul](/docs/group/Ul.md)
Expand All @@ -94,19 +102,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)

## Layout
## Semantic

In web design, the `Layout` section typically refers to a collection of files or components that define the overall
structure and arrangement of a web page. This includes elements such as headers, footers, navigation bars, sidebars, and
other structural components that help organize and present content on the page. The `Layout` section is essential for
creating consistent and visually appealing designs across the entire website, as it establishes the framework
within which individual pages are constructed.
A `semantic` tag is an element that clearly describes its meaning to both the browser and the developer. These tags
make it easier for search engines and browsers to understand the structure and content of web pages.

- [body](/docs/layout/Body.md)
- [footer](/docs/layout/Footer.md)
- [head](/docs/layout/Head.md)
- [header](/docs/layout/Header.md)
- [html](/docs/layout/Html.md)
- [main](/docs/group/Main.md)
- [nav](/docs/layout/Nav.md)
- [section](/docs/layout/Section.md)
- [footer](/docs/semantic/Footer.md)
- [h](/docs/semantic/H.md)
- [header](/docs/semantic/Header.md)
- [nav](/docs/semantic/Nav.md)
- [section](/docs/semantic/Section.md)
4 changes: 2 additions & 2 deletions docs/layout/Body.md → docs/document/Body.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Explore additional methods for setting various attributes such as `lang`, `name`

## Attributes

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

The following methods are available for setting attributes:
Expand All @@ -106,7 +106,7 @@ The following methods are available for setting attributes:

## Custom methods

Refer to the [Custom Methods Tests](https://github.com/php-forge/html/blob/main/tests/Layout/Body/CustomMethodTest.php)
Refer to the [Custom Methods Tests](https://github.com/php-forge/html/blob/main/tests/Document/Body/CustomMethodTest.php)
for comprehensive examples.

The following methods are available for customizing the `HTML` output:
Expand Down
4 changes: 2 additions & 2 deletions docs/layout/Head.md → docs/document/Head.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Explore additional methods for setting various attributes such as `lang`, `name`

## Attributes

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

The following methods are available for setting attributes:
Expand All @@ -105,7 +105,7 @@ The following methods are available for setting attributes:

## Custom methods

Refer to the [Custom Methods Tests](https://github.com/php-forge/html/blob/main/tests/Layout/Head/CustomMethodTest.php)
Refer to the [Custom Methods Tests](https://github.com/php-forge/html/blob/main/tests/Document/Head/CustomMethodTest.php)
for comprehensive examples.

The following methods are available for customizing the `HTML` output:
Expand Down
4 changes: 2 additions & 2 deletions docs/layout/Html.md → docs/document/Html.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Explore additional methods for setting various attributes such as `lang`, `name`

## Attributes

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

The following methods are available for setting attributes:
Expand All @@ -105,7 +105,7 @@ The following methods are available for setting attributes:

## Custom methods

Refer to the [Custom Methods Tests](https://github.com/php-forge/html/blob/main/tests/Layout/Html/CustomMethodTest.php)
Refer to the [Custom Methods Tests](https://github.com/php-forge/html/blob/main/tests/Document/Html/CustomMethodTest.php)
for comprehensive examples.

The following methods are available for customizing the `HTML` output:
Expand Down
4 changes: 2 additions & 2 deletions docs/layout/Main.md → docs/group/Main.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Explore additional methods for setting various attributes such as `lang`, `name`

## Attributes

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

The following methods are available for setting attributes:
Expand All @@ -106,7 +106,7 @@ The following methods are available for setting attributes:

## Custom methods

Refer to the [Custom Methods Tests](https://github.com/php-forge/html/blob/main/tests/Layout/Main/CustomMethodTest.php)
Refer to the [Custom Methods Tests](https://github.com/php-forge/html/blob/main/tests/Group/Main/CustomMethodTest.php)
for comprehensive examples.

The following methods are available for customizing the `HTML` output:
Expand Down
4 changes: 2 additions & 2 deletions docs/layout/Footer.md → docs/semantic/Footer.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Explore additional methods for setting various attributes such as `lang`, `name`

## Attributes

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

The following methods are available for setting attributes:
Expand All @@ -106,7 +106,7 @@ The following methods are available for setting attributes:

## Custom methods

Refer to the [Custom Methods Tests](https://github.com/php-forge/html/blob/main/tests/Layout/Footer/CustomMethodTest.php)
Refer to the [Custom Methods Tests](https://github.com/php-forge/html/blob/main/tests/Semantic/Footer/CustomMethodTest.php)
for comprehensive examples.

The following methods are available for customizing the `HTML` output:
Expand Down
8 changes: 4 additions & 4 deletions docs/tag/H.md → docs/semantic/H.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ Explore additional methods for setting various attributes such as `lang`, `name`

## Attributes

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

The following methods are available for setting attributes:

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

## Custom methods

Refer to the [Custom Methods Tests](https://github.com/php-forge/html/blob/main/tests/H/CustomMethodTest.php) for
comprehensive examples.
Refer to the [Custom Methods Tests](https://github.com/php-forge/html/blob/main/tests/Semantic/H/CustomMethodTest.php)
for comprehensive examples.

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

Expand Down
4 changes: 2 additions & 2 deletions docs/layout/Header.md → docs/semantic/Header.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Explore additional methods for setting various attributes such as `lang`, `name`

## Attributes

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

The following methods are available for setting attributes:
Expand All @@ -106,7 +106,7 @@ The following methods are available for setting attributes:

## Custom methods

Refer to the [Custom Methods Tests](https://github.com/php-forge/html/blob/main/tests/Layout/Header/CustomMethodTest.php)
Refer to the [Custom Methods Tests](https://github.com/php-forge/html/blob/main/tests/Semantic/Header/CustomMethodTest.php)
for comprehensive examples.

The following methods are available for customizing the `HTML` output:
Expand Down
4 changes: 2 additions & 2 deletions docs/layout/Nav.md → docs/semantic/Nav.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Explore additional methods for setting various attributes such as `lang`, `name`

## Attributes

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

The following methods are available for setting attributes:
Expand All @@ -106,7 +106,7 @@ The following methods are available for setting attributes:

## Custom methods

Refer to the [Custom Methods Tests](https://github.com/php-forge/html/blob/main/tests/Layout/Nav/CustomMethodTest.php)
Refer to the [Custom Methods Tests](https://github.com/php-forge/html/blob/main/tests/Semantic/Nav/CustomMethodTest.php)
for comprehensive examples.

The following methods are available for customizing the `HTML` output:
Expand Down
4 changes: 2 additions & 2 deletions docs/layout/Section.md → docs/semantic/Section.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Explore additional methods for setting various attributes such as `lang`, `name`

## Attributes

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

The following methods are available for setting attributes:
Expand All @@ -105,7 +105,7 @@ The following methods are available for setting attributes:

## Custom methods

Refer to the [Custom Methods Tests](https://github.com/php-forge/html/blob/main/tests/Layout/Section/CustomMethodTest.php)
Refer to the [Custom Methods Tests](https://github.com/php-forge/html/blob/main/tests/Semantic/Section/CustomMethodTest.php)
for comprehensive examples.

The following methods are available for customizing the `HTML` output:
Expand Down
2 changes: 1 addition & 1 deletion src/Layout/Body.php → src/Document/Body.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace PHPForge\Html\Layout;
namespace PHPForge\Html\Document;

use PHPForge\Html\Base\AbstractBlockElement;

Expand Down
2 changes: 1 addition & 1 deletion src/Layout/Head.php → src/Document/Head.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace PHPForge\Html\Layout;
namespace PHPForge\Html\Document;

use PHPForge\Html\Base\AbstractBlockElement;

Expand Down
2 changes: 1 addition & 1 deletion src/Layout/Html.php → src/Document/Html.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace PHPForge\Html\Layout;
namespace PHPForge\Html\Document;

use PHPForge\Html\Base\AbstractBlockElement;

Expand Down
2 changes: 1 addition & 1 deletion src/Layout/Main.php → src/Group/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace PHPForge\Html\Layout;
namespace PHPForge\Html\Group;

use PHPForge\Html\Base\AbstractBlockElement;

Expand Down
2 changes: 1 addition & 1 deletion src/Layout/Footer.php → src/Semantic/Footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace PHPForge\Html\Layout;
namespace PHPForge\Html\Semantic;

use PHPForge\Html\Base\AbstractBlockElement;

Expand Down
5 changes: 4 additions & 1 deletion src/H.php → src/Semantic/H.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

declare(strict_types=1);

namespace PHPForge\Html;
namespace PHPForge\Html\Semantic;

use PHPForge\Html\Attribute;
use PHPForge\Html\Base;

/**
* The `<h1>` to `<h6>` HTML elements represent six levels of section headings.
Expand Down
2 changes: 1 addition & 1 deletion src/Layout/Header.php → src/Semantic/Header.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace PHPForge\Html\Layout;
namespace PHPForge\Html\Semantic;

use PHPForge\Html\Base\AbstractBlockElement;

Expand Down
2 changes: 1 addition & 1 deletion src/Layout/Nav.php → src/Semantic/Nav.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace PHPForge\Html\Layout;
namespace PHPForge\Html\Semantic;

use PHPForge\Html\Base\AbstractBlockElement;

Expand Down
2 changes: 1 addition & 1 deletion src/Layout/Section.php → src/Semantic/Section.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace PHPForge\Html\Layout;
namespace PHPForge\Html\Semantic;

use PHPForge\Html\Base\AbstractBlockElement;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace PHPForge\Html\Tests\Layout\Body;
namespace PHPForge\Html\Tests\Document\Body;

use PHPForge\Html\Layout\Body;
use PHPForge\Html\Document\Body;
use PHPForge\Support\Assert;
use PHPUnit\Framework\TestCase;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace PHPForge\Html\Tests\Layout\Body;
namespace PHPForge\Html\Tests\Document\Body;

use PHPForge\Html\Layout\Body;
use PHPForge\Html\Document\Body;
use PHPForge\Support\Assert;
use PHPUnit\Framework\TestCase;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace PHPForge\Html\Tests\Layout\Head;
namespace PHPForge\Html\Tests\Document\Head;

use PHPForge\Html\Layout\Head;
use PHPForge\Html\Document\Head;
use PHPForge\Support\Assert;
use PHPUnit\Framework\TestCase;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace PHPForge\Html\Tests\Layout\Head;
namespace PHPForge\Html\Tests\Document\Head;

use PHPForge\Html\Layout\Head;
use PHPForge\Html\Document\Head;
use PHPForge\Support\Assert;
use PHPUnit\Framework\TestCase;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace PHPForge\Html\Tests\Layout\Html;
namespace PHPForge\Html\Tests\Document\Html;

use PHPForge\Html\Layout\Html;
use PHPForge\Html\Document\Html;
use PHPForge\Support\Assert;
use PHPUnit\Framework\TestCase;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace PHPForge\Html\Tests\Layout\Html;
namespace PHPForge\Html\Tests\Document\Html;

use PHPForge\Html\Layout\Html;
use PHPForge\Html\Document\Html;
use PHPForge\Support\Assert;
use PHPUnit\Framework\TestCase;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace PHPForge\Html\Tests\Layout\Main;
namespace PHPForge\Html\Tests\Group\Main;

use PHPForge\Html\Layout\Main;
use PHPForge\Html\Group\Main;
use PHPForge\Support\Assert;
use PHPUnit\Framework\TestCase;

Expand Down

0 comments on commit 5f1bf2f

Please sign in to comment.