shop/templates/shop/frontpage.html
{% extends "shop/base.html" %}
{% block title %}Home{% endblock %}
{% block body %}
{% if not user.is_authenticated %}
<div class="jumbotron">
<h1>Welcome to OKCart</h1>
<div class="lead">
The first <a href="https://okcash.co">OKCash</a> marketplace.
</div>
<a href="{% url 'shop:register' %}" class="btn-lg btn-primary btn">Sign up</a>
<div><small>Alternatively, <a href="{% url 'shop:login' %}">Log in</a></small></div>
</div>
{% endif %}
{% if home_sections %}
{% for section in home_sections %}
<section>
<h1>{{ section.name }}</h1>
<div class="row">
{% for item in section.items %}
<div class="col-sm-2">
<div class="panel panel-default">
<div class="panel-body">
<img src="{{ item.productimage_set.first.image.url}}" alt="{{ item.product_name }}" class="img-responsive">
<h4><a href="{% url 'shop:viewproduct' item.id %}">{{ item.product_name }}</a></h4>
<p>Sold by <a href="{% url 'shop:shop' item.seller %}">{{ item.seller }}</a></p>
</div>
</div>
</div>
{% endfor %}
</div>
</section>
{% endfor %}
{% endif %}
<a href="{% url 'shop:all' %}" class="btn btn-default">View all products</a>
{% endblock %}