Search
 
SCRIPT & CODE EXAMPLE
 

HTML

nav bar activate in jinja

{% set navigation_bar = [
    ('/', 'index', 'Index'),
    ('/downloads/', 'downloads', 'Downloads'),
    ('/about/', 'about', 'About')
] -%}

{% set active_page = active_page|default('index') -%}
...
<ul id="navigation">
    {% for href, id, caption in navigation_bar %}
    <li{% if id == active_page %} class="active"{% endif
    %}><a href="{{ href|e }}">{{ caption|e }}</a>
    </li>
{% endfor %}
</ul>
Comment

nav bar activate in jinja

{% extends "layout.html" %}
{% set active_page = "index" %}
Comment

PREVIOUS NEXT
Code Example
Html :: tailwind search bar 
Html :: python timestanp 
Html :: tabpage in boostrap5 
Html :: html include html page 
Html :: mat-toolbar 
Html :: bootstrap responsive sticky top 
Html :: common sample sql databases for practice 
Html :: how to loop in html 
Html :: bootstrap table no border 
Html :: instagram icon 
Html :: html body tag 
Html :: radio buttons in bootstrap 
Html :: What is difference between React router and react router Dom? 
Html :: do not break a tag in html 
Html :: html images @2x 
Html :: how to make check boxes in html 
Html :: load a html page inside another 
Html :: html = sign 
Html :: html colspan 
Html :: laravel vue error handling 
Html :: high load linux 
Html :: prettier html formatting 
Html :: share to google plus html link 
Html :: credit card formatter in html with javascript 
Html :: emmet multiple tags 
Html :: email verification template html 
Html :: html stroke width not working 
Html :: python download html as text 
Html :: floating modal bootstrap 
Html :: detailed list html 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =