Implemented color filter

This commit is contained in:
Kevin Frantz
2018-07-15 00:06:56 +02:00
parent 1bc7219caa
commit 401fa64733
7 changed files with 75 additions and 25 deletions

View File

@@ -3,6 +3,7 @@
<div class="container">
<div class="page-header">
<h1>Online Shop</h1>
<hr />
</div>
{% block content %}
{% endblock %}

View File

@@ -1,6 +1,17 @@
{% extends 'frames/default.html.twig' %}
{% block title %}product overview{% endblock %}
{% block content %}
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
filter by color:
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
{% for color in colors %}
<a class="dropdown-item" href="{{ color.getUrl }}">{{ color.getName }}</a>
{% endfor %}
</div>
</div>
<hr />
<div class="card-columns">
{% for product in products %}
<div class="card" style="width: 18rem;">