"horizintal navbar"

This commit is contained in:
2017-11-26 08:06:11 +01:00
parent 77b382bb74
commit fb2d17fbfb
10 changed files with 210 additions and 100 deletions

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang='zxx'>
<head>
<title>{% block title %}Accueil{% endblock %}</title>
<title>TetaWebApp - {% block title %}Accueil{% endblock %}</title>
<meta name="viewport" content="initial-scale=1.0" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="/static/styles/colors.css" />
@@ -15,19 +15,34 @@
<header>{% block banner %}TetaWebApp{% endblock %}</header>
<div class='content'>
{% block nav %}
<nav>
<nav class='vertical'>
{% block menu %}
{% for item in menu %}
{% if item[2] == 1 %}
<a class='selected' href='{{ item[1] }}'>{{ item[0] }}</a>
{% else %}
<a href='{{ item[1] }}'>{{ item[0] }}</a>
{% endif %}
{% for key in item[1] %}
{% if item[2] == 1 %}
<a class='selected' href='{{ key }}'>{{ item[0] }}</a>
{% else %}
<a href='{{ key }}'>{{ item[0] }}</a>
{% endif %}
{% endfor %}
{% endfor %}
{% endblock %}
</nav>
{% endblock%}
<main>
{% if navbar %}
<div class='navbar_container'>
<ul class='horizontal'>
{% for item in navbar %}
{% set selected = ['', 'selected'] %}
{% set last = ['right_border', 'last'] %}
{% for url in item[1] %}
<li><a class='{{ last[item[3]] }} {{ selected[item[2]] }}' href='{{ url }}'>{{ item[0] }}</a></li>
{% endfor %}
{% endfor %}
</ul>
</div>
{% endif %}
{% block main %}
<article class='right'>
<h3>TetaWebApp demo</h3>