Fix active URL in the navbar
This commit is contained in:
parent
d96ec913d4
commit
509e10e79b
2 changed files with 4 additions and 3 deletions
|
@ -19,7 +19,7 @@
|
|||
<div id="admin">
|
||||
{% macro admin_link(url, text) %}
|
||||
{% set url_for = BASE_URL + request.app.router.url_path_for(url) %}
|
||||
<a href="{{ url_for }}" {% if request.url.path == url_for %}class="active"{% endif %}>{{ text }}</a>
|
||||
<a href="{{ url_for }}" {% if BASE_URL + request.url.path == url_for %}class="active"{% endif %}>{{ text }}</a>
|
||||
{% endmacro %}
|
||||
<div class="admin-menu">
|
||||
<nav class="flexbox">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue