mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Copied template structure from coding challenge test
This commit is contained in:
9
application/templates/frames/default.html.twig
Normal file
9
application/templates/frames/default.html.twig
Normal 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 %}
|
6
application/templates/frames/exception.html.twig
Normal file
6
application/templates/frames/exception.html.twig
Normal file
@@ -0,0 +1,6 @@
|
||||
{% extends "frames/default.html.twig" %}
|
||||
{% set menu_items = [] %}
|
||||
{% block content %}
|
||||
<h1>Error!</h1>
|
||||
<p>{{ message }}</p>
|
||||
{% endblock %}
|
35
application/templates/frames/structure/navbar.html.twig
Normal file
35
application/templates/frames/structure/navbar.html.twig
Normal 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>
|
Reference in New Issue
Block a user