mirror of
https://github.com/kevinveenbirkenbach/coding-challenge-online-shop.git
synced 2025-09-10 20:07:12 +02:00
Implemented Navigation
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
{% extends "base.html.twig" %}
|
||||
{% block body %}
|
||||
{% include 'frames/structure/navbar.html.twig' with menu_items %}
|
||||
<div class="container">
|
||||
<div class="page-header">
|
||||
<h1>Online Shop</h1>
|
||||
<hr />
|
||||
</div>
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
32
src/template/frames/structure/navbar.html.twig
Normal file
32
src/template/frames/structure/navbar.html.twig
Normal file
@@ -0,0 +1,32 @@
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||
<a class="navbar-brand" href="/">Online Shop</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 %}
|
||||
<!--<li class="nav-item active">
|
||||
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
|
||||
</li>
|
||||
-->
|
||||
<li class="nav-item {% if item.active %}active{% endif %}">
|
||||
<a class="nav-link" href="{{ item.url }}">{{ item.name }}</a>
|
||||
</li>
|
||||
<!--
|
||||
<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">
|
||||
Dropdown
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||
<a class="dropdown-item" href="#">Action</a>
|
||||
<a class="dropdown-item" href="#">Another action</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="#">Something else here</a>
|
||||
</div>
|
||||
</li>
|
||||
-->
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
@@ -24,7 +24,7 @@
|
||||
<b>price:</b>
|
||||
<ul>
|
||||
<li>{{ product.getPrice.getNetto.getFloat }} {{ product.getPrice.getNetto.getSymbol }} <i>(net)</i></li>
|
||||
<li>{{ product.getPrice.getGross.getFloat }} {{ product.getPrice.getGross.getSymbol }} <i>(gross)</i></li>
|
||||
<li>{{ product.getPrice.getGross.getFloat }} {{ product.getPrice.getGross.getSymbol }} <i>(gross)</i>, Tax: {{ product.getPrice.getTax }} %</li>
|
||||
</ul>
|
||||
</span>
|
||||
<a href="#" class="btn btn-primary">Add to basket</a>
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<h2>Welcome to the online shop!</h2>
|
||||
You have the following options:
|
||||
<ul>
|
||||
{% for option in options %}
|
||||
{% for option in menu_items %}
|
||||
<li>
|
||||
<a href="{{option.getUrl}}">{{option.getName}}</a>
|
||||
</li>
|
||||
|
Reference in New Issue
Block a user