From 33e22b7254c8fe5b2c37010ab2896346c2f3832a Mon Sep 17 00:00:00 2001 From: Nikolay Gagarinov Date: Wed, 20 Mar 2024 22:09:55 +0500 Subject: [PATCH 1/2] fix urls of old version --- docs/general-usage/core-concepts.md | 6 +++--- docs/general-usage/element-classes.md | 2 +- docs/general-usage/html-builder.md | 2 +- docs/general-usage/the-class-helper.md | 2 +- docs/introduction.md | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/general-usage/core-concepts.md b/docs/general-usage/core-concepts.md index fd3aa62..a57ac5b 100644 --- a/docs/general-usage/core-concepts.md +++ b/docs/general-usage/core-concepts.md @@ -5,17 +5,17 @@ weight: 1 ## `Element` classes -This package contains several element classes under the `Spatie\Html\Elements` namespace. It's possible to generate any HTML element with any attribute via these classes and the [fluent element methods](/laravel-html/v1/general-usage/element-methods). +This package contains several element classes under the `Spatie\Html\Elements` namespace. It's possible to generate any HTML element with any attribute via these classes and the [fluent element methods](/laravel-html/general-usage/element-methods). `Element` classes on their own don't have any knowledge of the outside world. That's where the `Spatie\Html\Html` builder comes into play. ## `Html` Builder class -The `Spatie\Html\Html` builder is used to build proper HTML using its [builder methods](/laravel-html/v1/general-usage/html-builder). It will also couple `Spatie\Html\Elements` to other concepts like requests, sessions and models. +The `Spatie\Html\Html` builder is used to build proper HTML using its [builder methods](/laravel-html/general-usage/html-builder). It will also couple `Spatie\Html\Elements` to other concepts like requests, sessions and models. For example when building input fields the `Html` builder will pull old values from the session (on a failed form request) or use values of a given model for the `value` attribute of the input. -Because the `Html` builder will generally return `Spatie\Html\Elements`, you can chain most of the [elements' fluent methods](/laravel-html/v1/general-usage/element-methods) directly onto the builder. +Because the `Html` builder will generally return `Spatie\Html\Elements`, you can chain most of the [elements' fluent methods](/laravel-html/general-usage/element-methods) directly onto the builder. ## The Difference Between Builder Params and Element Methods diff --git a/docs/general-usage/element-classes.md b/docs/general-usage/element-classes.md index 50a3cb7..8080e06 100644 --- a/docs/general-usage/element-classes.md +++ b/docs/general-usage/element-classes.md @@ -5,7 +5,7 @@ weight: 3 This package includes some element classes out of the box, others can be created using the [generic `Spatie\Html\Elements\Element` class](#generic-codeelementcode). -All elements can use the [base element methods](/laravel-html/v1/general-usage/element-methods). Some elements also have some element specific methods to easily set common attributes. These element specific methods can be found bellow. +All elements can use the [base element methods](/laravel-html/general-usage/element-methods). Some elements also have some element specific methods to easily set common attributes. These element specific methods can be found bellow. ## Generic `Element` diff --git a/docs/general-usage/html-builder.md b/docs/general-usage/html-builder.md index 47e2159..20e84f5 100644 --- a/docs/general-usage/html-builder.md +++ b/docs/general-usage/html-builder.md @@ -5,7 +5,7 @@ weight: 2 ## Building general elements -The following builder methods can be used to generate general HTML elements like links, `div`s, `span`s, etc... All these methods return instances of `Spatie\Html\Elements`. Of course all [element methods](/laravel-html/v1/general-usage/element-methods) are available on the returned instances. +The following builder methods can be used to generate general HTML elements like links, `div`s, `span`s, etc... All these methods return instances of `Spatie\Html\Elements`. Of course all [element methods](/laravel-html/general-usage/element-methods) are available on the returned instances. - `function a($href = null, $text = null): A` - `function button($text = null, $type = 'button'): Button` diff --git a/docs/general-usage/the-class-helper.md b/docs/general-usage/the-class-helper.md index 9c9bd6b..7b0dbe2 100644 --- a/docs/general-usage/the-class-helper.md +++ b/docs/general-usage/the-class-helper.md @@ -3,7 +3,7 @@ title: The class() helper weight: 5 --- -The `class` method on `Html` is a helper to render a `class` attribute similar to [Vue.js' `:class` property](https://vuejs.org/v2/guide/class-and-style.html#Object-Syntax). +The `class` method on `Html` is a helper to render a `class` attribute similar to [Vue.js' `:class` property](https://vuejs.org/guide/class-and-style.html#Object-Syntax). It expects an array (or a `Collection`), and will toggle a set of classes depending on the values of the array. diff --git a/docs/introduction.md b/docs/introduction.md index c59832e..c931688 100644 --- a/docs/introduction.md +++ b/docs/introduction.md @@ -7,7 +7,7 @@ This package helps you generate HTML using a clean, simple and easy to read API. ### Generating elements -For example creating a new `span` element with a class is super easy with the [fluent methods for elements](/laravel-html/v1/general-usage/element-methods): +For example creating a new `span` element with a class is super easy with the [fluent methods for elements](/laravel-html/general-usage/element-methods): ```php html()->span()->text('Hello world!')->class('fa fa-eye'); From 0df69d7ef5cfba8068ee15a1ab5f7c0abb565420 Mon Sep 17 00:00:00 2001 From: Nikolay Gagarinov Date: Wed, 20 Mar 2024 22:15:36 +0500 Subject: [PATCH 2/2] fix vuewjs link --- docs/general-usage/extending.md | 1 - docs/general-usage/the-class-helper.md | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/general-usage/extending.md b/docs/general-usage/extending.md index 00ef23e..f0d2aea 100644 --- a/docs/general-usage/extending.md +++ b/docs/general-usage/extending.md @@ -7,7 +7,6 @@ If you want to extend the Html package, you can do the following. Create a class that extends Html: - ```php