Metadata-Version: 2.1
Name: django-html-utils
Version: 0.1.1
Summary: HTML utils app for django.
Author-email: "J. Nathanael Philipp" <nathanael@philipp.land>
License: GPLv3+
Project-URL: Homepage, http://github.com/jnphilipp/django-html-utils
Project-URL: Bug Tracker, http://github.com/jnphilipp/django-html-utils/issues
Keywords: django,bootstrap,jquery,select2
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Framework :: Django
Classifier: Framework :: Django :: 4.2
Classifier: Framework :: Django :: 5.0
Classifier: Framework :: Django :: 5.1
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE

# django-html-utils app

![Linting & Tests](https://github.com/jnphilipp/django-html-utils/actions/workflows/tests.yml/badge.svg)


## Included versions

* [Bootstrap](https://github.com/twbs/bootstrap) (bundle): 5.3.3
* [jQuery](https://github.com/jquery/jquery): 3.7.1
* [jQuery UI](https://github.com/jquery/jquery-ui): 1.14.1
* [Select2](https://github.com/select2/select2): 4.0.13


## Usage

### Basics

Load with `{% load django_html_utils %}` and include CSS/JS with:

```html
<head>
  {% django_html_utils_css %}
  {% django_html_utils_js %}
</head>
```

### iFrame modal

Simple modal with an iFrame, designed for usage with forms.

Add modal with `{% iframe_form_modal %}`, with options:
* **iframe_min_height**: `iframe_min_height="500px"` set minimum height of iframe
* **iframe_max_height**: `iframe_max_height="500px"` set maximum height of iframe
* **static_backdrop**: `static_backdrop=False` static backdrop of the model, defaults to `True`

Open link with:
```html
<a href="{% url SOME_FORM %}" title="{% trans "Modal title" %}" data-bs-toggle="modal" data-bs-target="#iframeFormModal">open modal form</a>
```

The URL will be loaded in the iFrame and the title will be set as the modal title.
