Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds -HideName for all input elements; Adds Pre/Append Icon/Text for Select and Textarea #593

Merged
merged 2 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ You can build charts, forms, tables, general text, tabs, login pages, etc. There

## 📦 Libraries

The Pode.Web templates are built using [Bootstrap](https://getbootstrap.com), [jQuery](https://jquery.com), [Material Design Icons](https://materialdesignicons.com), [Chart.js](https://www.chartjs.org), and [Highlight.js](https://github.com/highlightjs/highlight.js).
The Pode.Web templates are built using [Bootstrap](https://getbootstrap.com), [jQuery](https://jquery.com), [Material Design Icons](https://pictogrammers.com/library/mdi/), [Chart.js](https://www.chartjs.org), and [Highlight.js](https://github.com/highlightjs/highlight.js).

## 📘 Documentation

Expand Down
8 changes: 4 additions & 4 deletions docs/Tutorials/Elements/Icon.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Icon

| Support | |
| ------- |-|
| Events | Yes |
| Support | |
| ------- | --- |
| Events | Yes |

The icon element will render a [Material Design Icon](https://materialdesignicons.com) to your page. To create an icon element you use [`New-PodeWebIcon`](../../../Functions/Elements/New-PodeWebIcon), and supply the name of a Material Design Icon using `-Name`; you can also change the icon colour via `-Colour` which can be a known name (red/green/etc) or a hex value (#333333).
The icon element will render a [Material Design Icon](https://pictogrammers.com/library/mdi/) to your page. To create an icon element you use [`New-PodeWebIcon`](../../../Functions/Elements/New-PodeWebIcon), and supply the name of a Material Design Icon using `-Name`; you can also change the icon colour via `-Colour` which can be a known name (red/green/etc) or a hex value (#333333).

```powershell
New-PodeWebCard -Content @(
Expand Down
2 changes: 1 addition & 1 deletion docs/Tutorials/Icons.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Icons

All icons are rendered in Pode.Web using [Material Design Icons](https://materialdesignicons.com), this applies to all `-Icon` parameters.
All icons are rendered in Pode.Web using [Material Design Icons](https://pictogrammers.com/library/mdi/), this applies to all `-Icon` parameters.

A list of searchable icons can be [found here](https://pictogrammers.github.io/@mdi/font/7.2.96/). When you've found the one you need, you only have to supply the part of the name after `mdi-`. For example, let's say you need the `mdi-github` icon, then you only need to supply the `github` part of the name:

Expand Down
2 changes: 1 addition & 1 deletion docs/Tutorials/Pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Which would look like below:
By adding a page to your site Pode.Web will add a link to it on your site's sidebar navigation. You can also group pages so you can collapse groups of them. To add a page to your site you use [`Add-PodeWebPage`](../../Functions/Pages/Add-PodeWebPage), and you can give your page a `-Name` and an `-Icon` to display on the sidebar. Pages can either be [static](#static) or [dynamic](#dynamic).

!!! note
The `-Icon` is the name of a [Material Design Icon](https://materialdesignicons.com), a list of which can be found on their [website](https://pictogrammers.github.io/@mdi/font/5.4.55/). When supplying the name, just supply the part after `mdi-`. For example, `mdi-github` should be `-Icon 'github'`.
The `-Icon` is the name of a [Material Design Icon](https://pictogrammers.com/library/mdi/), a list of which can be found on their [website](https://pictogrammers.github.io/@mdi/font/5.4.55/). When supplying the name, just supply the part after `mdi-`. For example, `mdi-github` should be `-Icon 'github'`.

For example, to add a simple Charts page to your site, to show a Windows counter:

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ You can build charts, forms, tables, general text, tabs, login pages, etc. There

## 📦 Libraries

The Pode.Web templates are built using [Bootstrap](https://getbootstrap.com), [jQuery](https://jquery.com), [Material Design Icons](https://materialdesignicons.com), [Chart.js](https://www.chartjs.org), and [Highlight.js](https://github.com/highlightjs/highlight.js).
The Pode.Web templates are built using [Bootstrap](https://getbootstrap.com), [jQuery](https://jquery.com), [Material Design Icons](https://pictogrammers.com/library/mdi/), [Chart.js](https://www.chartjs.org), and [Highlight.js](https://github.com/highlightjs/highlight.js).

## 🔥 Quick Look!

Expand Down
5 changes: 3 additions & 2 deletions examples/inputs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,17 @@ Start-PodeServer -Threads 2 {
Show-PodeWebToast -Message "The element has a keyup: $($WebEvent.Data['Name'])"
}

New-PodeWebTextbox -Name 'Password' -Type Password -PrependIcon Lock
New-PodeWebTextbox -Name 'Password' -Type Password -PrependIcon 'Lock' -Placeholder 'Enter your password' -HideName
New-PodeWebTextbox -Name 'Date' -Type Date
New-PodeWebTextbox -Name 'Time' -Type Time
New-PodeWebTextbox -Name 'Comments' -Multiline -PrependIcon 'comment-quote'
New-PodeWebDateTime -Name 'DateTime' -DateValue '2023-12-23' -TimeValue '13:37'
New-PodeWebCredential -Name 'Credentials'
New-PodeWebMinMax -Name 'CPU' -AppendIcon 'percent' -ReadOnly
New-PodeWebCheckbox -Name 'Switches' -Options @('Terms', 'Privacy') -AsSwitch
New-PodeWebCheckbox -Name 'Checkboxes' -Options @('Terms', 'Privacy') -Inline
New-PodeWebRadio -Name 'Radios' -Options @('S', 'M', 'L')
New-PodeWebSelect -Name 'Role1' -Options @('Choose...', 'User', 'Admin', 'Operations')
New-PodeWebSelect -Name 'Role1' -Options @('Choose...', 'User', 'Admin', 'Operations') -PrependIcon 'account' -AppendIcon 'account'
New-PodeWebSelect -Name 'Role2' -Options @('User', 'Admin', 'Operations') -Multiple
New-PodeWebRange -Name 'Cores' -Value 30 -ShowValue

Expand Down
Loading
Loading