<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

    <title>{{ 'Homepage'|trans }}</title>

    <meta name="description" content="">
    <meta name="author" content="">

    <meta name="viewport" content="width=device-width">

    <link rel="stylesheet" href="{{ app.request.basepath }}/assets/css/styles.css">

    <script src="{{ app.request.basepath }}/js/libs/modernizr-2.5.3-respond-1.1.0.min.js"></script>
</head>
<body>
<!--[if lt IE 7]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p><![endif]-->

    {% set active = active|default(null) %}
    <div class="navbar navbar-fixed-top">
        <div class="navbar-inner">
            <div class="container">
                <a class="brand" href="{{ path('homepage') }}">{{ 'Silex Kitchen Sink Edition'|trans }}</a>
                <div class="nav-collapse">
                    <ul class="nav">
                        <li {% if 'homepage' == active %}class="active"{% endif %}><a href="{{ path('homepage') }}">{{ 'Homepage'|trans }}</a></li>
                        <li {% if 'page_with_cache' == active %}class="active"{% endif %}><a href="{{ path('page_with_cache') }}">Cache sample</a></li>
                        <li {% if 'form' == active %}class="active"{% endif %}><a href="{{ path('form') }}">Form sample</a></li>
                        <li {% if 'doctrine' == active %}class="active"{% endif %}><a href="{{ path('doctrine') }}">Doctrine</a></li>
                        <li class="dropdown{% if 'account' == active %} active{% endif %}">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                Account <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu">
                                {% if is_granted('ROLE_USER') %}
                                    <li><a href="{{ path('logout') }}">{{ 'Logout'|trans }}</a></li>
                                {% else %}
                                    <li><a href="{{ path('login') }}">{{ 'Login'|trans }}</a></li>
                                    <li><a href="#">{{ 'Register'|trans }}</a></li>
                                {% endif %}
                            </ul>
                        </li>
                    </ul>
                </div><!--/.nav-collapse -->
            </div>
        </div>
    </div>

    <div class="container">
        <div id="main" role="main" class="container">
            {% set alertTypeAvaillable = [ 'info', 'success', 'warning', 'error'] %}
            {% for alert in alertTypeAvaillable %}
                {% for message in app.session.getFlashBag.get(alert) %}
                    <div class="alert alert-{{ alert }}" >
                        <button class="close" data-dismiss="alert">×</button>
                        {{ message|trans }}
                    </div>
                {% endfor %}
            {% endfor %}
            {% block content %}
            {% endblock %}
        </div>
    </div>

    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script>window.jQuery || document.write('<script src="{{ app.request.basepath }}/js/libs/jquery-1.7.2.min.js"><\/script>')</script>
    <script src="{{ app.request.basepath }}/assets/js/scripts.js"></script>
</body>
</html>
