django-html-utils


Namedjango-html-utils JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
SummaryHTML utils app for django.
upload_time2024-12-31 10:29:46
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseGPLv3+
keywords django bootstrap jquery select2 fontawesome
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # django-html-utils app

HTML utils app for django.

![Linting & Tests](https://github.com/jnphilipp/django-html-utils/actions/workflows/tests.yml/badge.svg)
[![pypi Version](https://img.shields.io/pypi/v/django-html-utils.svg?logo=pypi&logoColor=white)](https://pypi.org/project/django-html-utils/)


## Included versions

* [Bootstrap](https://github.com/twbs/bootstrap) (bundle): 5.3.3
* [Font-Awesome](https://github.com/FortAwesome/Font-Awesome): 6.7.2
* [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>
```


### Font-Awesome

To add a Font-Awesome icon use `{% fa "icon-name" %}`. Additional options are `tag`, for the tag to use, defaults to `span` and `icon_type`, for the icon type, defaults to `solid`.

For example:

```html
{% fa "upload" %}
```

resolves to:
```html
<span class="fa-solid fa-upload"></span>
```


### iFrame modal

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

Add modal with `{% iframe_form_modal %}`, with options:
* **iframe_min_height**: set minimum height of iframe, defaults to None
* **iframe_max_height**: set maximum height of iframe, defaults to None
* **static_backdrop**: if the backdrop of the model should be static, defaults to `True`
* **submit_button_text**: the text of the submit button, when `None` no text will be displayed, defaults to `None`
* **fa_icon_name**: the Font-Awesome icon name on the submit button
* **fa_tag**: the Font-Awesome tag to use, defaults to `span`
* **fa_icon_type**: the icon type, defaults to `solid`

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.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "django-html-utils",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "django, bootstrap, jquery, select2, fontawesome",
    "author": null,
    "author_email": "\"J. Nathanael Philipp\" <nathanael@philipp.land>",
    "download_url": "https://files.pythonhosted.org/packages/16/ca/63c2e55ac730d0e4cef879ec76e9339c4428a2c31ce127ca62a16d469ff1/django_html_utils-0.2.0.tar.gz",
    "platform": null,
    "description": "# django-html-utils app\n\nHTML utils app for django.\n\n![Linting & Tests](https://github.com/jnphilipp/django-html-utils/actions/workflows/tests.yml/badge.svg)\n[![pypi Version](https://img.shields.io/pypi/v/django-html-utils.svg?logo=pypi&logoColor=white)](https://pypi.org/project/django-html-utils/)\n\n\n## Included versions\n\n* [Bootstrap](https://github.com/twbs/bootstrap) (bundle): 5.3.3\n* [Font-Awesome](https://github.com/FortAwesome/Font-Awesome): 6.7.2\n* [jQuery](https://github.com/jquery/jquery): 3.7.1\n* [jQuery UI](https://github.com/jquery/jquery-ui): 1.14.1\n* [Select2](https://github.com/select2/select2): 4.0.13\n\n\n## Usage\n\n### Basics\n\nLoad with `{% load django_html_utils %}` and include CSS/JS with:\n\n```html\n<head>\n  {% django_html_utils_css %}\n  {% django_html_utils_js %}\n</head>\n```\n\n\n### Font-Awesome\n\nTo add a Font-Awesome icon use `{% fa \"icon-name\" %}`. Additional options are `tag`, for the tag to use, defaults to `span` and `icon_type`, for the icon type, defaults to `solid`.\n\nFor example:\n\n```html\n{% fa \"upload\" %}\n```\n\nresolves to:\n```html\n<span class=\"fa-solid fa-upload\"></span>\n```\n\n\n### iFrame modal\n\nSimple modal with an iFrame, designed for usage with forms.\n\nAdd modal with `{% iframe_form_modal %}`, with options:\n* **iframe_min_height**: set minimum height of iframe, defaults to None\n* **iframe_max_height**: set maximum height of iframe, defaults to None\n* **static_backdrop**: if the backdrop of the model should be static, defaults to `True`\n* **submit_button_text**: the text of the submit button, when `None` no text will be displayed, defaults to `None`\n* **fa_icon_name**: the Font-Awesome icon name on the submit button\n* **fa_tag**: the Font-Awesome tag to use, defaults to `span`\n* **fa_icon_type**: the icon type, defaults to `solid`\n\nOpen link with:\n```html\n<a href=\"{% url SOME_FORM %}\" title=\"{% trans \"Modal title\" %}\" data-bs-toggle=\"modal\" data-bs-target=\"#iframeFormModal\">open modal form</a>\n```\n\nThe URL will be loaded in the iFrame and the title will be set as the modal title.\n",
    "bugtrack_url": null,
    "license": "GPLv3+",
    "summary": "HTML utils app for django.",
    "version": "0.2.0",
    "project_urls": {
        "Bug Tracker": "http://github.com/jnphilipp/django-html-utils/issues",
        "Homepage": "http://github.com/jnphilipp/django-html-utils"
    },
    "split_keywords": [
        "django",
        " bootstrap",
        " jquery",
        " select2",
        " fontawesome"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8133a3589b5c50f1fb8f2dbc8ee9c23b221e1fed0be05529729d0f468822e168",
                "md5": "b995ac61595a35176df81a9de4d3dffd",
                "sha256": "833214ccb020e99b6cce26076e039a454009f6b44187c3206fe81af0f00801ee"
            },
            "downloads": -1,
            "filename": "django_html_utils-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b995ac61595a35176df81a9de4d3dffd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 1180917,
            "upload_time": "2024-12-31T10:29:44",
            "upload_time_iso_8601": "2024-12-31T10:29:44.025369Z",
            "url": "https://files.pythonhosted.org/packages/81/33/a3589b5c50f1fb8f2dbc8ee9c23b221e1fed0be05529729d0f468822e168/django_html_utils-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "16ca63c2e55ac730d0e4cef879ec76e9339c4428a2c31ce127ca62a16d469ff1",
                "md5": "04bc2a2dad3bce5045c9a7baae73835a",
                "sha256": "b80ec9fb051385e261a7e57a42f560d01c4a49f5adebf792bfb57d7693ee2467"
            },
            "downloads": -1,
            "filename": "django_html_utils-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "04bc2a2dad3bce5045c9a7baae73835a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 1136433,
            "upload_time": "2024-12-31T10:29:46",
            "upload_time_iso_8601": "2024-12-31T10:29:46.690323Z",
            "url": "https://files.pythonhosted.org/packages/16/ca/63c2e55ac730d0e4cef879ec76e9339c4428a2c31ce127ca62a16d469ff1/django_html_utils-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-31 10:29:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jnphilipp",
    "github_project": "django-html-utils",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "django-html-utils"
}
        
Elapsed time: 9.00327s