helloflask / helloflask/bootstrap-flask
add render_dropdown_item ?
Open
- Dominant language
- SCSS
- Stars
- 1.2k
- Forks
- 193
- Avg merge
- 4m
- Merged PRs (30d)
- 3
Description
not finding a way to properly render dropdown menu items, I've had the need to complement `render_nav_item` by `render_dropdown_item` to add items to bootstrap dropdown menus.
the quickly hardcoded version is below, i can adapt it to provide the `use_li` conditional
```
{% macro render_dropdown_item(endpoint, text, _badge='', _badge_classes='badge text-bg-light') %}
{% set active = True if request.endpoint and request.endpoint == endpoint else False %}
{{ text }} {% if _badge %}{{ _badge }}{% endif %}
{% endmacro %}
```
would that be interesting as a PR ?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.