Devolutions / Devolutions/powershell-universal-gallery

HTML and CSS Helper Functions

Open
#119 0 comments 0 reactions 0 assignees View on GitHub
app enhancement
Dominant language
PowerShell
Stars
92
Forks
20
PR merge metrics
No merged PRs in 30d

Description

We should have set of HTML functions that wrap New-UDElement. For example:

```powershell
New-UDDiv -Content {
"A div!"
}
```

We should then include some aliases to make it nice and terse.

```powershell
div {
a -href 'https://www.powershelluniversal.com' { "PowerShell Universal" }
}
```

We should also include a function for CSS styling. It would have all the valid CSS style properties and return a hashtable.

```powershell
$Style = New-UDCSSStyle -BackgroundColor 'red' -Display 'flex'
```

This would be a good exercise for an LLM. I tried ChatGPT, but it didn't really get there. I think we could add this to the [Tools](https://github.com/ironmansoftware/gallery/tree/main/Apps/PowerShellUniversal.Apps.Tools) module.

We could also consider making something like PowerShellUniversal.Apps.HTML

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.