Project_Camper/vagus/template/home.html
2021-02-06 12:31:59 +01:00

33 lines
1.0 KiB
HTML
Executable File

{% extends 'index.html' %}
{% load static %}
{% block content %}
<div class='container'>
<div class='home-wrapper'>
<section class='home-header'>
<div class="home-header-title">
<h1>Stress is caused by</h1>
<p>not camping enough!</p>
<a href = "{{ request.scheme }}://{{ request.META.HTTP_HOST }}/offers"><button class='home-header-button'> <p>Zarezerwuj swój kamper</p> </button> </a>
</div>
</section>
<div class='home-row'>
{% for offer in offers%}
<div class='home-grid-offer'>
<a href ="{{ offer.get_absolute_url}}"> <h4> {{ offer.title}} </h4></a>
{% for photo in offer.images.all %}
{% if photo.main_image == True%}
<img src="{{ photo.image.url }}">
{% endif %}
{% endfor %}
</div>
{% endfor %}
</div>
<div class='home-footer-copyright'>
<p> Copyright by Krzysztof Bonecki 2021 </p>
</div>
</div>
</div>
{% endblock %}