Cocktail-DB/cocktail_list/templates/homepage.html

35 lines
1.4 KiB
HTML
Raw Normal View History

2020-05-25 09:49:36 +00:00
{% extends "base.html" %}
{% load static %}
{% block css %}
<link rel="stylesheet" href="{% static 'css/style.css' %}">
<link rel="stylesheet" href="{% static 'css/navbar_style.css' %}">
<link href="https://fonts.googleapis.com/css2?family=Faster+One&display=swap" rel="stylesheet">
{% endblock css %}
2020-05-25 09:49:36 +00:00
{% block content %}
2020-05-27 20:19:33 +00:00
<div class="contained-img-bar mt-2">
<div class="text-contained-img-bar">In totale nel nostro Salone Bar abbiamo {{ lista_cocktail.count }} cocktails</div>
</div>
<!-- <h1 class="text-center">In totale nel nostro Salone Bar abbiamo {{ lista_cocktail.count }} <i class="fas fa-cocktail"></i> </h1> -->
2020-05-25 09:49:36 +00:00
{% for cocktail in lista_cocktail %}
{% if forloop.first %} <div class="row"> {% endif %}
<div class="col-lg-4 my-3">
<a href="{{ cocktail.get_absolute_url }}">
<div class="card h-100 my-1 border border-info">
<div class="card-img-top"><img src="{{ cocktail.immagine_cocktail.url }}" class="img-fluid" alt="{{ cocktail.nome_cocktail }}"></div>
<div class="text_on_image">{{ cocktail.nome_cocktail }}</div>
<div class="card-body py-0">
<p class="mt-2 mb-0 py-3 text-center">{{ cocktail.ingredienti.all|join:"," }}</p>
</div>
</div>
</a>
</div>
{% if forloop.counter|divisibleby:"3" or forloop.last %}
</div>
{% endif %}
{% if forloop.counter|divisibleby:"3" and not forloop.last %}
<div class="row">
{% endif %}
{% endfor %}
{% endblock content %}