Copied template structure from coding challenge test

This commit is contained in:
Kevin Frantz
2018-09-05 11:20:40 +02:00
parent bbf4b7d4d3
commit e466bb9e05
7 changed files with 116 additions and 9 deletions

View File

@@ -0,0 +1,9 @@
{% extends "base.html.twig" %}
{% block body %}
{% include 'frames/structure/navbar.html.twig' with menu_items %}
<br />
<div class="container">
{% block content %}
{% endblock %}
</div>
{% endblock %}

View File

@@ -0,0 +1,6 @@
{% extends "frames/default.html.twig" %}
{% set menu_items = [] %}
{% block content %}
<h1>Error!</h1>
<p>{{ message }}</p>
{% endblock %}

View File

@@ -0,0 +1,35 @@
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="/">infinito</a>
<button class="navbar-toggler" type="button" data-toggle="collapse"
data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
{% for item in menu_items %}
{% if item.name %}
{% if item.url %}
<li class="nav-item {% if item.active %}active{% endif %}"><a
class="nav-link" href="{{ item.url }}"> {{ item.name }}
</a></li>
{% elseif item.toArray %}
<li class="nav-item dropdown"><a
class="nav-link dropdown-toggle" href="#" id="navbarDropdown"
role="button" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false"> {{ item.name }}
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
{%for link in item %}
<a class="dropdown-item {% if link.active %}active{% endif %}"
href="{{ link.url }}"> {{ link.name }}
</a>
{% endfor %}
</div></li>
{% endif %}
{% endif %}
{% endfor %}
</ul>
</div>
</nav>