Metadata-Version: 2.1
Name: fh-frankenui
Version: 0.0.1
Summary: A FastHTML plugin for using franken-ui easier
Author-email: Isaac Flath <isaac.flath@gmail.com>
Project-URL: Homepage, https://github.com/isaac-flath/fh-frankenui
Project-URL: Issues, https://github.com/isaac-flath/fh-frankenui/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.txt

# fh-frankenui

Wrapper for Franken UI to be used with fasthtml.  This package is in development not ready for general use.

## What is Franken UI?

At it's simplest, it is a helper to build HTML class strings used in the [Franken UI](https://getfranken.com) library.  This is done through:

+ Using enums to give autocomplete via python
    + `style.Text.danger` = 'uk-text-danger'
    + `style.Background.primary` = 'uk-background-primary'
    + `style.Text.bold` = 'uk-text-bold'
+ Ability to add to add classes together to build a new class string
    + `s.Text.center + s.H.h2 + s.Background.primary` = `Str('uk-text-center uk-h2 uk-background-primary')`
    + `s.Text.center + s.H.h2 + s.Background.primary + 'your-own-class-string'` = `FrankenStr('uk-text-center uk-h2 uk-background-primary your-own-class-string')`
+ Theme selection
    + `s.Theme.blue.headers()`: Gives CSS and JS headers for the `blue` theme

## How do I use it?

```python
# without wrapper
P(cls='uk-text-center uk-h2 uk-background-primary')("Your Title")

# with wrapper
P(cls=Text.center + H.h2 + Background.primary)("Your Title")
```

```python
# without wrapper
P(cls='uk-text-center uk-h2 uk-background-primary my-own-class-string')("Your Title")

# with wrapper
P(cls=Text.center + H.h2 + Background.primary + 'my-own-class-string')("Your Title")
```

```python
# without wrapper
app = FastHTML(hdrs = [Script(src="https://cdn.jsdelivr.net/npm/uikit@3.21.6/dist/js/uikit.min.js"),
                        Script(src="https://cdn.jsdelivr.net/npm/uikit@3.21.6/dist/js/uikit-icons.min.js"),
                        Link(rel="stylesheet", href="https://unpkg.com/franken-wc@0.0.6/dist/css/blue.min.css")])

# with wrapper
app = FastHTML(hdrs = Theme.blue.headers())
```
