Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hellysmile/django-activeurl

Easy-to-use active URL highlighting for Django
https://github.com/hellysmile/django-activeurl

Last synced: 16 days ago
JSON representation

Easy-to-use active URL highlighting for Django

Awesome Lists containing this project

README

        

================
django-activeurl
================

Easy-to-use active URL highlighting for Django

.. image:: https://img.shields.io/travis/hellysmile/django-activeurl.svg
:target: https://travis-ci.org/hellysmile/django-activeurl

.. image:: https://img.shields.io/codecov/c/github/hellysmile/django-activeurl.svg
:target: https://codecov.io/gh/hellysmile/django-activeurl

.. image:: https://img.shields.io/pypi/v/django_activeurl.svg
:target: https://pypi.python.org/pypi/django-activeurl

Features
========

* automatic highlighting of currently active ```` tags via CSS class
* automatic highlighting of parent ``
`` tags for menus
* removes boring / hardcoded stuff from your life!

* href="#" never causes highlighting for compatibility with techniques such as
bootstrap nav.

Usage
=====

After loading the template library via

.. code-block:: html+django

{% load activeurl %}

the following code snippet will be rendered like this if `request.full_path()` starts with `/some_page/`:

.. code-block:: html+django

{% activeurl %}


{% endactiveurl %}

**Note:**
The content of ``{% activeurl %}…{% endactiveurl %}`` must have valid root tag (i.e.
``