helloflask / helloflask/bootstrap-flask

add render_dropdown_item ?

Open
#387 0 comments 0 reactions 0 assignees View on GitHub
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.

    Get new issues in your inbox

    A short digest of beginner-friendly GitHub issues.